On this page
- Start with one intake route and one finish point
- The safer n8n invoice workflow
- 1. Capture and preserve the original
- 2. Extract the invoice details
- 3. Validate the business rules
- 4. Check the supplier and possible duplicates
- 5. Route uncertain cases to human review
- 6. Sync only the approved record
- A concrete first-release example
- Security and retention belong in the design
- Monitor the work, not just whether n8n is running
- Implementation checklist
- Sources
Your accounts team receives supplier invoices by email, shared folders and sometimes WhatsApp, then retypes the same details into accounting software. If you own a Malaysian business with 10–100 staff, this guide to automating invoices with n8n shows what a safe first workflow should do, what still needs human judgement and what to ask an implementer to build.
The goal is not to remove people from finance. It is to move routine invoices into a clear review queue, while duplicates, unknown suppliers, changed bank details and uncertain figures remain visible.

Start with one intake route and one finish point
Do not begin by connecting every inbox, branch and chat channel. Choose the place where most supplier invoices already arrive. For many businesses, that is a dedicated address such as accounts@company.com. A shared upload folder or simple form can work too.
n8n can watch an email mailbox and download attachments. It can also receive files from other approved sources. The first version should accept only the file types your team expects, reject oversized or password-protected files, and keep the original document linked to the work item.
Give every arrival a processing reference that follows it through review and into accounting. This makes a failed or repeated run easier to investigate.
Agree on the finish point before building. “The PDF was read” is not enough. A useful finish point might be:
A draft supplier bill exists in the accounting system, the original document is attached or linked, and the workflow records whether a person approved it.
If the current process is still inconsistent, first use our guide to choosing a ready-made tool, custom software or an AI agent. A clearer process or an existing accounts-payable feature may solve the problem without a custom n8n workflow.
The safer n8n invoice workflow
A reliable design separates extraction from approval. The automation may read and check an invoice, but it should not treat every extracted value as true.

1. Capture and preserve the original
The workflow receives the invoice and checks basic file rules. It stores the original in an approved location, then creates a work item containing the processing reference, source, arrival time and file location.
Keep the original unchanged. If somebody later corrects the supplier name or total, you need to compare the correction with what was actually received.
For WhatsApp invoices, use a business-controlled upload route or dedicated business channel instead of mixing personal chats with finance work.
2. Extract the invoice details
A digital PDF may already contain selectable text. n8n’s Extract From File node can extract content from PDF files, while scanned PDFs and phone photos usually need an optical character recognition service to turn the image into readable text.
The extraction step should return only the fields your process uses, such as:
- supplier name and registration or tax identifier where available
- invoice number and invoice date
- currency, subtotal, tax and total
- purchase order or delivery reference
- bank details when they are needed for a controlled check
Poor scans, unusual layouts, handwritten notes and mixed languages can produce uncertain fields. Keep each extracted value and the original document together for review.
3. Validate the business rules
Validation asks whether the extracted information is usable. The rules depend on your accounting process, but common checks include:
- required fields are present
- invoice date is plausible
- total is positive and the arithmetic is consistent
- currency is supported
- purchase order is present when policy requires one
- supplier and invoice number are in the expected format
A failed check should create a clear reason such as “invoice number missing” or “total does not match line amounts.” It should not disappear into a technical error log.
Use your accountant to confirm tax treatment, required records and posting rules. This workflow guide is not accounting or tax advice.
4. Check the supplier and possible duplicates
Match the supplier against the approved vendor list before creating anything in accounting. Unknown suppliers should go to a person. A changed bank account should always receive careful review through the business’s established verification process; an emailed bank-detail change should never be trusted only because it appeared on an invoice.
For duplicates, start with supplier identifier plus invoice number. Flag weaker matches such as the same supplier, date and total for review, not automatic rejection.
The workflow should search both the review queue and the accounting system. Otherwise, the same invoice may pass once while pending and again after it has been posted.
5. Route uncertain cases to human review
Create a review queue that shows the original invoice beside the extracted fields and failed checks. The reviewer should be able to approve, correct or reject the item and leave a reason.
Send invoices for review when:
- a required value is missing or uncertain
- the supplier is new or unmatched
- a duplicate check finds a possible match
- bank details differ
- the value exceeds your chosen approval limit
- a purchase order or receipt cannot be matched
- tax or currency treatment is unclear
For a small first release, review every invoice. After the team has measured error patterns and trusts the rules, it can decide whether a narrow group of routine invoices may proceed with less intervention. Our guide to human review in AI workflows explains how to keep responsibility clear as automation expands.
For your IT person: use a unique processing reference for each received file, and check for an existing accounting entry before every create action. Separate the extraction, validation, review and posting steps so a retry does not create a second bill. Configure an n8n error workflow to alert an owner when a run fails. Store service credentials in n8n’s credential store, protect and back up the encryption key for self-hosted deployments, and limit how much invoice content is retained in execution history.

6. Sync only the approved record
After approval, create a draft supplier bill or equivalent entry in the accounting system. Map each field deliberately. Do not assume two systems use dates, currencies, tax codes or supplier references in the same way.
Wait for a confirmed response from the accounting system, save the returned record number, and only then mark the work item as synced. If the connection fails, keep the item pending and alert the owner. A green “sent” message before confirmation can hide missing entries.
This invoice-intake workflow is also separate from Malaysia’s MyInvois submission process. LHDN describes MyInvois as a system for taxpayers to submit issued documents and receive related events. If your business also needs e-Invoice integration, map that obligation separately with your accountant and use the current official guidance. Our Malaysia e-Invoice automation guide covers those connection points without turning supplier invoice capture into tax advice.
A concrete first-release example
Imagine a 35-person Malaysian distributor receiving about 20 supplier invoices a day by email. This is an example, not a Dreamcode client result.
The first release watches one finance inbox, stores PDF originals, extracts six agreed fields and checks the supplier list. One finance reviewer sees every invoice, with possible duplicates, unmatched suppliers and changed bank details highlighted. Approved items become draft bills; rejected items retain a reason.
The first release does not read WhatsApp, approve payments, create new suppliers or decide tax treatment. Those boundaries make the workflow easier to test and safer to operate.
Security and retention belong in the design
Supplier invoices can contain names, addresses, bank details and other business or personal information. Malaysia’s Personal Data Protection Department lists security, storage and data integrity among the principles for handling personal data. Check your situation with a lawyer where needed.
Before choosing an OCR or document service, ask where files are processed, how long they are retained, who can access them and whether your data is used to improve a shared model. Send only the pages and fields required for the job.
Limit access to the mailbox, document store, review queue, n8n and accounting connection. Remove access when roles change and keep an audit trail of approvals and corrections.
n8n can retain execution information for debugging. Configure it to save only what operations genuinely need and prune old records. A long history full of complete invoice contents creates avoidable exposure as well as storage cost.
Monitor the work, not just whether n8n is running
A workflow can stay online while invoices wait unnoticed. Review a simple daily view showing:
- invoices received
- items waiting for review and the age of the oldest
- approved, rejected and synced counts
- extraction or validation failures by reason
- possible duplicates
- failed accounting connections
- items that arrived but never reached a final status
Choose one owner for these checks. Alerts should identify the invoice, failure and next action. Test recovery with safe samples.

Implementation checklist
Use this checklist when briefing an n8n implementer:
- Name the first intake route and accepted file types.
- Define where unchanged originals are stored.
- List the fields to extract and who confirms them.
- Provide a controlled set of normal, poor-quality and unusual sample invoices.
- Write the validation rules in plain language.
- Define approved-vendor matching and bank-detail change handling.
- Define strong and warning-level duplicate checks.
- Choose which cases always need human review.
- Decide who can approve, correct and reject.
- Map approved fields to a draft accounting entry.
- Require confirmation before marking an item as synced.
- Set failure alerts, queue monitoring and a recovery owner.
- Decide access, retention, deletion and audit requirements.
- Test repeated runs, service outages and corrected invoices.
- Compare the new process with a measured manual baseline before expanding it.
First, follow ten real supplier invoices from arrival to accounting entry. Mark every check, correction and exception; this reveals whether n8n is needed or your accounting software already does enough.
If you want help turning those ten invoices into a safe first workflow, book a free consultation with Dreamcode.
Sources
- n8n Email Trigger (IMAP) documentation — mailbox intake and attachment handling; checked 19 October 2026.
- n8n Extract From File documentation — PDF and other file extraction; checked 19 October 2026.
- n8n If node documentation — conditional validation branches; checked 19 October 2026.
- n8n error-handling documentation — error workflows and execution investigation; checked 19 October 2026.
- n8n credential encryption-key documentation — credential encryption for self-hosted n8n; checked 19 October 2026.
- n8n execution-data documentation — saved execution settings and pruning; checked 19 October 2026.
- Google Cloud Enterprise Document OCR documentation — text extraction from PDFs and scanned document images; checked 19 October 2026.
- LHDN MyInvois SDK — official description of MyInvois and ERP integration; checked 19 October 2026.
- Malaysia Personal Data Protection Department: Principles of Personal Data Protection — security, storage and data integrity principles; checked 19 October 2026.