Track commodity portfolio drift with Google Sheets, Gemini AI and Gmail alerts
Ready for 3.0What this workflow does
This AI workflow has 21 nodes and runs on a schedule (every day at 09:00). Along the way it connects Google Sheets, Google Gemini and Gmail.
How it runs
Trigger: On a schedule (every day at 09:00).
- Read Holdings (Google Sheets): uses Google Sheets
- Workflow Settings (Edit Fields (Set)): sets or maps fields
- Synchronize Inputs (Merge): merges the data from its input branches
- Prepare Portfolio Context (Code): runs custom JavaScript code
- Validate Portfolio Data (Code): runs custom JavaScript code
- Check Validation Status (If): checks a condition and branches into true / false
- Calculate Portfolio Allocation (Code): runs custom JavaScript code
- Prepare Validation Failure Log (Edit Fields (Set)): sets 8 fields: run_date, total_value, rebalance_needed…
- Detect Portfolio Drift (Code): runs custom JavaScript code
- Log Validation Failure (Google Sheets): append
…plus 10 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Gemini + Google Sheets templates (819) · Other Google Gemini + Gmail templates (518)
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 (8)
- Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Gmail
n8n-nodes-base.gmail - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
Commodity Portfolio Tracker using n8n, Google Sheets, Gemini AI & Gmail Alerts This workflow automatically monitors a commodity portfolio stored in Google Sheets, compares actual allocation against predefined targets, detects deviations and sends intelligent…