Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on a schedule (every week at 09:00). Along the way it connects Google Sheets, OpenAI Chat Model and Slack. It also calls alphavantage.co over HTTP.
How it runs
Trigger: On a schedule (every week at 09:00).
- Risk Thresholds and Settings (Edit Fields (Set)): sets 7 fields: sector_concentration_limit, correlation_threshold, volatility_lookback_days…
- Read Portfolio Sheet (Google Sheets): uses Google Sheets
- Validate Portfolio Input (Code): runs custom JavaScript code
- Batch Portfolio Symbols (Loop Over Items (Split in Batches)): loops over the items in batches
- Portfolio Risk Engine (Code): runs custom JavaScript code
- Fetch Market Data (HTTP Request): calls alphavantage.co
- Risk Check (If): checks a condition and branches into true / false
- Rate Limit Buffer (Alpha Vantage) (Wait): waits 12 seconds
- Portfolio Risk Summary (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Normalize Alpha Vantage Data (Code): runs custom JavaScript code
…plus 3 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Google Sheets + Slack templates (1,314) · Other OpenAI + Slack templates (979)
HTTP calls to: alphavantage.co
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 (11)
- Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Slack
n8n-nodes-base.slack - Wait
n8n-nodes-base.wait - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
📊 Description This workflow reads your portfolio from Google Sheets, fetches market data, evaluates key risk factors such as sector concentration, volatility, and stock correlation, and generates an easy-to-understand risk summary using AI. When meaningful…