Templates / Extract & classify invoices & receipts with Gmail, OpenAI and Google Drive

Extract & classify invoices & receipts with Gmail, OpenAI and Google Drive

Needs changes

by Tom · 11,836 views · created 2025-04-26 · Invoice Processing, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Read PDF. 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 18 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI, Google Drive and Gmail.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Create folder (Google Drive): work with folder
  2. Configure (Edit Fields (Set)): sets or maps fields
  3. Respond to Webhook: sends the response back to the webhook caller
  4. Get emails with attachments (Gmail): get many
  5. Optional filter for emails (Filter): keeps only the items that match a condition
  6. Iterate over email attachments (Code): runs custom JavaScript code
  7. Is attachment a PDF? (If): checks a condition and branches into true / false
  8. Read PDF: uses Read PDF
  9. Is text within token limit? (If): checks a condition and branches into true / false
  10. OpenAI: uses OpenAI

…plus 6 more steps. See the full node list below.

Services it uses

OpenAIGoogle DriveGmail

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Read PDF in Read PDF email attachments: replace with Extract from File node, 'Extract From PDF' operation.
Removed in 3.0Replace with
Read PDF
Read PDF email attachments
Extract from File node, 'Extract From PDF' operation

Nodes used (12)

From the author

Who is it for? Anyone who wants to automatically aggregate their invoices or receipts. Main beneficiaries: small business owners and freelancers. How it works 1. Creates a folder in Google Drive for uploading invoices and receipts. Responds (Webhook response)…

Excerpt from Tom's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.