GPT-4.1-mini Powered Invoice Processing from Gmail to Google Sheets with Slack
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on Gmail events (plus 2 other triggers). Along the way it connects Gmail, OpenAI Chat Model, Slack and Google Sheets.
How it runs
Trigger: On Gmail events (plus 2 other triggers).
- 2. Get Email Attachments (Gmail): get
- 8a. Extract Invoice ID (Edit Fields (Set)): sets 1 field: invoice_id
- 8b. Extract Invoice ID (Edit Fields (Set)): sets 1 field: invoice_id
- 3. Extract Text from PDF (Extract from File): extracts data from a file (pdf)
- 9a. Update Status to Approved (Google Sheets): update
- 9b. Update Status to Rejected (Google Sheets): update
- 4. Prepare Text for AI (Edit Fields (Set)): sets 1 field: clean_text
- 10a. Send Approval Confirmation (Slack): uses Slack
- 10b. Send Rejection Confirmation (Slack): uses Slack
- 5. Extract Invoice Data with AI (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Structured Output Parser
…plus 2 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (1. New Invoice Email Received).
Nodes used (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Extract from File
n8n-nodes-base.extractFromFile - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Webhook
n8n-nodes-base.webhook - Slack
n8n-nodes-base.slack - Google Sheets
n8n-nodes-base.googleSheets - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
AI-Powered Invoice Processing from Gmail to Google Sheets with Slack Approval This workflow completely automates your invoice processing pipeline. It triggers when a new invoice email arrives in Gmail, uses AI to extract key data from the PDF attachment, logs…