This workflow corresponds to n8n.io template #7701 — we link there as the canonical source.
This workflow follows the Emailsend → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "tMez4xptNdwuoUMa",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Real-Time Stock Price Monitor & Smart Alerts for Indian & US Markets",
"tags": [],
"nodes": [
{
"id": "3a5d716d-1bc8-4aef-820c-a93125ee3d99",
"name": "Market Hours Trigger",
"type": "n8n-nodes-base.cron",
"position": [
-352,
176
],
"parameters": {},
"typeVersion": 1
},
{
"id": "1e0a06c3-a7da-44ca-a47d-4821bf599049",
"name": "Read Stock Watchlist",
"type": "n8n-nodes-base.googleSheets",
"position": [
-128,
176
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "id",
"value": "=YOUR_GOOGLE_SHEET_ID_HERE"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "=YOUR_GOOGLE_SHEET_ID_HERE"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4
},
{
"id": "3fea256c-b34b-4200-8757-903fb7370183",
"name": "Parse Watchlist Data",
"type": "n8n-nodes-base.code",
"position": [
96,
176
],
"parameters": {
"jsCode": "const items = [];\nconst inputData = $input.all();\n\nfor (let i = 0; i < inputData.length; i++) {\n const row = inputData[i].json;\n\n // Validate required fields\n if (row.symbol && row.upper_limit && row.lower_limit) {\n items.push({\n json: {\n symbol: row.symbol,\n upper_limit: parseFloat(row.upper_limit),\n lower_limit: parseFloat(row.lower_limit),\n direction: row.direction || 'both',\n cooldown_minutes: parseInt(row.cooldown_minutes) || 15,\n last_alert_price: parseFloat(row.last_alert_price) || 0,\n last_alert_time: row.last_alert_time || ''\n }\n });\n }\n}\n\nreturn items;\n"
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "ac5b2580-30a7-4fe3-934b-be3f075bfe7a",
"name": "Fetch Live Stock Price",
"type": "n8n-nodes-base.httpRequest",
"position": [
320,
176
],
"parameters": {
"url": "=https://api.twelvedata.com/time_series?symbol={{ $json.symbol }}&interval={{ $json.cooldown_minutes }}min&apikey=your_api_key_add_here",
"options": {
"response": {
"response": {
"neverError": true
}
}
}
},
"typeVersion": 4.1
},
{
"id": "1d750f99-a199-4f79-a916-a27d00e31106",
"name": "Smart Alert Logic",
"type": "n8n-nodes-base.code",
"position": [
544,
176
],
"parameters": {
"jsCode": "const watchlist = $('Parse Watchlist Data').first().json;\n\nconst symbol = watchlist.symbol;\nconst upperLimit = parseFloat(watchlist.upper_limit);\nconst lowerLimit = parseFloat(watchlist.lower_limit);\n\nconst values = $input.first().json.values;\n\nlet alerts = [];\n\nfor (let i = 0; i < Math.min(20, values.length); i++) {\n const datetime = values[i].datetime;\n const closePrice = parseFloat(values[i].close);\n\n if (closePrice >= upperLimit) {\n alerts.push({\n symbol: symbol,\n status: 'UP',\n price: closePrice,\n limit: upperLimit,\n datetime: datetime,\n message: `${datetime} - ${symbol} crossed UP limit. Current Price: ${closePrice}`\n });\n } else if (closePrice <= lowerLimit) {\n alerts.push({\n symbol: symbol,\n status: 'DOWN',\n price: closePrice,\n limit: lowerLimit,\n datetime: datetime,\n message: `${datetime} - ${symbol} crossed DOWN limit. Current Price: ${closePrice}`\n });\n }\n}\n\nreturn alerts.length ? alerts.map(alert => ({ json: alert })) : [{ json: { message: 'No alerts' } }];\n"
},
"typeVersion": 2
},
{
"id": "3ecf4f65-5761-4aef-95af-2ae934bbe350",
"name": "Check Alert Conditions",
"type": "n8n-nodes-base.if",
"position": [
768,
176
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8e7f6d5c-4b3a-2910-8765-fedcba098765",
"operator": {
"type": "string",
"operation": "notEmpty"
},
"leftValue": "={{ $json.alertMessage }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "f11c4e27-caf8-4db8-891d-08c034696a0b",
"name": "Send Email Alert",
"type": "n8n-nodes-base.emailSend",
"position": [
992,
-16
],
"parameters": {
"text": "=\ud83d\udea8 Stock Alert: {{ $('Smart Alert Logic').item.json.message }}",
"options": {},
"subject": "=\ud83d\udea8 Stock Alert: {{ $('Smart Alert Logic').item.json.message }}",
"toEmail": "user@example.com",
"fromEmail": "user@example.com",
"emailFormat": "text"
},
"credentials": {
"smtp": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "dfbdf149-cec3-4cba-b341-a86a23b44b16",
"name": "Send Telegram Alert",
"type": "n8n-nodes-base.telegram",
"position": [
992,
368
],
"parameters": {
"text": "={{ $json.alert_message }}",
"chatId": "YOUR_TELEGRAM_CHAT_ID",
"additionalFields": {
"parse_mode": "HTML"
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "6c24ea09-602b-4347-8501-bbaf943332d9",
"name": "Update Alert History",
"type": "n8n-nodes-base.googleSheets",
"position": [
992,
176
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": "Sheet1",
"documentId": "YOUR_GOOGLE_SHEET_ID_HERE",
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 4
},
{
"id": "081864e8-cfd4-4fa3-9521-63b0c8940a1e",
"name": "Alert Status Check",
"type": "n8n-nodes-base.if",
"position": [
1216,
176
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "success-condition",
"operator": {
"type": "string",
"operation": "notEmpty"
},
"leftValue": "={{ $json.symbol }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "5c24217a-8b4a-4f2a-8f10-6eedfa2e3781",
"name": "Success Notification",
"type": "n8n-nodes-base.emailSend",
"position": [
1440,
80
],
"parameters": {
"options": {},
"subject": "\u2705 Stock Monitor: Alert Sent Successfully",
"toEmail": "user@example.com",
"fromEmail": "user@example.com"
},
"credentials": {
"smtp": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "5d6a13f3-502f-43e3-a580-8323ee791e2e",
"name": "Error Notification",
"type": "n8n-nodes-base.emailSend",
"position": [
1440,
272
],
"parameters": {
"options": {},
"subject": "\u274c Stock Monitor: Alert Failed",
"toEmail": "user@example.com",
"fromEmail": "user@example.com"
},
"credentials": {
"smtp": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "2cfd4cd7-60f7-4035-b359-cabb05443a41",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
48,
-544
],
"parameters": {
"width": 800,
"height": 480,
"content": "## \ud83d\udcc8 Real-Time Stock Price Monitor & Smart Alerts\n### Monitor Indian (NSE/BSE) and US stock markets with intelligent price alerts, cooldown periods, and multi-channel notifications (Email + Telegram). Automatically tracks price movements and sends alerts when stocks cross predefined upper/lower limits.\n### Perfect for day traders, investors, and portfolio managers who need instant notifications for price breakouts and breakdowns.\n\n\n\n\n## Google Sheets Setup:\n### Create a Google Sheet with these columns (in exact order):\n\nA: symbol (e.g., TCS, AAPL, RELIANCE.BSE)\nB: upper_limit (e.g., 4000)\nC: lower_limit (e.g., 3600)\nD: direction (both/above/below)\nE: cooldown_minutes (e.g., 15)\nF: last_alert_price (auto-updated)\nG: last_alert_time (auto-updated)"
},
"typeVersion": 1
},
{
"id": "781ab2c1-1f5d-4498-ac06-ae7d3f918652",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-736,
-528
],
"parameters": {
"color": 4,
"width": 640,
"height": 480,
"content": "## \ud83d\udd27 How It Works\n\n**\ud83d\udcca Market Hours Trigger** - Runs every 2 minutes during market hours\n**\ud83d\udccb Read Stock Watchlist** - Fetches your stock list from Google Sheets\n**\ud83d\udd0d Parse Watchlist Data** - Processes stock symbols and alert parameters\n**\ud83d\udcb0 Fetch Live Stock Price** - Gets real-time prices from Twelve Data API\n**\ud83e\udde0 Smart Alert Logic** - Intelligent price checking with cooldown periods\n**\u26a1 Check Alert Conditions** - Validates if alerts should be triggered\n**\ud83d\udce7 Send Email Alert** - Sends detailed email notifications\n**\ud83d\udcf1 Send Telegram Alert** - Instant mobile notifications\n**\ud83d\udcdd Update Alert History** - Records alert timestamps in Google Sheets\n**\u2705 Alert Status Check** - Monitors workflow success/failure\n**\ud83d\udd14 Success/Error Notifications** - Admin notifications for monitoring\n\n### \ud83c\udfaf Key Features:\n- **Smart Cooldown**: Prevents alert spam\n- **Multi-Market**: Supports Indian & US stocks\n- **Dual Alerts**: Email + Telegram notifications\n- **Auto-Update**: Tracks last alert times\n- **Error Handling**: Built-in failure notifications"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "1cd6bdbd-412e-4ea3-95cc-b5a718ef79da",
"connections": {
"Smart Alert Logic": {
"main": [
[
{
"node": "Check Alert Conditions",
"type": "main",
"index": 0
}
]
]
},
"Alert Status Check": {
"main": [
[
{
"node": "Success Notification",
"type": "main",
"index": 0
}
],
[
{
"node": "Error Notification",
"type": "main",
"index": 0
}
]
]
},
"Market Hours Trigger": {
"main": [
[
{
"node": "Read Stock Watchlist",
"type": "main",
"index": 0
}
]
]
},
"Parse Watchlist Data": {
"main": [
[
{
"node": "Fetch Live Stock Price",
"type": "main",
"index": 0
}
]
]
},
"Read Stock Watchlist": {
"main": [
[
{
"node": "Parse Watchlist Data",
"type": "main",
"index": 0
}
]
]
},
"Update Alert History": {
"main": [
[
{
"node": "Alert Status Check",
"type": "main",
"index": 0
}
]
]
},
"Check Alert Conditions": {
"main": [
[
{
"node": "Send Email Alert",
"type": "main",
"index": 0
},
{
"node": "Send Telegram Alert",
"type": "main",
"index": 0
},
{
"node": "Update Alert History",
"type": "main",
"index": 0
}
]
]
},
"Fetch Live Stock Price": {
"main": [
[
{
"node": "Smart Alert Logic",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleApismtptelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Monitor Indian (NSE/BSE) and US stock markets with intelligent price alerts, cooldown periods, and multi-channel notifications (Email + Telegram). Automatically tracks price movements and sends alerts when stocks cross predefined upper/lower limits.
Source: https://n8n.io/workflows/7701/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is ideal for marketers, product managers, competitive intelligence teams, and anyone who needs to track changes on web pages — whether it's competitor pricing, job postings, policy updat
This automated n8n workflow monitors real-time cryptocurrency prices using CoinGecko API and sends smart alerts when price conditions are met. It supports multi-coin tracking, dynamic conditions, and
⚠️ Heads up: this is satire. The "Hell Yeah!" workflow is a parody of "automate your whole life with AI agents" grindset content. The API endpoints are fictional and the function nodes are illustrativ
This workflow continuously monitors the Meta Ads Library for new creatives from a specific competitor pages, logs them into Google Sheets, and sends a concise Telegram notification with the number of
Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to