Daily Swing Trade Ideas with GPT-4, Yahoo Finance, Google Sheets & Telegram
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.
Related Templates
AI SEO Readability Audit: Check Website Friendliness for LLMs
Who is this for? This workflow is designed for SEO specialists, content creators, marketers, and website developers who ...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
🤖 Build Resilient AI Workflows with Automatic GPT and Gemini Failover Chain
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works This...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments