Mindket

Gmail invoice PDFs read by Cradl AI into Google Sheets

Newversion 1 · updated

Overview

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.

At a glance

Runs in
  • 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

Platform

Connects 3 apps

How it works

Trigger

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:

  • The email
  • Its attachments, of which the PDFs are kept

Actions

  1. A Code node keeps only the PDF attachments and makes one item for each
  2. The email is marked as read
  3. Each PDF is sent to a Cradl AI agent, and the run waits until the agent has answered, including any human review
  4. The invoice is split into one item for each line
  5. Each line is added to Google Sheets as a row

Result

One row in Google Sheets for each invoice line, with the values your Cradl AI agent read

Integrations

What you need before you start.

Gmail

Invoice source

Collects unread invoice emails with attachments and marks them read.

NeedsA Gmail account connected to n8n

Cradl AI

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

Google Sheets

Row storage

Adds one row for each invoice line.

NeedsA Google account and a spreadsheet

Workflow check

Checked by Mindket on 13 Nov 2026

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

Read from the workflow’s file, not from a run.

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
IndustryWho uses itHow they use itExample
AccountingBookkeepersMove supplier invoice lines into a sheet for coding and postingA bookkeeper sees every line from the week’s invoices in one tab.
OperationsBack-office teamsLog what was bought from each supplierA team lead checks quantities and prices against the order sheet.
ProcurementPurchasing staffCompare line prices across suppliersA buyer filters the rows by item to spot a price change.
SoftwareAutomation buildersUse it as a start for an extraction flowA 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

Setup

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
NeedDetail
n8nA server or an n8n Cloud account that can be reached from the internet, with the Cradl AI community node installed
Cradl AIAn account and an agent that reads invoices, with an n8n trigger that gives you a Client ID and a Client Secret
GmailA Gmail account connected to n8n
GoogleA 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 changeWhere
Which emails are readThe search filter in Gmail Trigger
Which files are keptFilter PDF attachments
Which fields are read and which go to reviewYour agent in Cradl AI
Where the rows goAdd 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
NodeWhat it doesWhat to know
Gmail TriggerPolls every minute for unread email that matches has:attachment subject:invoiceIt downloads the attachments as attachment_0, attachment_1 and so on
Filter PDF attachmentsMakes one item for each PDFIt sets pairedItem, so Mark a message as read can find the email
Mark a message as readMarks the email read straight awayIt runs in parallel, so a failed extraction does not bring the email back
Extract invoice details with AIUploads the PDF to your agent and waitsCradl 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 lineMakes one item for each entry in body.output.invoice_linesEach item keeps the other fields and holds its line under line
Add invoice line to Google SheetsAppends a rowIt 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 and files

README

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.
Files
NOTICE.md  718 B
README.md  6 KB
workflow.json  7 KB

3 files, 14 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

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…

New29.4k

Guizang PPT Skill

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…

New29.8k

Claude Code Skills & Plugins

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…

New29.8k

Similar in Finance & accounting

See all in Finance & accounting

Kronos-mini

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…

New