Skip to main content

Generate SENSEX trading signals using Gemini, Yahoo Finance and Google Sheets

Workflow preview

Workflow preview
100%
Generate SENSEX trading signals using Gemini, Yahoo Finance and Google Sheets preview
Open on n8n.io

1. Workflow Overview

AI Powered SENSEX Signal Generator Gemini, Yahoo Finance & Google Sheets This n8n workflow automatically analyzes SENSEX market data using technical indicators and AI (Google Gemini) to genera...

Best for

  • Crypto Trading automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.agent

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by WeblineIndia.

Original n8n.io source

1.1 Workflow description

Title
Generate SENSEX trading signals using Gemini, Yahoo Finance and Google Sheets
Workflow name
Generate SENSEX trading signals using Gemini, Yahoo Finance and Google Sheets

AI-Powered SENSEX Signal Generator

> Gemini, Yahoo Finance & Google Sheets


This n8n workflow automatically analyzes SENSEX market data using technical indicators and AI (Google Gemini) to generate trading signals (Buy/Sell). It filters only high-confidence signals and logs them into Google Sheets for tracking.

Quick Implementation Steps

  1. Import the workflow into your n8n account
  2. Add credentials:
  • Google Gemini API
  • Google Sheets OAuth2
  1. Create a Google Sheet with columns: Date | Index | Signal | Confidence | Trend | Reason
  2. Execute the workflow manually
  3. Check results in your Google Sheet

What It Does

This workflow automates stock market signal generation for the SENSEX index using a hybrid approach that combines technical analysis and AI-based reasoning.

First, it fetches historical market data from Yahoo Finance and computes key indicators such as moving averages, momentum, volatility and price change. These indicators help identify the current market trend and behavior.

Next, it retrieves the latest SENSEX-related news headlines and feeds both the technical data and news into a Google Gemini AI model. The AI analyzes this combined input to generate a trading signal (Buy/Sell), along with confidence, strength, risk level and reasoning.

Finally, the workflow calculates a score based on AI output, filters only high-quality signals (score > 70) and logs them into Google Sheets for further tracking and decision-making.

Who It's For

  • Traders looking for automated signal generation
  • Developers building fintech or trading tools
  • Data analysts interested in AI-driven market insights
  • Automation enthusiasts using n8n
  • Anyone exploring AI + financial data workflows

Requirements

To use this workflow, you need:

  • n8n account (self-hosted or cloud)
  • Google Gemini API credentials
  • Google Sheets OAuth2 credentials
  • A Google Sheet with predefined columns
  • Internet access for:
  • Yahoo Finance API
  • Google News RSS

How It Works & Setup Guide

Workflow Breakdown

  1. Manual Trigger
  • Starts the workflow execution manually
  1. Fetch Market Data
  • HTTP Request pulls SENSEX data from Yahoo Finance
  1. Technical Analysis
  • Code node calculates:
  • 5-day & 20-day moving averages
  • Momentum
  • Volatility
  • Price change (%)
  1. Data Structuring
  • Set node formats key metrics for AI processing
  1. Fetch Latest News
  • RSS node pulls SENSEX-related news from Google News
  1. Limit News
  • Only the latest article is passed to AI
  1. AI Signal Generation
  • Gemini AI analyzes:
  • Technical indicators
  • News sentiment
  • Outputs:
  • Signal (Buy/Sell)
  • Confidence
  • Strength
  • Risk level
  • Reason
  1. Parse AI Output
  • Converts AI response into structured JSON
  1. Score Calculation
  • Score is computed using:
  • Confidence
  • Strength
  • Risk level
  1. Validation
  • Only signals with score > 70 are accepted
  1. Store Results
  • Valid signals are appended to Google Sheets

Setup Instructions

  1. Import workflow into your n8n account
  2. Configure credentials:
  • Google Gemini API
  • Google Sheets OAuth2
  1. Update Google Sheet ID (if needed)
  2. Verify API URLs:
  • Yahoo Finance endpoint
  • Google News RSS link
  1. Execute manually using Start node
  2. Check output in Google Sheets

How To Customize Nodes

  • HTTP Request Node

  • Change index (e.g., NIFTY, NASDAQ) by updating the URL

  • Code Node (Indicators)

  • Modify moving average window (e.g., 10-day, 50-day)

  • Add RSI, MACD, etc.

  • AI Agent Prompt

  • Customize signal logic

  • Add stricter risk rules or additional outputs

  • Score Calculator

  • Adjust scoring weights:

  • Confidence threshold

  • Strength importance

  • Risk penalties

  • Google Sheets Node

  • Add more columns like:

  • Risk Level

  • Strength

  • Score

Add-ons (Enhancements)

  • Add Cron Trigger for automation (daily execution)
  • Integrate Telegram/Email alerts for signals
  • Store data in a database (PostgreSQL, MongoDB)
  • Add multi-index support (NIFTY, Dow Jones, etc.)
  • Build a dashboard (Power BI / Streamlit)
  • Include advanced indicators like RSI, MACD

Use Case Examples

  1. Automated Trading Signal Logger
  • Generate and store signals daily
  1. AI-Assisted Decision Support
  • Use signals as guidance before trading
  1. Market Trend Monitoring System
  • Track trend + volatility over time
  1. Fintech Product Prototype
  • Build an AI-based trading assistant
  1. Research & Backtesting Tool
  • Analyze historical signals and performance

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

Troubleshooting Guide

Issue Possible Cause Solution
No data from Yahoo Finance API URL incorrect or rate-limited Verify endpoint and retry
AI output not parsing Invalid JSON from AI Ensure prompt enforces strict JSON
No rows in Google Sheets Validation failed (score ≤ 70) Check score logic or lower threshold
Credential errors Missing or incorrect API keys Reconfigure credentials
Empty news input RSS feed issue Verify RSS URL and connectivity
Workflow stops early Node misconfiguration Check execution logs in n8n

Need Help?

If you need assistance with:

  • Setting up this workflow
  • Customizing AI logic
  • Adding new integrations (Telegram, dashboards, APIs)
  • Scaling this into a production-ready system

Feel free to reach out to n8n automation developers at WeblineIndia

We can help you build powerful automation workflows tailored to your business needs.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 2 - Fetching INDEX data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 3 - Code to gain insights

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - AI agent output parsing

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Validating signal

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - Log into sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 7 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 13 - Score Calculator

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - News Fetching

Type / Role
n8n-nodes-base.rssFeedRead - rssFeedRead
Config choices
Version 1.2

Block 16 - Extrating latest news

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 17 - Parse Important Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Start

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

3. Summary Table

Workflow Generate SENSEX trading signals using Gemini, Yahoo Finance and Google Sheets
Complexity advanced
Nodes 18
Categories Crypto Trading, AI Summarization
Author WeblineIndia
Published 13 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15679/15679.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate SENSEX trading signals using Gemini, Yahoo Finance and Google Sheets do?

AI Powered SENSEX Signal Generator Gemini, Yahoo Finance & Google Sheets This n8n workflow automatically analyzes SENSEX market data using technical indicators and AI (Google Gemini) to genera...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading, AI Summarization use case.