Extract purchase orders from Gmail using Gemini AI and save to Google Sheets
Needs changesWhat this workflow does
This AI workflow has 10 nodes and runs on a schedule (legacy Cron node). Along the way it connects Gmail, Google Gemini Chat Model and Google Sheets.
How it runs
Trigger: On a schedule (legacy Cron node).
- Get many messages (Gmail): get many
- Filter: keeps only the items that match a condition
- If: checks a condition and branches into true / false
- Set final output keys (Edit Fields (Set)): sets 1 field: final_json_keys
- AI Agent: runs an AI agent, with model: Google Gemini Chat Model; 1 tool (Get row(s) in sheet in Google Sheets)
- Reformatted to upload in Google sheet (Code): runs custom JavaScript code
- Append row in sheet (Google Sheets): append
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Cron: replace with Schedule Trigger.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Cron Cron | Schedule Trigger |
Nodes used (10)
- Gmail
n8n-nodes-base.gmail - Cron
n8n-nodes-base.cron - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter - Code
n8n-nodes-base.code - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - Google Sheets
n8n-nodes-base.googleSheets
From the author
🚀 AI-Powered Email to Purchase Order Workflow Automatically scan your inbox for new purchase order requests, extract order details using Gemini AI, and log them into Google Sheets — all without manual effort. --- ✨ Core Capabilities - ⏱ Runs every minute to…