FREE N8N TEMPLATE · FINANCE & ADMIN
This n8n workflow watches a Gmail label for supplier invoices, reads the text of each PDF, and uses an AI model to pull out the supplier, ABN, invoice number, dates, GST and line items. It checks the ABN and the totals, then creates a draft bill in Xero. Anything that fails a check, or comes from a supplier not yet in Xero, goes to a review tab and a Slack message instead. Nothing is approved or paid automatically.
- DIFFICULTY
- Intermediate
- SET-UP TIME
- About 60 minutes
- NODES
- 14
- CHECKED AGAINST
- n8n 2.41
- Gmail
- Xero
- OpenAI or Anthropic
- Google Sheets
- Slack
LAST REVIEWED OCTOBER 2026
001 / HOW IT WORKS
Step by step, node by node
01Watch the invoices label in Gmail
The Gmail trigger polls for new emails with a PDF attachment under a label such as supplier-invoices, and downloads the attachments so the workflow can read them.
02Split out each PDF attachment
A Code node creates one item per PDF and keeps the sender, subject, received date and file name alongside it, so emails with several invoices are handled one invoice at a time.
03Read the PDF text
The Extract from File node pulls the text layer out of each PDF. Most invoices generated by accounting software have one. Scanned images with no text are caught later by the confidence check.
04Extract the invoice fields with AI
The Information Extractor node sends the text to your chat model with a fixed schema: supplier name, ABN, invoice number, invoice and due dates, currency, amount excluding GST, GST, total, line items and a confidence rating.
05Check the extraction
A Code node validates the ABN with the official checksum, confirms the subtotal plus GST equals the total, flags GST that looks too high, foreign currency, credit notes, missing fields and anything the model was not confident about.
06Route clean invoices to Xero, others to review
An If node sends invoices that passed every check to Xero. Everything else goes straight to the review queue with the list of reasons attached.
07Find the supplier contact in Xero
The Xero node searches your contacts by name. If no match is found, the invoice is flagged as a new supplier and sent to review rather than creating a contact automatically.
08Create a draft bill in Xero
For a known supplier, the Xero node creates a bill with status Draft, the supplier invoice number, dates, the amount excluding GST and the GST amount on your default expense account. It stays in Draft until someone approves it.
09Log to the invoice register
Each draft bill is appended to a Google Sheet with the supplier, ABN, amounts, file name and Xero bill ID, giving you a simple register to reconcile against Xero.
10Ask a person to review exceptions
Invoices that failed a check or have a new supplier are written to a Needs review tab, and a Slack message tells the bookkeeper what came in and why it needs a human look.
THE REAL WORKFLOW YOU IMPORT · NODE NAMES AS THEY APPEAR IN N8N
002 / WHY IT EXISTS
Keying supplier invoices into Xero is slow, repetitive work. Someone opens each email, downloads the PDF, finds the supplier in Xero, types the invoice number, dates, amounts and GST, and hopes nothing was mistyped. In a busy month that is hours of data entry, and a single transposed digit in a total or a missed GST amount can throw out the BAS.
This template suits small businesses, bookkeepers and practices that receive most bills as PDF attachments. It does the reading and typing, then stops at a draft so the person who approves bills still sees every one in Xero. It is a starting point you can adapt, not a replacement for your approval process or for a review of the GST coding.
WHO IT'S FOR
- →Small business owners who enter their own supplier bills into Xero
- →Bookkeepers managing accounts payable for several clients
- →Finance or admin staff who receive invoices at a shared accounts inbox
- →Practices that want a first draft in Xero but keep a person approving every bill
003 / WHAT YOU NEED
Tick them off as you go. Nothing is saved; it's just a checklist.
004 / SET IT UP
- 01
Import the workflow JSON into n8n and open the Setup Notes sticky note.
- 02
In Gmail, create a label such as supplier-invoices and a filter that applies it to invoice emails. Match the label in the trigger's search query and set a polling interval.
- 03
Create a Xero OAuth2 credential in n8n, then select your organisation in the Find Supplier in Xero and Create Draft Bill in Xero nodes.
- 04
Replace YOUR_EXPENSE_ACCOUNT_CODE with the account code bills should default to, such as your general expenses account. The bookkeeper can recode lines in Xero before approving.
- 05
Create the Google Sheet with Invoice register and Needs review tabs, add the column headers used in the two Sheets nodes, and paste the sheet ID.
- 06
Add your OpenAI credential to the Chat Model node, or replace it with an Anthropic Chat Model connected to Extract Invoice Fields.
- 07
Choose the Slack channel in Ask Bookkeeper to Review.
- 08
Send yourself a few real supplier invoices, run the workflow manually and compare every draft bill against the PDF before activating it.
005 / MAKE IT YOURS
- +Attach the original PDF to the draft bill using an HTTP Request node and Xero's Attachments endpoint, so approvers see the source document in Xero.
- +Write one bill line per extracted line item instead of a single summary line, mapping each to an account code from a supplier lookup sheet.
- +Match suppliers by ABN as well as name by storing the ABN in each Xero contact's tax number field.
- +Check for duplicates by searching Xero for an existing bill with the same supplier and invoice number before creating a new one.
- +Add a Gmail node at the end that labels processed emails, so the inbox shows what has already been handled.
- +Swap the Gmail trigger for a Microsoft Outlook Trigger or a Google Drive folder trigger if invoices arrive another way.
FOR AUSTRALIAN BUSINESSES
Australian tax invoices must show the supplier's ABN, and you generally need a valid tax invoice to claim a GST credit, which is why the workflow checks the ABN checksum and sends missing ones to a person. Draft bills use Xero's Australian tax codes: INPUT (GST on Expenses) when GST is charged and EXEMPTEXPENSES (GST Free Expenses) when it is not. The ATO expects you to keep records, including invoices, for five years, so keep the original PDFs in email or Drive rather than relying on the extracted text. Invoices can contain personal information, such as sole traders' names and addresses. Sending them to an overseas AI API is a cross-border disclosure under APP 8 of the Privacy Act 1988, so check the provider's data terms, and consider self-hosting n8n in an Australian region.
Need it hosted in Australia? →006 / TOOLS IN THIS WORKFLOW
n8n
AUTOMATION & AGENT PLATFORMS
A workflow automation platform that combines a visual node editor with code when you need it. It connects hundreds of apps and APIs and includes AI agent nodes that can call language models, tools and memory. Teams can self-host the free Community Edition on their own servers or use n8n's hosted cloud.
Best for australian organisations that need automation data to stay onshore
Onshore possibleFreemiumIntermediateJAX
Xero · FINANCE & ACCOUNTING TOOLS
Xero's AI assistant, named JAX for Just Ask Xero, built into the Xero accounting platform. Owners, bookkeepers and accountants ask plain-language questions about their business finances and get answers from live ledger data. JAX also helps create invoices and quotes, match bank transactions, capture documents and chase overdue payments.
Best for australian small business owners already using Xero
OffshorePaidBeginnerVic.ai
FINANCE & ACCOUNTING TOOLS
An accounts payable automation platform that uses AI to read invoices, code them to the right accounts, match them to purchase orders, route approvals and pay suppliers. It includes an AP inbox agent, payments and analytics, and connects to mid-market and enterprise ERPs.
Best for mid-sized finance teams processing high invoice volumes
OffshoreEnterpriseIntermediateChatGPT
OpenAI · ASSISTANTS & CHATBOTS
OpenAI's general-purpose AI assistant. It handles writing, coding, file and image analysis, data analysis and web research through a chat interface, with an API for building it into your own systems.
Best for small and mid-sized teams wanting one general assistant for everyday writing and analysis
AU optionFreemiumBeginner
MORE TEMPLATES
All templates →- 15 NODES
FINANCE & ADMIN
Tiered Overdue Invoice Reminders from Xero
XeroGmailGoogle SheetsSlackIntermediate~45 minutes→ - 9 NODESAI
FINANCE & ADMIN
File Email Attachments into Google Drive with AI
GmailOpenAI or AnthropicGoogle DriveGoogle SheetsBeginner~40 minutes→ - 12 NODESAI
SALES & LEADS
Speed to Lead: AI Lead Qualification from Website Form to HubSpot
WebhookOpenAI or AnthropicHubSpotGmailIntermediate~45 minutes→
007 / QUESTIONS
Anything else is quicker to answer on a call. Thirty minutes, free, with the people who would build it.
No. The Xero node creates bills with the status Draft only. A person still has to open each bill in Xero, check the coding and GST, and approve it before it appears in payment runs. Nothing in the workflow touches payments or bank feeds.
We set up n8n end to end: hosting in Australia, connecting your systems, testing with real data and handing over documentation.
Book a free call→