Install
openclaw skills install @wuhaorui/automate-feishu-invoice-approvalScaffold, configure, validate, run, and maintain a Feishu/Lark invoice approval bot that uses Codex vision, validates buyer headers, auto-selects the closest expense category, drafts the approval reason, sends an interactive confirmation card, and submits only after the original uploader confirms. Use for building or troubleshooting Feishu invoice-to-approval workflows, approval form mappings, dry-run tests, card callbacks, and duplicate protection.
openclaw skills install @wuhaorui/automate-feishu-invoice-approvalBuild a reusable Python service that turns invoice images sent to a Feishu bot into uploader-confirmed expense approvals.
Choose a new or empty target directory. Do not overwrite an existing project.
Run python3 <skill-directory>/scripts/scaffold.py --target <target-directory>.
Read references/setup.md before configuring a first deployment or changing an approval definition.
Copy .env.example to .env and config/approval_mapping.example.json to config/approval_mapping.json.
Fill the buyer name, buyer tax ID, approval code, expense option IDs, and approval widget IDs. Never put an app secret in .env or the mapping file.
Configure the Feishu application credential with scripts/setup-lark.sh.
Run the generated project's tests and validation:
PYTHONPATH=src python3 -m unittest discover -s tests -v
PYTHONPATH=src python3 -m invoice_approval_bot.cli validate
Start with BOT_DRY_RUN=true. Send representative invoices and verify extraction, buyer-header rejection, category selection, reason generation, confirmation-card callbacks, and duplicate handling.
Set BOT_AUTO_SUBMIT=true and BOT_DRY_RUN=false only when the user explicitly authorizes real approval creation.
Run scripts/run.sh under the user's preferred supervisor. Read references/operations.md for status meanings and incident checks.
codex, and lark-cli; environment access is limited to the variables declared in frontmatter and the generated project's .env..env, app secrets, approval credentials, real invoice images, extracted invoice JSON, SQLite databases, open IDs, or organization-specific approval/widget IDs.config/invoice-output.schema.json and the matching expense_type_options object together when changing expense categories.invoice.expense_category_value, invoice.approval_summary, invoice.total_amount_number, and approval_file.attachment_code.scripts/scaffold.py copies a clean, reusable project template.assets/template/ contains the Python service, tests, schema, and safe example configuration.references/setup.md covers Feishu application and approval mapping setup.references/operations.md covers dry-run promotion, records, statuses, and troubleshooting.