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 volatility) and sends AI-generated email alerts only when risks are detected. It helps you stay informed without being overwhelmed by unnecessary notifications.
This workflow automates stock portfolio monitoring by combining spreadsheet data, real-time market prices and AI-powered summaries. It reads your portfolio data from Google Sheets and processes each stock by fetching its current market price through an external API.
Once the data is enriched, the workflow calculates key risk indicators such as percentage price change and volatility. Based on predefined thresholds, it flags stocks that may require attention. Instead of sending raw data, it uses an AI model to generate a clean, human-readable summary.
The workflow ensures efficiency by sending alerts only when necessary, reducing noise and helping you focus on meaningful risks.
To use this workflow, you need:
PortfolioA:E| Column | Field Name | Description |
|---|---|---|
| A | symbol | Stock ticker (e.g., AAPL) |
| B | avg_price | Average purchase price |
| C | quantity | Number of shares |
| D | sector | Industry sector |
| E | notes | Optional notes |
Portfolio!A:E⚠️ This is a required setup step. The workflow will NOT work without it.
Open Fetch Stock Prices node
Update URL:
https://api.twelvedata.com/price?symbol={{$json.symbol}}&apikey=YOUR_API_KEY
Replace YOUR_API_KEY with your Twelve Data API key
⚠️ You must configure the recipient email manually.
sendTo → your email addressDaily Stock Risk Alertdrop_threshold = -5 → triggers alert if price drops ≥ 5%volatility_threshold = 3 → triggers alert if volatility ≥ 3%Adjust these based on your risk tolerance.
The workflow is designed for scheduled execution.
Edit Fields – Config & Thresholds
Adjust sensitivity of alerts
Wait 8 Seconds Before request
Modify delay based on API rate limits
Compute Risk Logic
Add new conditions (e.g., stop-loss, sector-based alerts)
Generate Risk Summary
Customize prompt for different tone or format
Send Risk Alert Notification
Change subject or email structure
Automatically receive alerts for risky stocks each day
Run hourly to track sudden market movements
Identify stocks with unstable price behavior
Loss Prevention Alerts
Get notified when stocks drop beyond safe thresholds
Sector-Based Monitoring
Track risk exposure across industries
There can be many more use cases depending on how you customize thresholds and logic.
| Issue | Possible Cause | Solution |
|---|---|---|
| No data fetched from Google Sheets | Incorrect sheet ID or range | Verify Sheet ID and Portfolio!A:E |
| API not returning prices | Missing API key | Add apikey in HTTP Request node |
| Workflow stops unexpectedly | API rate limit | Increase wait time |
| No email received | sendTo field empty |
Add recipient email |
| No alerts triggered | Thresholds too strict | Adjust drop/volatility values |
| AI summary not generated | Groq API issue | Check API credentials |
| Incorrect risk calculation | Data format issue | Ensure numeric values in sheet |
If you need assistance with:
We’re here to help!
👉 Contact our n8n developes at WeblineIndia for expert support in building scalable, AI-powered automation solutions tailored to your needs.