Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
An n8n workflow that checks a supplier invoice against your supplier list and open purchase orders with nine rules. Next it posts the bill, opens a ticket for a person to check, or alerts accounts payable. Every outside system is a REST call you provide.
Supplier invoice checks and routing over your own REST APIs is an n8n workflow in the Finance & accounting category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.
A webhook call
It starts when something posts to its webhook, such as a mailbox rule, a Drive watcher or an upload form, and it reads:
A posted bill, a review ticket or a rejection alert for each invoice, and a JSON answer to the caller that lists the status and every rule that fired
What you need before you start.
Extraction, accounting, review and alerts
Extracts the invoice fields, returns the supplier list and the purchase orders, posts the bill, opens the ticket and sends the alerts.
NeedsSix routes under one base address, and the sign-in that API needs
Checked by Mindket on 13 Nov 2026
This n8n workflow checks a supplier invoice and sends it where it belongs. A webhook receives the name of an invoice file. Your extraction service reads the document, and the workflow compares the result with your supplier list and your open purchase orders. Nine rules decide the status, such as a duplicate number, a wrong TRN or a total that does not add up. A clean invoice posts a bill, a doubtful one opens a review ticket and a bad one alerts accounts payable. The workflow holds only the rules and the routing, and the outside systems are REST calls you provide.
Accounts payable teams that already have, or can build, an API for extraction, accounting and tickets. It suits a team that wants every rule in one readable Code node. Skip it if you want a ready extraction model inside the workflow, because it has none.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Finance | Accounts payable teams | Check each supplier invoice before a bill is posted | A clerk sees an invoice with a wrong total land in the review queue with its reason. |
| Accounting | Bookkeeping firms | Apply the same rules to every client’s invoices | A firm points the workflow at each client’s system and keeps one set of rules. |
| Operations | Finance operations | Stop duplicate and over-limit invoices early | An invoice sent twice is rejected the second time with the code V-01. |
| Software | Integration developers | Start from a tested routing pattern and swap in real systems | A developer replaces the six HTTP requests with the nodes of the company’s ERP. |
You need solid n8n for this one: a REST API of your own with six routes, or other nodes in its place, and a Code node you may edit. The file gives no setup time.
n8n Cloud or a self-hosted n8n will run it, with an API of your own that the workflow can reach over HTTPS.
Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. One host value, your limits and the sign-in your API needs cover every step.
| Need | Detail |
|---|---|
| n8n | An account on n8n Cloud or a server of your own |
| Extraction route | POST /documents/extract, which returns the fields of the invoice |
| Accounting routes | GET /accounting/suppliers, GET /accounting/purchase_orders and POST /accounting/bills |
| Review and alert routes | POST /review/queue and POST /alerts |
| A sender | A mailbox rule, a Drive watcher or a form that posts to the webhook |
workflow.json.Config and replace <YOUR_API_HOST> in base with your API’s host. Check auto_approve_limit, ap_channel and total_tolerance, and do the same for base in Config (errors).Validate: TRN, duplicate, totals, PO match, limit and check the rules, the VAT rate, the TRN length, the confidence floor and the AED limits.Publish the workflow and send each invoice’s file name to the webhook. The answer comes back as JSON with the status, the reasons and a bill id, a ticket or an alert flag. Clean invoices are posted, doubtful ones wait in your review queue and bad ones alert accounts payable.
| To change | Where |
|---|---|
| The limits and the alert channel | Config |
| Any rule, the VAT rate or the TRN length | The Code node Validate: TRN, duplicate, totals, PO match, limit |
| The systems behind the routes | The HTTP Request nodes, or other nodes in their place |
| What the caller gets back | Outcome and Respond 200 (invoice handled) |
| Where failures go | Alert ops (Slack) |
A supplier’s invoice arrives for 1,100 on a subtotal of 1,000. The supplier is in the master and its TRN matches.
The total is not the subtotal plus 5%, so rule V-06 sends the invoice to review. The webhook answer lists the reason, and a ticket appears in your review queue. An invoice with a correct total and a matching purchase order posts a bill instead.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here the boxes call your systems, and one Code box holds all the rules. Click Test workflow, send a sample invoice to the test URL and open each box’s output to see how the status was reached.
For experts. The checks are plain JavaScript with no model in the loop, and the duplicate list lives in the workflow’s static data.
| Node | What it does | What to know |
|---|---|---|
AI: extract fields from document | HTTP Request that posts the file name and a fixed application/pdf type | Your service must find the file by name, and every file is treated as a PDF |
Merge lookups | Joins the supplier list and the purchase orders | The Code node reads each list from its own node, not from the merged items |
Validate: TRN, duplicate, totals, PO match, limit | Runs the rules V-00 to V-09 and sets a status and reasons | A TRN of 15 digits, a VAT rate of 5% and AED limits are written into it |
Route by status | A Switch with the outputs AUTO_APPROVE, REVIEW and REJECT | Each output goes to one HTTP Request, and all three meet again in Outcome |
Error trigger | Starts an alert when a run fails | Needs this workflow set as its own error workflow |
The workflow posts bills on its own when every rule passes, and it extracts nothing by itself.
application/pdf type, so your service must find the file by namebaseAn n8n workflow that checks a supplier invoice and sends it where it belongs. A webhook receives the name of an invoice file. Your
extraction service reads the document, and the workflow compares the result with your supplier list and open purchase orders. Next it
posts the bill, opens a ticket for a person to check, or alerts accounts payable, and answers the webhook with the outcome.
The workflow holds the rules and the routing, and nothing else. It has no AI model and no accounting system inside. Every outside
system is a plain HTTP request to your own API, so you supply that API or swap each request for a node of your own system.
workflow.json: the workflow as n8n exports it, 18 nodes. 16 of them run and two are sticky notes. It holds no credential.README.md: these notes.https://api.your-company.example in both Config nodes is now https://<YOUR_API_HOST>.base/llm/complete, because the step calls base/documents/extract. The notes now say what the nodes do, and ask you to save and pressEach route is called against the base address in Config. The nodes have no authentication, so add it to each one as your API needs.
POST /documents/extract with { "file_name": "...", "mime": "application/pdf" }. It must answer `{ "fields": { supplier, invoice_no,GET /accounting/suppliers. It must answer { "rows": [{ supplier_name, trn, approved_limit_aed }] }.GET /accounting/purchase_orders. It must answer { "rows": [{ po_number, supplier, amount }] }.POST /accounting/bills with the checked invoice. It must answer { "bill_id": "..." }.POST /review/queue with the file, the status and the reasons. It must answer { "ticket": "..." }.POST /alerts with a channel and a text. Any answer will do.workflow.json.Config and replace <YOUR_API_HOST> in base with your API's host. Check auto_approve_limit, ap_channel andtotal_tolerance. Do the same for base in Config (errors).Validate: TRN, duplicate, totals, PO match, limit and check the rules. The VAT rate is 5%, a TRN must have 15Error trigger sends an alert when a run fails.Webhook: invoice received (email, drive or upload) takes a POST with a file_name in its body.Config adds the base address, the limit for automatic approval, the alert channel and the tolerance for totals.AI: extract fields from document posts the file name to your extraction route and gets the fields back.Accounting: supplier master and Accounting: open purchase orders fetch the two lists, and Merge lookups joins them.Validate: TRN, duplicate, totals, PO match, limit runs the rules, listed below, and sets a status and a list of reasons.Route by status sends AUTO_APPROVE to Accounting: post bill, REVIEW to Review queue: human check and REJECT toSlack: rejected, AP notified.Outcome builds a short answer with the status, the reasons and a bill id, a ticket or an alert flag.Respond 200 (invoice handled) returns it to the caller.On any failure, Error trigger starts Config (errors) and Alert ops (Slack), which posts a message to /alerts.
The rules, each with its code:
Config.Validate: TRN, duplicate, totals, PO match, limit.Outcome and Respond 200 (invoice handled).Alert ops (Slack).application/pdf type, so your servicebase.NOTICE.md 724 B README.md 7 KB workflow.json 18 KB
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
NeoQuasar · Kit
Forecasts financial candlestick series with a 4.1M-parameter foundation model trained on data from over 45 exchanges. For quant researchers and developers who…
An n8n workflow that sends a Hebrew WhatsApp reminder for an unpaid invoice 7, 14 and 30 days after its due date. It reads the open invoices from a Google Shee…
An n8n workflow that files invoices. It watches a Google Drive folder, has LlamaParse read each new file and an OpenAI model pick out the line items. Airtable…