Process Gmail invoices with OpenAI, Google Sheets, and Slack reminders
Ready for 3.0What this workflow does
This AI workflow has 18 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects Gmail, OpenAI, Google Sheets and Slack.
How it runs
Trigger: On Gmail events (plus 1 other trigger).
- Download Invoice Attachment (Gmail): get
- Load Pending Invoice Records (Google Sheets): uses Google Sheets
- Extract Text from Invoice PDF (Extract from File): extracts data from a file (pdf)
- Calculate Remaining Due Days (Code): runs custom JavaScript code
- AI Invoice Data Extraction (OpenAI): uses OpenAI
- Generate Reminder Priority & Status (Code): runs custom JavaScript code
- Format Extracted Invoice Data (Code): runs custom JavaScript code
- Check Reminder Action Required (If): checks a condition and branches into true / false
- Check Existing Invoice Record (Google Sheets): uses Google Sheets
- Send Invoice Reminder Email (Gmail): uses Gmail
…plus 6 more steps. See the full node list below.
Services it uses
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) (Monitor Incoming Invoice Emails).
Nodes used (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Extract from File
n8n-nodes-base.extractFromFile - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - Slack
n8n-nodes-base.slack - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick Overview This workflow monitors Gmail for invoice emails with PDF attachments, uses OpenAI to extract key invoice fields, logs them to a Google Sheets tracker with duplicate detection, and sends daily payment reminder emails and Slack notifications…