
Build log: an AI invoice-processing workflow in n8n that writes to Airtable
This guide is assembled from official documentation and vendor pricing pages — we did not run this build ourselves. Every price, limit and node setting links to the page it came from, read on 2026-11-07.
Build Log: An AI Invoice-Processing Workflow in n8n (Airtable + schema-locked extraction)
An AI invoice-processing workflow in n8n can move from a Google Drive file to a schema-locked JSON record in Airtable, with a human alert when extraction is incomplete or malformed. At about 1,000 invoices a month, the n8n plan costs more than model tokens for the two cheaper options and reaches parity with the most expensive option only after its 2026-11-30 price step, so the durable defense is a portable schema and portable data rather than a clever prompt. This is a documented design review, not a test log, assembled from official documentation and community reports. For a comparable pipeline, see our lead-enrichment build log; pricing references below come from n8n’s pricing page.
How This Guide Was Built
This guide is assembled from official documentation and community reports — we did not run this build ourselves. The evidence base is n8n’s official documentation and pricing page plus the OpenAI and Google pricing pages, all fetched on 2026-11-07; where a behaviour is not documented, it is marked as our design choice instead of being presented as fact. See n8n docs and n8n community.
What this workflow does, node by node
This workflow moves a Drive file through PDF text extraction, schema-locked JSON extraction, an Airtable row, and a human alert when fields are missing or malformed; every capability claim below is tied to official node documentation, while design decisions are tagged separately. Information Extractor docs.
The chain is Google Drive file pickup, Extract From PDF, the Information Extractor producing schema-locked JSON, Airtable row creation, and an alert branch for uncertain extractions. The chain is cheap to describe and the cost comes from how often it runs, not from how many nodes it contains.
What counts as one run
What counts as one run is defined by n8n as a single execution of the whole workflow: n8n states that “An execution is a single run of your entire workflow. It doesn’t matter how many steps are in the workflow or how much data it processes. It’s still a single execution.” n8n pricing. The consequence is that 1,000 invoices are about 1,000 executions before retries or error runs, and the free trial’s 1,000-execution cap leaves zero headroom at that volume. Error workflows are listed as included on Starter, Pro, and Enterprise, so a failed run can still trigger an alert without a separate plan. Error handling docs.
Getting invoice text: Google Drive and Extract From PDF
Google Drive supplies the file and Extract From PDF turns it into text: the Drive node documents eight file operations plus File/Folder Search and folder and shared-drive operations, of which this pipeline needs four — Download, Search, Update, and Move — while Extract From PDF reads the binary field that defaults to data and has no Destination Output Field for PDFs. Google Drive node docs; Extract From File docs.
The Google Drive node’s documented file operations are Copy, Create from text, Delete, Download, Move, Share, Update, and Upload, with File/Folder Search and separate folder and shared-drive operations; for this pipeline the relevant four are Download, Search, Update, and Move. Google Drive node docs. A folder-watch intake therefore needs no extra tool. Google Drive developers. Credentials are covered in n8n’s Google credentials guide. Google credentials guide.
Extract From PDF is one operation of the Extract From File node, which extracts data from a binary format file and converts it to JSON. Extract From File docs. Its Input Binary Field defaults to data, and Destination Output Field exists only for JSON, ICS, Text File, and Base64 operations, not PDF. Extract From File docs. If a file arrives by webhook, the Webhook node’s Raw body option must be turned on. Webhook docs.
Scanned invoices are routed to a vision-capable model instead of the text path; that routing is our design choice. The only evidence we rely on for image input is the image-token lines in the pricing tables for the named models, and no accuracy claim is made for either text or image extraction. OpenAI pricing; Gemini pricing; Gemini image understanding. Whether pickup runs as a scheduled Search or from an event trigger is our design choice, and the credentials step comes before either. Google Drive node docs.
Schema-locked extraction with the Information Extractor
The Information Extractor turns invoice text into schema-locked JSON: its Text parameter is usually an expression such as {{ $json.text }} fed by a preceding Extract From PDF, and Schema Type offers From Attribute Descriptions, Generate From JSON Example, and Define using JSON Schema. Information Extractor docs.
The System Prompt Template overrides the system prompt, and n8n automatically appends format specification instructions to the prompt, so control is shared between your template and n8n’s format instructions. Information Extractor docs.
Schema Type options at a glance
| Schema Type option | Best for | Gotcha |
|---|---|---|
| From Attribute Descriptions | Fields explained in plain language | Requires careful attribute descriptions |
| Generate From JSON Example | Quick prototyping | n8n treats every field as mandatory |
| Define using JSON Schema | Stable contracts and portability | You maintain the schema file |
The documented trap is that n8n treats every field as mandatory when generating schemas from JSON examples, so this build specifies an explicit JSON Schema instead; that schema route is our design choice. Information Extractor docs; JSON Schema.
The schema file is the contract: it is version-controlled, owned by you, and replaceable independently of Airtable or n8n. JSON Schema.
Writing rows to Airtable
The Airtable node can create, update, and search records, and an update addresses an existing record by its Record ID, which the node’s List operation also returns; keeping that schema in a version-controlled file is our design choice. Airtable node docs; Airtable Web API.
Airtable’s node supports updating data in a table, creating records, and searching, and the docs include a procedure for creating a Record ID column in Airtable, which is needed to update an existing record from n8n. Airtable node docs. That Record ID dependency is Airtable’s real constraint here: an update addresses an existing record by its Record ID, and the node’s List operation returns that ID along with the fields, so the column can be created at setup rather than bolted on later. Airtable support. Airtable’s Web API is REST and JSON, which is why the extracted payload can stay plain JSON. Airtable Web API.
The practical consequence is that Airtable is treated as a view rather than the system of record: store the raw text and the extracted JSON, keep the Record ID mapping documented, and the table becomes replaceable. Airtable to NocoDB migration.
The “I’m not sure” branch: alerting a human
Because the fetched documentation exposes no confidence score, uncertainty detection here is our design choice: validate presence and format of extracted fields, then route failures through an error workflow that must start with an Error Trigger. Error handling docs.
The fetched documentation exposes no confidence score for extraction, so the branch checks whether required fields are present and whether their formats look right, such as dates and totals. Information Extractor docs. When a check fails, the Stop And Error node forces the execution to fail on that condition, which then triggers the error workflow. Stop And Error docs.
Error workflows are set in Workflow Settings, run when an execution fails, must start with the Error Trigger node, and one error workflow can serve several workflows. Error handling docs. The payload includes execution.id, execution.url, execution.retryOf for retries only, execution.error.message, execution.error.stack, execution.lastNodeExecuted, execution.mode, workflow.id, and workflow.name. Error handling docs. The documented blind spot is that execution.id and execution.url are absent when the failure happens in the trigger node, with the payload arriving instead as trigger.error and a near-empty workflow, so alert copy cannot rely on those fields there. Error handling docs.
A loop over invoices uses the Loop Over Items (Split In Batches) node, and an IF node can split the uncertain branch before the alert. Loop Over Items docs; IF node docs.
The two bills: orchestration vs. inference
At 1,000 invoices a month, orchestration costs $20 on n8n Starter while inference costs $0.50 to $10 depending on model, so executions rather than tokens set the budget. n8n pricing; OpenAI pricing; Gemini pricing.
n8n’s own definition makes the accounting simple: one invoice is one execution. n8n also states that its workflows “can do things in a single execution that would take 10,000 operations in other tools”; we treat that as a vendor claim and size by executions instead. n8n pricing. Retries and error runs draw from the same execution pool, so a bad week costs more than the invoice count suggests. What retries really cost.
| Plan or model | Allowance or rate | Cost at 1,000 invoices/month |
|---|---|---|
| n8n Starter | $20/mo billed annually, 2.5K executions | $20.00 |
| n8n Pro | $50/mo billed annually, 10K executions | $50.00 if chosen |
| n8n Business | $800/mo, 40K executions, self-hosted only | $800.00 if chosen |
| n8n Enterprise | Contact Sales, custom executions | not stated |
| Free trial | 1,000 executions, 5 concurrent, 180-second timeout | $0.00 (no headroom) |
| gpt-6-luna | $0.10 input / $0.50 output per 1M tokens | $0.50 |
| gemini-3.5-flash-lite | $0.30 input / $2.50 output per 1M tokens | $1.90 |
| gemini-3.8-flash | $2.00 / $10.00 per 1M tokens through 2026-11-30 | $10.00 |
| gemini-3.8-flash after 2026-11-30 | $4.00 / $20.00 per 1M tokens | $20.00 |
Assumption block, labeled as ours rather than a measurement: about 3,000 input tokens and 400 output tokens per invoice. OpenAI pricing; Gemini pricing.
- gpt-6-luna: (3,000 × $0.10 + 400 × $0.50) ÷ 1,000,000 = $0.0005 per invoice → $0.50 per 1,000.
- gemini-3.5-flash-lite: (3,000 × $0.30 + 400 × $2.50) ÷ 1,000,000 = $0.0019 per invoice → $1.90 per 1,000.
- gemini-3.8-flash through 2026-11-30: (3,000 × $2.00 + 400 × $10.00) ÷ 1,000,000 = $0.010 per invoice → $10.00 per 1,000.
- gemini-3.8-flash from 2026-12-01: (3,000 × $4.00 + 400 × $20.00) ÷ 1,000,000 = $0.020 per invoice → $20.00 per 1,000.
Our arithmetic on the ratio: $20 ÷ $0.50 ≈ 40× for gpt-6-luna, $20 ÷ $1.90 ≈ 10.5× for gemini-3.5-flash-lite, and $20 ÷ $10 = 2× for gemini-3.8-flash through 2026-11-30. n8n pricing. Per-execution platform cost is $20 ÷ 2,500 = $0.008 on Starter and $50 ÷ 10,000 = $0.005 on Pro; self-hosted Community Edition carries a $0 platform fee, with the server and tokens paid separately. n8n pricing; self-hosted n8n on a VPS guide.
Prices as fetched on 2026-11-07; verify every rate and plan before buying. n8n pricing; OpenAI pricing; Gemini pricing.
Where each platform pushes back
Each component has a documented limit that shapes the design: n8n’s trial caps at 1,000 executions with a 180-second timeout, Google Drive needs its own OAuth credentials before the first run, Airtable updates need a Record ID, and Gemini 3.8 Flash doubles after 2026-11-30. n8n pricing; Google Drive node docs; Airtable node docs; Gemini pricing.
- n8n: the free trial allows 1,000 executions, 5 concurrent executions, and a 180-second execution timeout, and the Business tier is $800 per month billed annually, 40,000 executions, and self-hosted only. n8n pricing.
- Google Drive: the node covers file, folder and shared-drive operations, but connecting it requires the separate Google credentials setup before the first run. Google credentials guide.
- Airtable: updates require a Record ID column, which constrains any update flow from the start. Airtable node docs; Airtable support.
- OpenAI: on gpt-6-luna, output tokens cost five times input tokens, at $0.50 versus $0.10 per 1M tokens. OpenAI pricing.
- Google Gemini: gemini-3.8-flash is $2.00 input and $10.00 output per 1M tokens through 2026-11-30, then $4.00 and $20.00 from 2026-12-01. Gemini pricing.
Keeping the schema and the data portable
The anti-lock-in position is to own the JSON Schema as a file, keep extracted output as plain JSON rows, and treat Airtable as a view rather than the system of record, with export and self-host paths already documented. JSON Schema; Airtable to NocoDB migration.
The schema is held as a portable JSON Schema file that you own and can version-control, so the extractor contract does not live inside n8n or Airtable. JSON Schema. Extracted data is kept as plain JSON rows alongside the raw text, and the Record ID mapping is documented, so a migration is a data move rather than a rebuild. Airtable Web API. If Airtable becomes the bottleneck, the documented escape path is the migration guide; if n8n hosting becomes the bottleneck, the documented escape path is self-hosting with Docker. Airtable to NocoDB migration; self-hosted n8n on a VPS guide. For a platform-level comparison, see n8n vs Zapier vs Make.
The Bottom Line
The verdict is that inference is cheap and orchestration is the larger bill at about 1,000 invoices a month, so size the n8n plan by executions, choose the cheapest model that meets the task, and keep the schema and data portable. n8n pricing.
At this volume, Starter’s $20 buys 2,500 executions while the cheapest model costs $0.50 per 1,000 invoices and the most expensive costs $10 through 2026-11-30 and $20 after, so the plan tier matters more than the model choice. Pick the model by the task, keep the schema as a file you own, and re-check every price and limit before buying, because all figures here are as fetched on 2026-11-07. n8n pricing; OpenAI pricing; Gemini pricing.
FAQ
These three questions cover cost, image input, and lock-in, with every answer following the same documented-design rules as the rest of this guide. n8n pricing.
How much does n8n cost at 1,000 invoices a month?
Starter costs $20 per month billed annually and includes 2,500 executions, which covers 1,000 invoices with room for retries and error runs; the free trial’s 1,000 executions leave zero headroom. Inference adds $0.50 for gpt-6-luna, $1.90 for gemini-3.5-flash-lite, $10.00 for gemini-3.8-flash through 2026-11-30, and $20.00 after. n8n pricing; OpenAI pricing; Gemini pricing.
Can this workflow read scanned invoice images, not just text PDFs?
Image input is supported according to the image-token lines in the pricing tables for the named models, and routing scanned pages into the extractor is our design choice; no accuracy claim is made for either text or image extraction. OpenAI pricing; Gemini pricing; Gemini image understanding.
How do I avoid lock-in with Airtable and n8n?
Own the JSON Schema as a portable file, store raw text plus extracted JSON, document the Record ID mapping, and use the documented migration and self-host paths when a component becomes a bottleneck. JSON Schema; Airtable to NocoDB migration; self-hosted n8n on a VPS guide.
📖 Related Reads
- ToolBrain — tool reviews, LLM comparisons, and AI workflow guides
- NiteAgent — AI agent development, frameworks, and production patterns
Cross-links automatically generated from NoCode Insider.