Skip to content
AdvancedPremiumDocument ProcessingEmail trigger10 nodes

Extract invoice attachments from email into Google Drive and Airtable

Reads an accounts-payable mailbox over IMAP, keeps only messages that carry an invoice-shaped PDF, parses the invoice number, date and total out of the PDF text, archives the file in Google Drive and .

An IMAP trigger downloads unseen mail with attachments. A Filter requires both binary content and an invoice-shaped subject, so newsletters with a logo never reach the parser. Extract From File pulls the PDF's text layer and a Code node applies deterministic regexes for invoice number, issue date and total, setting a textFound flag when the document had no readable text at all. An IF splits on that flag: real invoices are uploaded to a Google Drive folder named by invoice number and then upserted into Airtable on the invoice number, while scans are written to a Needs Review table with the reason recorded. Every external call retries with backoff and routes failures to an error rail that captures the invoice id and posts it to Slack, because an unfiled invoice is a missed payment.

Key benefits

  • Invoice number, date and total are captured without anyone re-keying a PDF
  • Upserting on the invoice number means a forwarded or re-sent invoice updates one row rather than creating a second liability
  • Scanned PDFs are routed to a review table with the reason, so the failure is visible instead of silent
  • The parser is regex, not a model call — no per-document cost and no invented totals
  • Ships with three pinned sample messages, including one that must be filtered out

Use cases

  • Accounts payable teams keying supplier invoices into a tracker by hand
  • Small finance functions that want an audit trail linking each row to the original PDF
  • Agencies collecting supplier bills across several client mailboxes
  • Anyone reconciling at month end and discovering an invoice that never got recorded

Integrations

IMAP EmailGoogle DriveAirtableSlack

Workflow preview (10 nodes)

The template's actual node layout and connections. Node parameters and credential slots unlock with the download.

Watch Accounts Inbox (I…Email Read ImapHas a PDF Attachment?FilterRead the PDF TextExtract From FileParse Number, Date & To…CodeText Layer Found?IfFile the PDF in DriveGoogle DriveUpsert the Airtable RowAirtableFlag Scanned Invoice fo…AirtableCapture Filing FailureSetPost Filing Failure to …Slack

What's inside (10 nodes)

A look at the node types this workflow uses. No purchase required — full parameters and credentials are yours after you buy.

AirtableCodeEmail Read ImapExtract From FileFilterGoogle DriveIfSetSlack

From download to running in 3 steps

  1. 1
    Import. In n8n, open Workflows → menu → “Import from File” and pick the downloaded JSON.
  2. 2
    Connect. Add your own credentials on the app nodes - n8n highlights exactly which ones need them.
  3. 3
    Activate. Run it once to test, then toggle Active. The automation is live.

What you'll learn

Production level

Production-grade: idempotency, dead-letter handling, and reconciliation included.

  • Moving data between IMAP email, Google Drive and Airtable in a single run
  • Adding retries and an explicit error path to external calls
  • Testing against pinned sample data before connecting anything real

Every node carries its own documentation on the canvas, plus notes explaining why the architecture was built this way, a credential setup guide, troubleshooting, and three practice exercises. Sample data comes pinned to the trigger, so you can hit Execute and watch data flow before connecting a single account.

Common questions

What exactly do I get?

The complete, ready-to-import n8n workflow as a JSON file, delivered instantly after payment. Import it into your own n8n (cloud or self-hosted), add your credentials, and it runs.

How do I import it into n8n?

In n8n, open Workflows, click the three-dot menu, choose “Import from File”, and select the downloaded JSON. Then connect your own app credentials on the highlighted nodes.

Do I need anything else for it to work?

You need your own n8n instance and accounts/credentials for the apps this workflow connects to (IMAP Email, Google Drive, Airtable, Slack). No coding is required.

What if it doesn't work for me?

If the file is faulty, won't import, or isn't as described, contact us within 7 days and we'll fix it or refund you - see our refund policy.

Can I modify or resell it?

You can freely adapt and use it in your own or your clients' projects. Reselling or redistributing the template file itself is not permitted.

Original n8n workflow template created and owned by WorkflowCrate. After purchase you receive the ready-to-import JSON file and a license to use and adapt it in your own projects.