Extract & Organize Email Invoices with Gmail, Drive & OpenAI GPT — n8n Workflow
Overview
Who’s it for
This template is for founders, finance teams, and solo operators who receive lots of invoices by email and want them captured automatically in a single, searchable source of truth. If you’re tired of hunting through your inbox for invoice PDFs or “that one receipt from three months ago,” this is for you.
What it does / How it works
The workflow polls your Gmail inbox on a schedule and fetches new messages including their attachments. A JavaScript Code node restructures all attach
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 20 nodes, connecting agent, code, extractfromfile.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (20)
Google Sheets
googleSheets
Google Drive
googleDrive
Gmail
gmail
Code
code
AI Agent
n8n-nodes-langchain.agent
OpenAI Chat Model
n8n-nodes-langchain.lmChatOpenAi
Structured Output Parser
n8n-nodes-langchain.outputParserStructured
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
extract-organize-email-invoices-with-gmail-drive-openai-gptfile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
Integrations
Created by
Feras Dabour
@ferasdabour
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →