Track commodity portfolio drift with Google Sheets, Gemini AI and Gmail alerts
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,...
Template notes
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 rebalance alerts via email using Gemini AI. It also logs every run (success, failure or no action) into a tracking sheet for audit purposes.
Quick Implementation Steps
1. [Connect Google Sheets, Gmail and Gemini credentials in your n8n account](https://n8n.partnerlinks.io/om1efg2qgvwi) 2. Add holdings data in Google Sheets 3. Configure targets in "Workflow Settings" node 4. Create rebalancelog sheet with required columns 5. Test workflow → Activate schedule
What It Does
This workflow acts as an automated portfolio monitoring system specifically designed for commodity-based investments such as Gold, Silver, Oil, Copper and Natural Gas. It reads portfolio holdings using the Read Holdings node and combines them with configuration from the Workflow Settings node.
The workflow validates data through Validate Portfolio Data, calculates allocation via Calculate Portfolio Allocation and identifies deviations using Detect Portfolio Drift. If deviations exceed limits, Classify Alert Severity determines how critical the situation is.
Finally, Build Alert Prompt and Generate Alert Message (Gemini AI) create a human-readable alert, which is processed in Prepare Alert Payload, sent via Send Rebalance Email and logged using Log Sent Alert, Log Validation Failure or Log No Action depending on the outcome.