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 reads invoice PDFs from Gmail with a Cradl AI agent you build. A person can check the values it is unsure about, and each invoice line becomes a Google Sheets row.
Gmail invoice PDFs read by Cradl AI into Google Sheets 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.
An unread invoice email
It checks Gmail every minute and starts for each unread email that has an attachment and “invoice” in its subject, and it reads:
One row in Google Sheets for each invoice line, with the values your Cradl AI agent read
What you need before you start.
Invoice source
Collects unread invoice emails with attachments and marks them read.
NeedsA Gmail account connected to n8n
Invoice reading and review
Reads each PDF with your agent, holds uncertain values for a person to review and calls n8n back with the result.
NeedsA Cradl AI account, an agent and the community node
Row storage
Adds one row for each invoice line.
NeedsA Google account and a spreadsheet
Checked by Mindket on 13 Nov 2026
This n8n workflow turns invoice emails into spreadsheet rows. It checks Gmail for unread messages that have an attachment and “invoice” in the subject. It keeps the PDFs and sends each one to a Cradl AI agent that you build in your own account. The run pauses until the agent has answered, which can include a person’s review of values it was unsure about. Each invoice line then becomes a row in Google Sheets. Six nodes run the flow.
Finance and accounts payable teams that receive invoices as PDF attachments and want the lines in a sheet without typing them in. It suits a shared invoices mailbox, with an agent you have set up for your own suppliers. Skip it if your invoices arrive as images, because the Code node keeps only PDFs.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Accounting | Bookkeepers | Move supplier invoice lines into a sheet for coding and posting | A bookkeeper sees every line from the week’s invoices in one tab. |
| Operations | Back-office teams | Log what was bought from each supplier | A team lead checks quantities and prices against the order sheet. |
| Procurement | Purchasing staff | Compare line prices across suppliers | A buyer filters the rows by item to spot a price change. |
| Software | Automation builders | Use it as a start for an extraction flow | A builder swaps the sheet for an accounting tool. |
You need solid n8n for this one: a community node, an n8n address that Cradl AI can reach, an agent built in Cradl AI and a column mapping that you make by hand. The file gives no setup time.
n8n Cloud or a self-hosted n8n can run it, with the Cradl AI community node installed and an address that Cradl AI can reach.
Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Three credentials and one column mapping make it run.
| Need | Detail |
|---|---|
| n8n | A server or an n8n Cloud account that can be reached from the internet, with the Cradl AI community node installed |
| Cradl AI | An account and an agent that reads invoices, with an n8n trigger that gives you a Client ID and a Client Secret |
| Gmail | A Gmail account connected to n8n |
| A Google account and a spreadsheet for the rows |
workflow.json.Extract invoice details with AI, click Set up credential and paste the two values. Then choose your agent under Agent Name or ID.Gmail Trigger, connect your account and check the search filter.Add invoice line to Google Sheets, connect your account, choose the spreadsheet and sheet, and map each column to a value such as {{ $json.line.<field id>.value }}.invoice_lines, put their group id in Split out each invoice line.Send an invoice email to the mailbox, or wait for the next one. Within a minute n8n picks it up, sends the PDF to Cradl AI and pauses. If the agent is unsure, a reviewer checks the values in Cradl AI. When the answer comes back, a row appears in your sheet for each invoice line. Look closely at the first rows before you trust the flow.
| To change | Where |
|---|---|
| Which emails are read | The search filter in Gmail Trigger |
| Which files are kept | Filter PDF attachments |
| Which fields are read and which go to review | Your agent in Cradl AI |
| Where the rows go | Add invoice line to Google Sheets |
A bookkeeper receives an email called Invoice 2201 with a PDF that lists three lines.
Within a minute the workflow sends the PDF to Cradl AI. The agent reads the three lines and is unsure about one amount, so a reviewer corrects it in Cradl AI. The workflow then adds three rows to the sheet, one for each line.
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, hands each PDF to Cradl AI and waits. When Cradl AI answers, it splits the invoice into lines and writes them to Sheets. Run it once on a test email and open each box’s output to follow the data.
For experts. The Cradl AI node waits by putting the run into Waiting and giving Cradl AI a resume address, and its output is the request that Cradl AI sends back.
| Node | What it does | What to know |
|---|---|---|
Gmail Trigger | Polls every minute for unread email that matches has:attachment subject:invoice | It downloads the attachments as attachment_0, attachment_1 and so on |
Filter PDF attachments | Makes one item for each PDF | It sets pairedItem, so Mark a message as read can find the email |
Mark a message as read | Marks the email read straight away | It runs in parallel, so a failed extraction does not bring the email back |
Extract invoice details with AI | Uploads the PDF to your agent and waits | Cradl AI’s call is checked with an HMAC secret, which is the Client Secret unless you set another under advanced options |
Split out each invoice line | Makes one item for each entry in body.output.invoice_lines | Each item keeps the other fields and holds its line under line |
Add invoice line to Google Sheets | Appends a row | It needs a column mapping before it runs |
The workflow sends your invoices to a hosted service, and it marks emails read before the work is done.
Filter PDF attachments on sample items on its own machine{{ $json.line.<field id>.value }}body.output.invoice_lines in the Split Out node has to match your agent’s line item group id, which you read from a test runAn n8n workflow that watches Gmail for invoice emails and sends each PDF attachment to a Cradl AI agent. It waits for the agent's answer, which can include a person's review of the values the agent was unsure about. Then it adds one Google Sheets row for each invoice line.
workflow.json: the workflow as n8n exports it, 10 nodes. 6 of them run and four are sticky notes. It holds no credential.README.md: these notes.Extract invoice details with AI was the original author's own. It is now <YOUR_CRADL_AGENT_ID>, and you choose your agent from the list.Add invoice line to Google Sheets had no spreadsheet. It now holds <YOUR_SPREADSHEET_ID>.Split out each invoice line puts each line under a field called line. Before, it used a field with dots in its name, which is awkward to map.Filter PDF attachments used a loop variable without declaring it and assumed every email had attachments. It also did not tell n8n which email each PDF came from, and Mark a message as read needs that. It now does all three correctly.workflow.json.Extract invoice details with AI and click Set up credential. Paste the two values, then choose your agent under Agent Name or ID.Gmail Trigger, connect your Gmail account and check the search filter. It reads has:attachment subject:invoice for unread email. For a shared mailbox you could add to:<YOUR_INVOICE_ADDRESS>.Add invoice line to Google Sheets. Connect your Google account, choose your spreadsheet and sheet, and map each column. A value comes from {{ $json.line.<field id>.value }}.body.output.<group id>. If your group is not called invoice_lines, put its id in the field of Split out each invoice line.Gmail Trigger checks every minute for unread email that matches the filter, and downloads the attachments.Filter PDF attachments makes one item for each PDF, with its file name.Mark a message as read marks the email read. This happens at once, in parallel with the next step.Extract invoice details with AI uploads the PDF to your agent and pauses the run. When the agent is done, and any review has finished, Cradl AI calls the run's resume address. The node then outputs body, with output and context, and the document as binary data.Split out each invoice line makes one item for each entry in body.output.invoice_lines, keeps the other fields and puts the line under line.Add invoice line to Google Sheets appends each line as a row.Gmail Trigger.Filter PDF attachments. Change "pdf" to keep another type.Add invoice line to Google Sheets. You can swap it for a node that sends them to an accounting tool or a database.Filter PDF attachments on sample items on its own machine.value, rawValue, confidence, page and name, grouped under ids. Use .value for the normalised text and .rawValue for the original.NOTICE.md 718 B README.md 6 KB workflow.json 7 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…