Mindket

Supplier invoice checks and routing over your own REST APIs

Newversion 1 · updated

Overview

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.

At a glance

Runs in
  • n8n Cloud or your own server: every node in it is one that n8n ships
  • Your own API: it must answer the six routes listed in the setup notes
  • Another system: swap any HTTP request for the native n8n node of your accounting, ticket or chat tool
  • A mailbox or a form: point it at the webhook, and it sends the file name of each invoice

Platform

Connects 1 app

How it works

Trigger

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:

  • The file name of a supplier invoice

Actions

  1. Your extraction route returns the supplier, TRN, invoice number, date, subtotal, VAT, total and lines of the document
  2. The supplier list and the open purchase orders are fetched and joined
  3. A Code node runs nine rules and sets AUTO_APPROVE, REVIEW or REJECT with a reason code for each
  4. A clean invoice posts a bill, a doubtful one opens a review ticket and a rejected one alerts accounts payable
  5. The webhook is answered with the status, the reasons and the bill id, ticket or alert flag
  6. A failed run sends an alert to an operations channel

Result

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

Integrations

What you need before you start.

Your own REST API

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

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
16 steps, starting when its webhook is called or on its trigger node
AI
No step calls an AI model
Sign-ins
No sign-in
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 8 of its step types

Read from the workflow’s file, not from a run.

About

What it is

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.

Who it suits

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.

Who uses it, and how
IndustryWho uses itHow they use itExample
FinanceAccounts payable teamsCheck each supplier invoice before a bill is postedA clerk sees an invoice with a wrong total land in the review queue with its reason.
AccountingBookkeeping firmsApply the same rules to every client’s invoicesA firm points the workflow at each client’s system and keeps one set of rules.
OperationsFinance operationsStop duplicate and over-limit invoices earlyAn invoice sent twice is rejected the second time with the code V-01.
SoftwareIntegration developersStart from a tested routing pattern and swap in real systemsA 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.

Where to use it

n8n Cloud or a self-hosted n8n will run it, with an API of your own that the workflow can reach over HTTPS.

  • n8n Cloud or your own server: every node in it is one that n8n ships
  • Your own API: it must answer the six routes listed in the setup notes
  • Another system: swap any HTTP request for the native n8n node of your accounting, ticket or chat tool
  • A mailbox or a form: point it at the webhook, and it sends the file name of each invoice

Setup

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.

What you need first
NeedDetail
n8nAn account on n8n Cloud or a server of your own
Extraction routePOST /documents/extract, which returns the fields of the invoice
Accounting routesGET /accounting/suppliers, GET /accounting/purchase_orders and POST /accounting/bills
Review and alert routesPOST /review/queue and POST /alerts
A senderA mailbox rule, a Drive watcher or a form that posts to the webhook
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Open 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).
  3. Add the sign-in your API needs to each of the six HTTP Request nodes, or replace them with other nodes of your own.
  4. Open the Code node Validate: TRN, duplicate, totals, PO match, limit and check the rules, the VAT rate, the TRN length, the confidence floor and the AED limits.
  5. Save, press Publish at the top of the canvas (or Shift+P) and copy the webhook URL. Point your mailbox or form at it, and keep the URL private.
  6. In the workflow’s settings, choose this workflow as its error workflow, so that a failed run sends an alert.
  7. Try a correct invoice first and then one whose total is off, and read the answer for each.

How to use it

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.

What to change for a different result
To changeWhere
The limits and the alert channelConfig
Any rule, the VAT rate or the TRN lengthThe Code node Validate: TRN, duplicate, totals, PO match, limit
The systems behind the routesThe HTTP Request nodes, or other nodes in their place
What the caller gets backOutcome and Respond 200 (invoice handled)
Where failures goAlert ops (Slack)

Example

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.

For newcomers and experts

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.

Where to look closer
NodeWhat it doesWhat to know
AI: extract fields from documentHTTP Request that posts the file name and a fixed application/pdf typeYour service must find the file by name, and every file is treated as a PDF
Merge lookupsJoins the supplier list and the purchase ordersThe Code node reads each list from its own node, not from the merged items
Validate: TRN, duplicate, totals, PO match, limitRuns the rules V-00 to V-09 and sets a status and reasonsA TRN of 15 digits, a VAT rate of 5% and AED limits are written into it
Route by statusA Switch with the outputs AUTO_APPROVE, REVIEW and REJECTEach output goes to one HTTP Request, and all three meet again in Outcome
Error triggerStarts an alert when a run failsNeeds this workflow set as its own error workflow

Good to know

The workflow posts bills on its own when every rule passes, and it extracts nothing by itself.

  • Not run: Mindket made no call to any API. It ran the validation code on sample invoices on its own machine and checked each rule
  • No extraction inside: the extraction route receives only a file name and a fixed application/pdf type, so your service must find the file by name
  • Built-in values: the TRN length, the VAT rate and the AED limits are in the code, so change them for your country
  • Duplicates: the list sits in the workflow’s static data. According to n8n’s documentation, static data is not saved when you run a workflow by hand, only for a published workflow that a trigger or webhook runs. The list never shrinks
  • Review: an invoice sent to review counts as seen, so sending it again after a fix is rejected as a duplicate
  • Webhook: it has no authentication, so anyone who learns the URL can send file names and cause bills to be posted
  • Automatic posting: a bill is posted as soon as every rule passes, so try it on a test system first
  • Error workflow: n8n’s documentation describes an error workflow as one that starts with the Error Trigger, and it does not say whether a workflow may name itself. Make one run fail to test it
  • Your data: the file name and the invoice fields go only to the API you put in base
  • Credentials: the JSON holds none

