Nanosaur2-670M
well9472 · Kit
Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…
An n8n workflow that reads invoice PDFs from Gmail with LlamaParse, asks an OpenAI model to pull out the fields and adds a row to Google Sheets. It then labels the email as done.
Invoice PDFs from Gmail read by LlamaParse and OpenAI 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 new invoice email
It checks Gmail every minute and starts for each new email from the chosen sender that has an attachment, and it reads:
One row in Google Sheets for each invoice, and the email labelled as done
What you need before you start.
Invoice source
Delivers the invoice emails with their PDFs, then receives the label that marks them as done.
NeedsA Gmail account connected to n8n and a label called “invoice synced”
PDF reading
Turns the PDF into markdown, tables included.
NeedsA LlamaCloud account and an API key, with credits for each page
Field extraction
Reads the markdown and returns the invoice fields in a fixed shape.
NeedsAn OpenAI account and an API key
Row storage
Adds one row for each invoice.
NeedsA Google account and a spreadsheet with matching column titles
Checked by Mindket on 13 Nov 2026
This n8n workflow turns invoice PDFs from Gmail into spreadsheet rows. It watches for emails from a sender you choose that carry an attachment, and it sends the PDF to LlamaParse to be turned into markdown. An OpenAI model then pulls out the invoice fields, such as the supplier, the dates, the line items and the totals. The workflow adds them to Google Sheets and labels the email, so that it is not handled twice. Eighteen nodes run the flow.
Finance and accounts payable teams that get invoices as PDF attachments from a few regular suppliers and want the details in a sheet. It suits invoices with tables of line items, which simple text extraction often flattens. Skip it if invoices arrive as images in the email body, because only the first attachment is read.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Accounting | Bookkeepers | Log supplier invoices with their line items for posting | A bookkeeper checks each new row against the invoice before posting. |
| Operations | Back-office teams | Keep a running list of what each supplier billed | A team lead filters the sheet by supplier to see the month’s charges. |
| Procurement | Purchasing staff | Match invoices to purchase order numbers | A buyer finds each purchase order number in the sheet. |
| Software | Automation builders | Use it as a starting point for document extraction | A builder swaps the sheet for an accounting tool. |
You need solid n8n for this one: four credentials, a Gmail label, a sheet with matching column titles and a job check that loops until the job ends. The file gives no setup time.
n8n Cloud or a self-hosted n8n can run it, with accounts at LlamaParse, OpenAI, Gmail and Google.
Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Four credentials and a prepared sheet make it run.
| Need | Detail |
|---|---|
| n8n | A server or an n8n Cloud account |
| LlamaParse | A LlamaCloud account and an API key |
| OpenAI | An account and an API key |
| Gmail | A Gmail account with a label called invoice synced |
| A spreadsheet whose first row holds the 14 field names |
invoice synced.workflow.json.Authorization and the value Bearer followed by your key. Choose it in the three LlamaParse nodes.OpenAI Model and connect your OpenAI account.Receiving Invoices, connect Gmail and replace <SUPPLIER_EMAIL_ADDRESS> with the sender’s address.Add "invoice synced" Label, choose your label.Append to Reconciliation Sheet, connect your Google account and choose the spreadsheet and sheet.Wait for the next invoice email from that sender, or run the workflow on a recent one. Within a minute n8n picks it up, sends the PDF to LlamaParse and waits for the job. The model then reads the markdown, a row appears in your sheet and the email gets the label. Compare the first rows with the invoices before you trust the flow.
| To change | Where |
|---|---|
| Which emails are read | The filters in Receiving Invoices |
| Which fields are extracted | The prompt in Apply Data Extraction Rules, the schema in Structured Output Parser and the sheet’s column titles |
| Which model reads the invoice | OpenAI Model |
| How the PDF is parsed | The configuration field in Upload to LlamaParse |
| Where the rows go | Append to Reconciliation Sheet |
A supplier emails invoice 4471 as a PDF with five line items and a purchase order number.
Within a minute the workflow sends the PDF to LlamaParse and waits until the job is done. The model reads the markdown and returns the supplier, the dates, the purchase order number and the totals. One row is added to the sheet, with the five line items in one cell, and the email gets the label invoice synced.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one reads Gmail, sends the PDF to a reading service and checks again until the job is done. Then it asks an AI model for the fields and writes them to a sheet. Run it on one email and open each box’s output to follow the data.
For experts. LlamaParse is called with plain HTTP Request nodes on its v2 API, and the AI step is a basic chain with a structured output parser, not an agent.
| Node | What it does | What to know |
|---|---|---|
Receiving Invoices | Polls every minute for new email with an attachment from one sender | It downloads the attachments as attachment_0, attachment_1 and so on |
Email with Label Names | Joins each email with the names of its labels | Combine Label Names pools the names from every email in the poll into one list |
Upload to LlamaParse | Posts the first attachment to /api/v2/parse/upload | The configuration field is a JSON string with a tier and a version |
Is Job Ready? | Routes on job.status | COMPLETED moves on, FAILED and CANCELLED stop with an error, and PENDING and RUNNING wait a second and ask again |
Get Parsed Invoice Data | Fetches the job with expand=markdown_full | The answer holds the whole document as one string |
Apply Data Extraction Rules | A basic LLM chain with a structured output parser | The prompt carries the field list, and the model is gpt-6-luna |
Append to Reconciliation Sheet | Appends a row by matching field names to column titles | An object such as the line items is written to its cell as JSON text |
The workflow spends LlamaParse credits on every PDF and sends invoices to two outside services.
Should Process Email? skips itAn n8n workflow that watches Gmail for invoice emails with a PDF. It turns the PDF into markdown with LlamaParse, asks an OpenAI model to pull out the invoice fields and adds them as a row in Google Sheets. Then it labels the email, so the same one is not handled twice.
workflow.json: the workflow as n8n exports it, 27 nodes. 18 of them run and nine are sticky notes. It holds no credential.README.md: these notes.cost_effective. LlamaParse's migration page says v1 still works for the foreseeable future, and that new features are v2 only.job.status and knows the v2 states. RUNNING joins PENDING on the waiting branch. FAILED and CANCELLED now go to a new node, Stop on parse failure, so a failed job shows as an error. Before, they led nowhere.expand=markdown_full, and the prompt reads that field.gpt-3.5-turbo-1106. OpenAI's deprecations page, read on 12 November 2026, lists that model as shut down on 28 September 2026. The node is now the OpenAI Chat Model with gpt-6-luna.gpt-6-luna says nothing about a temperature setting.<SUPPLIER_EMAIL_ADDRESS>, <YOUR_INVOICE_SYNCED_LABEL_ID> and <YOUR_SPREADSHEET_ID>.cost_effective tier at 3 credits a page, so that is about 3,300 pages.invoice synced, and a Google spreadsheet.Structured Output Parser exactly, so open that node and copy them from its schema.invoice synced.workflow.json.Authorization and the value Bearer followed by your key. Choose it in Upload to LlamaParse, Get Processing Status and Get Parsed Invoice Data.OpenAI Model and connect your OpenAI account. Keep gpt-6-luna or pick another chat model.Receiving Invoices, connect your Gmail account and replace <SUPPLIER_EMAIL_ADDRESS> with the sender's address. Use the same account in Get Labels Names and Add "invoice synced" Label.Add "invoice synced" Label, choose your invoice synced label.Append to Reconciliation Sheet, connect your Google account and choose your spreadsheet and sheet.Receiving Invoices checks every minute for new email from that sender with an attachment, and downloads the attachments.Split Out Labels, Get Labels Names, Combine Label Names and Email with Label Names look up the names of the email's labels and attach them to it.Should Process Email? lets the email through when its first attachment is a PDF and its labels do not include invoice synced.Upload to LlamaParse sends that attachment with the tier cost_effective and gets a job id back.Get Processing Status asks for the job, and Is Job Ready? routes it. A finished job moves on, a failed or cancelled one stops, and a pending or running one goes to Wait to stay within service limits, which waits a second and asks again.Get Parsed Invoice Data fetches the whole document as one markdown string.Apply Data Extraction Rules gives the markdown and the field list to the model, and Structured Output Parser shapes the answer.Map Output keeps the parsed object. Append to Reconciliation Sheet adds one row, and Add "invoice synced" Label labels the email.Receiving Invoices.Apply Data Extraction Rules, the schema in Structured Output Parser and the column titles in your sheet.OpenAI Model.configuration field in Upload to LlamaParse. LlamaParse's tiers page lists fast, cost_effective, agentic and agentic_plus, and advises pinning a dated version for production.Append to Reconciliation Sheet. You can swap it for an accounting tool or a database.Should Process Email? skips it.NOTICE.md 642 B README.md 6 KB workflow.json 29 KB
well9472 · Kit
Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…
Waqf-AI · Kit
Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.
Wan-AI · Kit
Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.
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…