๐Ÿ“ˆ Send a daily Nifty 50 market brief using Gemini AI, Nifty 50 API and Gmail

โšก 174 views ยท ๐Ÿ“ˆ Crypto Trading & Stock Market

Description

Daily Market Brief Automation

> n8n, Gemini AI, Nifty 50 API & Gmail

This workflow automatically generates and emails a concise daily stock market brief at 9:30 AM using real-time Nifty 50 data, financial news and AI-powered insights.

Quick Implementation Steps

  1. Import the workflow JSON into your n8n account
  2. Configure Google Gemini API credentials
  3. Set your recipient email in Gmail node
  4. Activate the workflow
  5. Sit back and receive daily market summaries automatically

What It Does

This workflow automates the creation of a daily stock market brief by combining real-time stock data and financial news with AI-driven insights.

Every day at 9:30 AM, the workflow fetches the latest Nifty 50 stock prices and financial news from public APIs. It processes stock data to identify top gainers and losers, while simultaneously analyzing news sentiment using Google Gemini AI.

Finally, it generates a crisp, human-readable market summary (under 120 words) and sends it via emailโ€”ensuring you stay informed without manual effort.

Who Itโ€™s For

Requirements

To use this workflow, you need:

How It Works & Setup Instructions

Step 1: Schedule Trigger

You can modify timing based on your market preference.

Step 2: Fetch Data

Stock Prices

Market News

Step 3: Process Stock Data

  1. Extract Price Data

    • Extracts prices object from API response
  2. Normalize Price Data

    • Converts object into array format
  3. Calculate Gainers & Losers

    • Sorts stocks by percentage change
    • Identifies:
      • Top 10 Gainers
      • Top 10 Losers

Step 4: Analyze News with AI

  1. Analyze News Sentiment (AI)
    • Uses Google Gemini to:
      • Extract stock names
      • Determine sentiment (Bullish / Bearish / Mixed)
      • Provide short reasoning
  2. Parse News Response
    • Converts AI output into structured JSON

Step 5: Merge & Validate Data

Step 6: Generate AI Market Brief

Node: Generate Market Brief (AI)

Uses Gemini AI to generate:

Output Format:

Step 7: Send Email

Node: Send Email Report

Required Setup:

How To Customize Nodes

Modify Stock List

Change Schedule

Customize AI Prompts

You can:

Customize Email

Add-ons (Enhancements)

Use Case Examples

  1. Daily Investor Briefing

    • Receive quick updates before market decisions
  2. Portfolio Monitoring

    • Track gainers/losers affecting your holdings
  3. Financial Newsletter Automation

    • Use output as ready-to-send content
  4. Trading Desk Alerts

    • Provide morning insights to trading teams
  5. Market Research Support

    • Automate initial research summaries

There can be many more use cases depending on how you extend this workflow.

Troubleshooting Guide

IssuePossible CauseSolution
No email receivedGmail not configuredAdd credentials and recipient email
Empty market briefAPI returned no dataCheck API endpoints and responses
AI output not parsedIncorrect JSON format from AIVerify parsing logic in โ€œParse News Responseโ€ node
Workflow not triggeringScheduler misconfiguredCheck trigger time and timezone
Incorrect gainers/losersData structure mismatchValidate API response format

Need Help?

If you need assistance with:

๐Ÿ‘‰ Reach out to WeblineIndia for expert support.

Weโ€™re happy to help you automate smarter and scale faster.

๐Ÿ”— Nodes Used

HTTP Request, Gmail, Schedule Trigger, Google Gemini

๐Ÿ“ฅ Import

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

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup