---
title: "Gmail invoice PDFs read by Cradl AI into Google Sheets"
kind: "Kit"
category: "Finance & accounting"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/2f381b9f-55dd-4fb4-a28b-2defe6424542"
updated: "2026-11-12"
---

# Gmail invoice PDFs read by Cradl AI into Google Sheets

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

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.

### Who it suits

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.

Who uses it, and how

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

### Where to use it

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.

- A Gmail mailbox: a shared invoices inbox works best, with a narrower search filter
- Cradl AI: the agent, its fields and its review screen live in your account there
- Google Sheets: one row for each invoice line, mapped from your agent’s fields
- Another destination: replace the Sheets node with a node for an accounting tool or a database

### How to set it up

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.

What you need first

| 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 |
| Google | A Google account and a spreadsheet for the rows |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. In Cradl AI, open your agent, add a trigger and choose n8n. Copy the Client ID and Client Secret from that panel.
3. Open `Extract invoice details with AI`, click Set up credential and paste the two values. Then choose your agent under Agent Name or ID.
4. Open `Gmail Trigger`, connect your account and check the search filter.
5. Open `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 }}`.
6. Run the Gmail trigger once on a test email. Check the Cradl AI node’s output and, if your line items are not under `invoice_lines`, put their group id in `Split out each invoice line`.
7. Save and press Publish at the top of the canvas (or Shift+P).

### How to use it

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.

What to change for a different result

| 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\` |

### Example

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.

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

Where to look closer

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

### Good to know

The workflow sends your invoices to a hosted service, and it marks emails read before the work is done.

- Not run: Mindket made no call to Cradl AI, Gmail or Google. It read Cradl AI’s pages and n8n’s node code, and ran \`Filter PDF attachments\` on sample items on its own machine
- Mapping: the Sheets node stops with an error until you map its columns, with values such as \`{{ $json.line.\<field id\>.value }}\`
- Group id: the field \`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 run
- Marked read early: the email is marked read before Cradl AI answers, so a failed run does not return to the queue
- Waiting runs: a run stays in Waiting until Cradl AI calls back, and your n8n has to be reachable for that
- Learning: Cradl AI’s page says the agent learns from each correction, and that happens inside Cradl AI
- Plans: Cradl AI’s pricing and limits were not checked
- Your data: each PDF goes to Cradl AI’s servers, and invoices can hold names, addresses and bank details
- Credentials: the JSON holds none

## README

```markdown
# Gmail invoice PDFs read by Cradl AI into Google Sheets

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

## What is inside

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

## What we changed from the original copy

- The agent in `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.
- The two settings that node shows by default, the operation and Wait for Results, are now written into the file.
- `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.
- The Code node `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.
- The sticky notes no longer link to the vendor's sign-up and video pages, and they say what each step needs.
- Nothing else. The Gmail filter and the poll every minute are as they were.

## Before you start

- n8n with the Cradl AI community node installed. It is not a node that n8n ships, and its latest version on the npm registry on 12 November 2026 was 1.0.9. Your n8n must also be reachable from the internet, because the node hands Cradl AI a resume address for each run.
- A Cradl AI account and an agent that reads invoices, with at least one test document. Cradl AI's pages describe the agent, the review screen and the n8n setup.
- A Gmail account and a Google account, each connected to n8n with its own credential.
- A Google spreadsheet for the rows. An empty sheet is fine.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. In Cradl AI, open your agent, add a trigger and choose n8n. Copy the Client ID and Client Secret from that panel.
3. Open `Extract invoice details with AI` and click Set up credential. Paste the two values, then choose your agent under Agent Name or ID.
4. Open `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>`.
5. Open `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 }}`.
6. Run the Gmail trigger once with a test email, then open the output of the Cradl AI node. The line items sit under `body.output.<group id>`. If your group is not called `invoice_lines`, put its id in the field of `Split out each invoice line`.
7. Save and press Publish at the top of the canvas (or Shift+P).

## How a run goes

1. `Gmail Trigger` checks every minute for unread email that matches the filter, and downloads the attachments.
2. `Filter PDF attachments` makes one item for each PDF, with its file name.
3. `Mark a message as read` marks the email read. This happens at once, in parallel with the next step.
4. `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.
5. `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`.
6. `Add invoice line to Google Sheets` appends each line as a row.

## Change the look

- Which emails are read: the search filter in `Gmail Trigger`.
- Which files are kept: `Filter PDF attachments`. Change `"pdf"` to keep another type.
- Which fields are read and which values go to review: the agent in your Cradl AI account.
- Where the rows go: `Add invoice line to Google Sheets`. You can swap it for a node that sends them to an accounting tool or a database.

## Good to know

- Not run: Mindket made no call to Cradl AI, Gmail or Google. It read Cradl AI's pages, the Cradl AI node's code at version 1.0.9 and n8n's own node code on 12 November 2026, and it ran `Filter PDF attachments` on sample items on its own machine.
- The Google Sheets node has no column mapping, so it stops with an error until you map the columns in the n8n editor.
- Cradl AI's webhook page shows each field as an object with `value`, `rawValue`, `confidence`, `page` and `name`, grouped under ids. Use `.value` for the normalised text and `.rawValue` for the original.
- The email is marked read before Cradl AI has answered. If a run fails, that email is not tried again, so check failed runs in Executions.
- A run that waits for a result stays in Waiting until Cradl AI calls back, so a long review leaves the run open for that time.
- Cradl AI's page says the agent learns from each human correction to improve the model. The workflow does not do this, because it happens inside Cradl AI.
- Pricing and plan limits for Cradl AI were not checked, so look at your plan before you run it on a mailbox.
- Your data: each PDF goes to Cradl AI's servers, and the rows go to Google. Invoices can hold names, addresses and bank details.
- Credentials: the JSON holds none. Gmail, Google Sheets and Cradl AI each need their own n8n credential.
```

## What is in it

3 files, 14 KB, downloaded as a zip.

```text
NOTICE.md  718 B
README.md  6 KB
workflow.json  7 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 6 steps, starting on a Gmail event
- AI: No step calls an AI model
- Sign-ins: Signs in to: Google Sheets and Gmail
- API keys: No API key is left in the file
- Community nodes: Needs the community node package @cradl/n8n-nodes-cradlai
- Step types: Mindket’s checker reads 4 of its 6 step types. It does not read: Cradl Ai and Gmail

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/2f381b9f-55dd-4fb4-a28b-2defe6424542)
- [Its page on Mindket](https://mindket.com/p/2f381b9f-55dd-4fb4-a28b-2defe6424542)
