Daily Swing Trade Ideas with GPT-4, Yahoo Finance, Google Sheets & Telegram
Go to WorkflowDescription
Automated daily swing‑trade ideas from end‑of‑day (EOD) data, scored by an LLM, logged to Google Sheets, and pushed to Telegram.
What this workflow does
Fetches EOD quotes* for a chosen stock universe (example: *NSE‑100** via RapidAPI).
Cleans & filters** the universe using simple technical/quality gates (e.g., price/volume sanity, avoid illiquid names).
Packages market context* and feeds it to *OpenAI* with a strict *JSON schema* to produce *top swing‑trade recommendations** (entry, target, stop, rationale).
Splits structured output* into rows and *logs* them to a *Google Sheet** for tracking.
Sends an alert* with the day’s trade ideas to *Telegram** (channel or DM).
Ideal for
Retail traders who want a daily, hands‑off idea generator.
PMs/engineers prototyping LLM‑assisted quant sidekicks.
Creators who publish daily trade notes to their audience.
Tech stack
n8n** (orchestration)
RapidAPI** (EOD quotes; pluggable data source)
OpenAI** (LLM for idea generation)
Google Sheets** (logging & performance tracker)
Telegram** (alerts)
Prerequisites
RapidAPI key with access to an EOD quotes endpoint for your exchange.
OpenAI API key.
Google account with a Sheet named Trade_Recommendations_Tracker (or update the node).
Telegram bot token (via @BotFather) and destination chat ID.
> You can replace any of the above vendors with equivalents (e.g., Alpha Vantage, Twelve Data, Polygon, etc.). Only the HTTP Request + Format nodes need tweaks.
Environment variables
| Key | Example | Used in |
| -------------------- | -------------------------- | --------------------- |
| RAPIDAPI_KEY | xxxxxxxxxxxxxxxxxxxxxxxx | HTTP Request (quotes) |
| OPENAI_API_KEY | sk-… | OpenAI node |
| TELEGRAM_BOT_TOKEN | 123456:ABC-DEF… | Telegram node |
| TELEGRAM_CHAT_ID | 5357385827 | Telegram node |
Google Sheet schema
Create a Sheet (tab: EOD_Ideas) with the headers:
Date, Symbol, Direction, Entry, Target, StopLoss, Confidence, Reason, SourceModel, UniverseTag
Node map (name → purpose)
Trigger – Daily Market Close → Fires daily after market close (e.g., 4:15 PM IST).
Prepare Stock List (NSE 100) → Provides stock symbols to analyze (static list or from a Sheet/API).
Fetch EOD Data (RapidAPI) → Gets EOD data for all symbols in one or batched calls.
Format EOD Data → Normalizes API response to a clean array (symbol, close, high, low, volume, etc.).
Filter Valid Stock Data → Drops illiquid/invalid rows (e.g., volume > 200k, close > 50).
Build LLM Prompt Input → Creates compact market context & JSON instructions for the model.
Generate Swing Trade Ideas (OpenAI) → Returns strict JSON with top ideas.
Split JSON Output (Trade‑wise) → Explodes the JSON array into individual items.
Log Trade to Google Sheet → Appends each idea as a row.
Send Trade Alert to Telegram → Publishes a concise summary to Telegram.