README and files

README

Supplier invoice checks and routing over your own REST APIs

An 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.

What is inside

  • 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.

What we changed from the original copy

  • The address https://api.your-company.example in both Config nodes is now https://<YOUR_API_HOST>.
  • The two sticky notes no longer name the template's author or link to its site. They also no longer say the extraction step can call a
    model at base/llm/complete, because the step calls base/documents/extract. The notes now say what the nodes do, and ask you to save and press
    Publish instead of "Activate".
  • Nothing else. The rules, the thresholds and the routing are as they were.

Before you start

  • An n8n instance, on n8n Cloud or your own server. The original's note asks for n8n 1.100 or later.
  • An API that answers the six routes below, or other n8n nodes that reach your systems.
  • A mailbox rule, a Drive watcher or an upload form that can send a POST to the webhook.
  • A few invoices to try.

The routes the workflow calls

Each 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,
    date, trn, subtotal, vat, total, currency, confidence, line_items: [{ amount }] } }`.
  • 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.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Open Config and replace <YOUR_API_HOST> in base with your API's host. Check auto_approve_limit, ap_channel and
    total_tolerance. Do the same for base in Config (errors).
  3. Add the authentication your API needs to each of the six HTTP Request nodes, or replace them with the nodes of your own systems.
  4. Open the Code node Validate: TRN, duplicate, totals, PO match, limit and check the rules. The VAT rate is 5%, a TRN must have 15
    digits, the confidence floor is 0.9, and the limits are in AED.
  5. Save, press Publish at the top of the canvas (or Shift+P), and copy the Webhook URL. Point your mailbox or upload form at it. Anyone who has the URL can post to it,
    so keep it private.
  6. In the workflow's settings, choose this workflow as the error workflow so that Error trigger sends an alert when a run fails.
  7. Try a correct invoice first and then one whose total is off, and read the answer for each.

How a run goes

  1. Webhook: invoice received (email, drive or upload) takes a POST with a file_name in its body.
  2. Config adds the base address, the limit for automatic approval, the alert channel and the tolerance for totals.
  3. AI: extract fields from document posts the file name to your extraction route and gets the fields back.
  4. Accounting: supplier master and Accounting: open purchase orders fetch the two lists, and Merge lookups joins them.
  5. Validate: TRN, duplicate, totals, PO match, limit runs the rules, listed below, and sets a status and a list of reasons.
  6. Route by status sends AUTO_APPROVE to Accounting: post bill, REVIEW to Review queue: human check and REJECT to
    Slack: rejected, AP notified.
  7. Outcome builds a short answer with the status, the reasons and a bill id, a ticket or an alert flag.
  8. 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:

  • V-00: the supplier or the invoice number is missing. Review.
  • V-01: the same supplier and invoice number were seen before. Reject.
  • V-02: the supplier is not in the master. Review.
  • V-03 and V-04: the TRN is not 15 digits, or differs from the master. Reject.
  • V-05: the lines do not add up to the subtotal, within the tolerance. Review.
  • V-06: the total is not the subtotal plus 5%, within the tolerance. Review.
  • V-07: the extraction confidence is below 0.9. Review.
  • V-08: the total is over the automatic approval limit and no purchase order matches. Review.
  • V-09: the total is over the supplier's own limit and no purchase order matches. Review.

Change the look

  • The limits and the alert channel: Config.
  • Any rule, the VAT rate, the TRN length or the confidence floor: the Code node Validate: TRN, duplicate, totals, PO match, limit.
  • The routes and the systems behind them: the HTTP Request nodes, or your own nodes in their place.
  • What the caller gets back: Outcome and Respond 200 (invoice handled).
  • Where failures go: Alert ops (Slack).

Good to know

  • Not run: Mindket made no call to any API. It ran the validation code on sample invoices on its own machine and checked each rule above.
  • Nothing extracts anything by itself. The extraction route receives only a file name and a fixed application/pdf type, so your service
    must be able to find the file by name, and every file is treated as a PDF.
  • The TRN length, the VAT rate and the AED limits are built into the code. Change them for your country before you rely on the checks.
  • The duplicate check keeps its list in the workflow's static data. According to n8n's documentation, static data is not saved when you
    run a workflow by hand, only for a published workflow that a trigger or webhook runs. The list also never shrinks.
  • An invoice sent to review counts as seen. Sending it again after a fix is rejected as a duplicate, so correct it in your review queue.
  • The webhook has no authentication. Anyone who learns the URL can send file names and cause bills to be posted, so protect it.
  • Posting a bill is automatic when every rule passes. Run it against a test system first.
  • The error workflow setting: n8n's documentation describes an error workflow as one that starts with the Error Trigger. It does not say
    whether a workflow may name itself, so make one run fail to test it.
  • Your data: the file name and the invoice fields go only to the API you put in base.
  • Credentials: the JSON holds none.
Files
NOTICE.md  724 B
README.md  7 KB
workflow.json  18 KB

3 files, 26 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

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…

New29.4k

Guizang PPT Skill

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…

New29.8k

Claude Code Skills & Plugins

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…

New29.8k

Similar in Finance & accounting

See all in Finance & accounting

Kronos-mini

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…

New