← Back to directory
Finance & Accounting Medium to set up Automation Detect & Flag Anomaly

Real-Time Stock Monitor with Smart Alerts

Source reviewed Updated 2026-07-07

Monitors Indian and US stocks every two minutes during market hours.

What it does

Get instant email and Telegram alerts whenever your Indian or US stocks hit specific price limits, with spam-free updates every two minutes during market hours. This system automatically tracks prices in real-time and logs every trigger directly to your Google Sheets for easy tracking.

Step by step

  1. Configure a scheduled trigger to execute every two minutes during market hours for both Indian and US markets.
  2. Set up an HTTP request node to fetch real-time price data from a financial API endpoint.
  3. Implement code logic to parse the JSON response and compare current prices against thresholds stored in Google Sheets.
  4. Connect output nodes to Send Email and Telegram services to dispatch alerts when conditions are met.

Where the LLM does the work

  • Generate robust error handling code for API failures or malformed JSON responses to ensure system stability.
  • Draft the specific alert message templates for Email and Telegram that include dynamic price details and cooldown status.
  • Write the logic for smart cooldown periods to prevent spamming users with repeated alerts for the same stock movement.

Watch out for

Timezone mismatches between Indian and US market hours may cause missed data so explicitly define trading windows in your schedule.
Telegram bot tokens must be kept secret so store them as environment variables rather than hardcoding them in the workflow.
Google Sheets API quotas can be exceeded by frequent writes so batch updates or reduce write frequency to avoid throttling.

Tools that fit

Google Sheets Service Store and update stock watchlist data
HTTP Request API Fetch live prices from Twelve Data API
Code LLM Parse watchlist and execute smart alert logic
Send Email Service Send detailed email notifications
Telegram Service Send instant mobile notifications

The agent brief

Everything your agent needs, including the gotchas. Copy it and go.
agent-brief.md
You are helping me build the following AI agent workflow.

## Goal
Real-Time Stock Monitor with Smart Alerts: Monitors Indian and US stocks every two minutes during market hours.

## Specification
- What it does: Get instant email and Telegram alerts whenever your Indian or US stocks hit specific price limits, with spam-free updates every two minutes during market hours. This system automatically tracks prices in real-time and logs every trigger directly to your Google Sheets for easy tracking.
- Trigger: On a schedule (Scheduled · every 2 minutes during market hours)
- Autonomy: Fully hands-off
- Expected setup effort: about an afternoon
- Tools/services involved:
  - Google Sheets: Store and update stock watchlist data
  - HTTP Request: Fetch live prices from Twelve Data API
  - Code: Parse watchlist and execute smart alert logic
  - Send Email: Send detailed email notifications
  - Telegram: Send instant mobile notifications

## Known pitfalls, handle each one explicitly in your implementation
1. Timezone mismatches between Indian and US market hours may cause missed data so explicitly define trading windows in your schedule.
2. Telegram bot tokens must be kept secret so store them as environment variables rather than hardcoding them in the workflow.
3. Google Sheets API quotas can be exceeded by frequent writes so batch updates or reduce write frequency to avoid throttling.

## Reference implementation
https://n8n.io/workflows/7701 (workflow template)
Fetch and inspect this before building. If it matches my stack, adapt it;
if not, rebuild the pattern with my tools.

## Process requirements
1. Before building: ask me which of the listed tools I actually use and
   what my platform is (n8n / Make / code / other). Do not assume.
2. Adapt the pattern to my answers; do not force the reference stack.
3. Address every pitfall above; tell me how you handled each.
4. Provide a test plan I can run before letting this touch real data.
5. Ask before any step that sends messages, modifies data, or spends money.

Source: https://usecasesforagents.com/use-case/real-time-stock-monitor-with-smart-alerts/ via usecasesforagents.com

Frequently asked questions

Can I use a different Spreadsheet than Google Sheets?

Yes. Google Sheets is only the example spreadsheet in this recipe. The same flow works with Airtable, Baserow and Excel. Swap the spreadsheet connection and keep the rest of the setup as written.

Want this running in your business?

This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Get in touch →

Who it's for

Built for anyone who wants this off their own plate, no team or company required.

Seen in the wild

← Back to directory