Skip to main content

Automated stock sentiment analysis with Google Gemini and EODHD News API

Workflow preview

Workflow preview
100%
Automated stock sentiment analysis with Google Gemini and EODHD News API preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Stay ahead of the market with this powerful, automated workflow that performs real time sentiment analysis on stock market news. By leveraging the advanced capabilities of Google Gemini, this solut...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.httprequest, n8n-nodes-base.splitinbatches, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.scheduletrigger

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Automated stock sentiment analysis with Google Gemini and EODHD News API
Workflow name
Automated stock sentiment analysis with Google Gemini and EODHD News API

Stay ahead of the market with this powerful, automated workflow that performs real-time sentiment analysis on stock market news. By leveraging the advanced capabilities of Google Gemini, this solution provides you with actionable insights to make informed investment decisions.

This workflow is designed for investors, traders, and financial analysts who want to automate the process of monitoring news and gauging market sentiment for specific stocks. It seamlessly integrates with Google Sheets for input and output, making it easy to track a portfolio of stocks.

Key Features & Benefits

  • Automated Daily Analysis: The workflow is triggered daily, providing you with fresh sentiment analysis just in time for the market open.
  • Dynamic Stock Tracking: Easily manage your list of tracked stocks from a simple Google Sheet.
  • AI-Powered Insights: Utilizes Google Gemini's sophisticated language model to analyze news content for its potential impact on stock prices, including a sentiment score and a detailed rationale.
  • Comprehensive News Aggregation: Fetches the latest news articles from EODHD for each of your specified stock tickers.
  • Error Handling & Validation: Includes built-in checks for invalid stock tickers and formats the AI output for reliable data logging.
  • Centralized Reporting: Automatically logs the sentiment score, rationale, and date into a Google Sheet for easy tracking and historical analysis.

How It Works

This workflow follows a systematic process to deliver automated sentiment analysis:

  1. Scheduled Trigger: The workflow begins each day at a specified time.
  2. Fetch Stock Tickers: It reads a list of stock tickers from your designated Google Sheet.
  3. Loop and Fetch News: For each ticker, it retrieves the latest news articles using the EODHD API.
  4. AI Sentiment Analysis: The collected news articles are then passed to a Google Gemini-powered AI agent. The agent is prompted to act as a stock sentiment analyzer, evaluating the news and generating:
    • A sentiment score from -1 (strong negative) to 1 (strong positive).
    • A detailed rationale explaining the basis for the score.
  5. Data Formatting & Validation: The AI's output is parsed and validated to ensure it is in the correct JSON format.
  6. Log to Google Sheets: The final sentiment score and rationale are appended to your Google Sheet, alongside the corresponding stock ticker and the current date.

Nodes Used

  • Schedule Trigger
  • Google Sheets
  • SplitInBatches
  • HttpRequest (EODHD)
  • If
  • Code (JavaScript)
  • AI Agent (LangChain)
  • Google Gemini Chat Model

This workflow is a valuable tool for anyone looking to harness the power of AI for financial market analysis. Deploy this automated solution to save time, gain a competitive edge, and make more data-driven trading decisions.

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 - AI Agent

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

Block 2 - Google Gemini Chat Model1

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

Block 3 - Get articles from EODHD

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

Block 4 - loop_over_tickers

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Read_tickers_from_Sheet

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

Block 6 - If_ticker_not_valid

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

Block 7 - Write_in_google_sheets_invalid_ticker

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

Block 8 - join_articles_into_1

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

Block 9 - format_output_as_json

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

Block 10 - if_format_succesful

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

Block 11 - write_sentiment_to_sheets

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

Block 12 - Schedule Trigger

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

Block 13 - Sticky Note

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

Block 14 - Sticky Note1

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

Block 15 - Sticky Note2

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

Block 16 - Sticky Note3

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

Block 17 - Sticky Note4

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

Block 18 - Sticky Note5

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

3. Summary Table

Workflow Automated stock sentiment analysis with Google Gemini and EODHD News API
Complexity advanced
Nodes 18
Categories Crypto Trading, AI Summarization
Author Raz Hadas
Published 26 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5369/5369.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 Automated stock sentiment analysis with Google Gemini and EODHD News API do?

Stay ahead of the market with this powerful, automated workflow that performs real time sentiment analysis on stock market news. By leveraging the advanced capabilities of Google Gemini, this solut...

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.