πŸ“ˆ Send NSE stock watchlist alerts with Google Sheets and Gmail

⚑ 53 views Β· πŸ“ˆ Crypto Trading & Stock Market

Description

Quick overview

This workflow polls a Google Sheets stock watchlist every five minutes during weekday market hours, fetches live quotes from an NSE quotes HTTP API, and sends Gmail alerts when prices cross buy-below or sell-above thresholds while logging each triggered alert back to Google Sheets.

How it works

  1. Runs every 5 minutes during configured weekday market hours using a schedule trigger.
  2. Reads the watchlist from Google Sheets and keeps only rows marked as active.
  3. Sends the active symbols to an NSE quotes HTTP endpoint to retrieve the latest prices.
  4. Compares each symbol’s current price against the watchlist’s buy_below and sell_above thresholds to generate BUY/SELL alert records.
  5. Stops if no alerts are generated, otherwise routes alerts by direction (above for SELL, below for BUY) and formats the email subject and message.
  6. Sends each alert via Gmail and appends the alert details (timestamp, symbol, price, direction, threshold) to an AlertLog sheet in Google Sheets.

Setup

  1. Connect Google Sheets credentials and set the spreadsheet and sheet names/IDs for both the Stock Watchlist and AlertLog tabs.
  2. Create/verify the Stock Watchlist columns used by the workflow (at minimum: Name, active, buy_below, sell_above).
  3. Connect Gmail credentials and set the recipient(s) in the Gmail node to receive BUY/SELL alerts.
  4. Confirm the NSE quotes API endpoint is reachable from your n8n instance, and adjust the schedule cron expression if your market hours or timezone differ.

Additional info

Add-ons (Additional Features)

Possible extensions:

Use Case Examples

1. Buy Zone Monitoring

Track stocks and receive alerts when prices fall below preferred entry levels.

2. Profit Booking Alerts

Notify investors when stocks cross exit targets.

3. Portfolio Watchlist Automation

Monitor multiple NSE stocks from a single Google Sheet.

4. Manual Strategy Tracking

Implement custom entry/exit strategies without trading platforms.

5. Historical Alert Analytics

Use AlertLog data for reviewing triggered signals.

Additional use cases can be built by extending notification channels, market APIs and analytics logic.

Troubleshooting Guide

IssuePossible CauseSolution
No alerts receivedStock row inactiveSet active = TRUE
Workflow runs but no stocks processedMissing Name columnEnsure Name column exists
Gmail sending failsOAuth issueReconnect Gmail credentials
Alert history not savedMissing AlertLog columnsCreate required columns
API request failsEndpoint unavailableVerify API availability
No BUY / SELL events generatedThreshold values not reachedAdjust buy/sell limits
Empty API responseSchema mismatchEnsure compatible output structure
Workflow runs outside desired timeSchedule mismatchUpdate cron expression
Missing symbolsIncorrect stock namesVerify NSE symbol values
Alert messages incorrectMessage node customization issueReview BUY/SELL Set nodes

Need Help?

Do you need help deploying, customizing or extending this workflow?

WeblineIndia can assist with:

Whether you want Telegram alerts, advanced analytics, custom APIs or additional market integrations, the workflow can be expanded further based on your requirements.

Contact WeblineIndia to hire n8n developers for implementation assistance and custom workflow development.

πŸ”— Nodes Used

Google Sheets, HTTP Request, Gmail, Schedule Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup