📈 Real-time stock insights using xAI

455 views · 📈 Crypto Trading & Stock Market

💡 Pro Tip — Twitter’s API is paid now, which makes simple data pulls expensive. ScraperNode is a community node that scrapes Twitter profiles and posts without needing API access.

View All Scrapers

Description

Who is this for?

This n8n workflow is designed for investors, financial analysts, automated trading system developers, and finance enthusiasts who require daily, comprehensive, data-driven insights into specific stock symbols. It’s perfect for users who need to automate the complex process of combining technical indicators, news sentiment, professional analyst ratings, and social media buzz into a single, actionable recommendation. This system provides a 24/7 automated “analyst” for portfolio monitoring.

What this Workflow Does

This n8n workflow executes a daily, multi-faceted analysis of a target stock. It starts by gathering all relevant data (price history, news, ratings, social posts) and processes it through specialized Code nodes to calculate technical indicators (SMA, RSI), determine price predictions (Linear Regression), and perform sentiment analysis on news and social media. Finally, it uses a weighted model to synthesize all data into a single, comprehensive Buy/Sell/Hold recommendation and delivers a detailed report via Telegram.

Key Features

Requirements


How to Use

Step-by-Step Setup

1. Configure Scheduling

2. Configure Stock Symbol and Telegram

3. Verify Data Fetching Nodes

4. Adjust Analysis Weights (Advanced)

5. Test the Workflow


Workflow Components

The workflow is structured into three main phases: Data Processing, Recommendation Synthesis, and Reporting.

1. Data Processing and Indicator Calculation

Node NameTypeKey Functionality
Daily Stock CheckSchedule TriggerInitiates the entire workflow daily at the set time.
Analyze Stock TrendsCodeCalculates Technical Indicators: SMA (20, 50, 200), RSI (14-day), Volume Trend, and Support/Resistance levels.
Predict Future TrendsCodePerforms Simple Linear Regression on historical prices to determine slope and predict the price 7 days ahead.
Analyze News SentimentCodePerforms keyword-based sentiment analysis on news headlines and summaries to categorize overall sentiment (positive/negative/neutral) and assign a score.
Process Analyst RatingsCodeAggregates analyst recommendations (Buy/Hold/Sell) to calculate consensus rating and average price target.
Analyze Social SentimentCodePerforms keyword-based sentiment analysis on social media data to determine community mood and trending hashtags.

2. Recommendation Synthesis

Node NameTypeDescription
Combine All AnalysisMergeConsolidates the outputs from the four analysis branches (Technical, News, Analyst, Social) into a single data item.
Generate Comprehensive RecommendationCodeThe core logic. Calculates a weighted composite score (from -100 to 100) based on all four inputs, generating the final STRONG BUY/BUY/HOLD/SELL/STRONG SELL recommendation and a numerical confidence score.

3. Reporting and Alerting

Node NameTypeDescription
Format Telegram MessageSetConstructs the final detailed report message using Markdown formatting, pulling data from all preceding analysis nodes into a clear, structured report.
Send Telegram AlertTelegramSends the fully formatted analysis report to the pre-configured Telegram chat ID.

🙋 For Help & Community

🔗 Nodes Used

HTTP Request, Telegram, Schedule Trigger, Basic LLM Chain, Anthropic Chat Model, OpenAI Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup