Generate Swing Trade Ideas

Claudetelegram_bot_apiGoogle Sheets

Analyzes daily NSE stock data using AI to find high-probability swing trade setups, delivering them directly to Telegram and logging them in Google Sheets.

Stock MarketTrading AlertsGoogle SheetsTelegram

This workflow runs every weekday after NSE market close and generates high-probability swing trade ideas from a curated list of 40 Nifty 50 large-cap stocks. It combines real-time market data, technical analysis powered by an AI model, and instant delivery via Telegram and Google Sheets.

It performs the following steps:

  1. Triggers every weekday at 4:05 PM IST (just after NSE market close at 3:30 PM IST).
  2. Defines a universe of 40 NSE large-cap stocks across various sectors.
  3. Fetches live End-of-Day (EOD) market data for all 40 stocks in parallel using Yahoo Finance via RapidAPI.
  4. Cleans and normalizes the raw API responses into structured stock objects.
  5. Sends the data to an AI agent which identifies exactly 3 swing trade setups with entry, target, stop loss, and reasoning.
  6. Delivers formatted trade alerts to a Telegram channel or group.
  7. Logs every trade recommendation into a Google Sheet for historical tracking.

What you need

  1. A RapidAPI account with access to the Yahoo Finance API (apidojo-yahoo-finance-v1).
  2. A Telegram Bot token and a Chat ID (channel or group) where alerts will be delivered.
  3. A Google account with a Google Sheet set up for trade logging.
  4. A Needle Google connector authorized for Google Sheets write access.
  5. A Needle Telegram connector authorized with your Bot token.

Configuration Variables

VariableTypeDescription
RAPIDAPI_KEYSecretYour RapidAPI key for Yahoo Finance access
TELEGRAM_CHAT_IDStringThe ID of the Telegram channel or group
sheetIdStringID of the Google Sheet for logging trades
worksheetIdStringID of the specific worksheet inside the Google Sheet

How the flow works

  1. Scheduled Trigger: Fires automatically every Monday through Friday at 4:05 PM IST using the cron expression 5 16 * * 1-5. No manual action is needed once published.
  2. Stock Ticker List: A code node defines the watchlist of 40 NSE symbols covering all major Nifty 50 sectors. It outputs an array of ticker objects, enabling the next node to run in parallel.
  3. Yahoo Finance HTTP Request: Fetches live EOD market quote data for every ticker simultaneously using RapidAPI. Run mode is set to item so all 40 requests happen in parallel.
  4. Data Parser and Normalizer: A code node processes raw API responses and extracts technical fields (price, volume, moving averages, etc.). Invalid or empty responses are filtered out gracefully.
  5. AI Agent: Receives the full normalized dataset and uses deep technical analysis to identify exactly 3 high-probability swing trade setups. It evaluates Moving Average crossovers, volume confirmation, support and resistance levels, risk to reward ratios, and valuation. The temperature is set to 0.2 for consistent, analytical responses.
  6. Trade Array Normalizer: A code node ensures the AI output is always a clean flat array before it is passed to the output nodes.
  7. Telegram Alert Node: Sends a clean formatted markdown message to your Telegram channel for each trade.
  8. Google Sheets Logger Node: Appends one row per trade recommendation to your tracking spreadsheet, capturing all fields for performance review.

Output

You get 3 actionable swing trade ideas every weekday evening delivered to:

  1. Your Telegram channel or group as formatted real-time alerts.
  2. A Google Sheet that builds into a historical trade journal over time.

Trade Details Captured:

FieldDescription
SymbolThe stock ticker symbol
DirectionBuy or Sell recommendation
EntrySuggested entry price
TargetPrice target for the trade
Stop LossLevel to cut losses
TimeframeExpected holding period (e.g., 3 to 15 trading days)
ReasonA concise technical reason grounded in the EOD data

Notes

  1. This workflow uses only the EOD data fetched during the run. The AI does not access real-time intraday data or external news.
  2. Ensure your RapidAPI plan supports at least 40 requests per call to avoid rate limiting.
  3. The Google Sheet must have column headers matching the trade fields before the first run.
  4. This workflow is for educational and informational purposes only. It does not constitute financial advice.
  5. You can expand the stock universe by editing the ticker list in the Code Node.

Want to showcase your own workflows?

Become a Needle workflow partner and turn your expertise into recurring revenue.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .