Validate wholesale order emails against a Google Sheets price list with Gmail and GPT-4o
Ready for 3.0What this workflow does
This AI workflow has 27 nodes and runs on a schedule (cron 0 8 * * 1) (plus 1 other trigger). Along the way it connects Gmail, OpenAI Chat Model, Google Sheets and Telegram.
How it runs
Trigger: On a schedule (cron 0 8 * * 1) (plus 1 other trigger).
- Read Orders This Week (Google Sheets): uses Google Sheets
- Normalize Order Email (Edit Fields (Set)): sets 7 fields: email_id, thread_id, from_email…
- Summarise Order Week (Code): runs custom JavaScript code
- Has Order Details (If): checks a condition and branches into true / false
- AI Write Digest Summary (AI Agent): runs an AI agent, with model: Digest Model
- AI Extract Order Lines (AI Agent): runs an AI agent, with model: Order Extraction Model
- Log Unparsable Order Email (Google Sheets): append
- Format Digest Email (Code): runs custom JavaScript code
- Parse Extracted Order (Code): runs custom JavaScript code
- Alert Desk About Unparsable Email (Telegram): uses Telegram
…plus 13 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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - Telegram
n8n-nodes-base.telegram - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Quick Overview This workflow monitors Gmail for unread wholesale order emails, uses OpenAI to extract order line items, validates them against a Google Sheets price list, and then sends either a confirmation or a revision request by email while logging the…