Send AI stock risk alerts from Google Sheets with Twelve Data and Groq
Needs changesWhat this workflow does
This AI workflow has 13 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Sheets, Gmail and Groq Chat Model.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Read Portfolio from Google Sheets (Google Sheets): uses Google Sheets
- Edit Fields – Config & Thresholds (Edit Fields (Set)): sets or maps fields
- Loop: Fetch Current Prices (Loop Over Items (Split in Batches)): loops over the items in batches
- Merge: merges the data from its input branches
- Wait: waits 8 seconds
- Compute Risk Logic (Function): runs custom JavaScript (legacy Function node)
- Fetch Stock Prices (HTTP Request): calls an HTTP API
- Filter – Only Flagged Risks (If): checks a condition and branches into true / false
- Collect Flagged Stocks (Code): runs custom JavaScript code
- Generate Risk Summary (AI Agent): runs an AI agent, with model: Groq Chat Model
…plus 1 more step. See the full node list below.
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:
- Function (legacy) in Compute Risk Logic: replace with Code node, mode 'Run Once for All Items'.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Compute Risk Logic | Code node, mode 'Run Once for All Items' |
Nodes used (13)
- Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Manual Trigger
n8n-nodes-base.manualTrigger - Gmail
n8n-nodes-base.gmail - Wait
n8n-nodes-base.wait - Function
n8n-nodes-base.function - AI Agent
@n8n/n8n-nodes-langchain.agent - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge
From the author
Google Sheets + Twelve Data + Groq AI Stock Risk Alert Workflow > Smart Stock Risk Alerts in Minutes This workflow automatically reads your stock portfolio from Google Sheets, fetches real-time prices via API, calculates risk metrics (price drops and…