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.
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.
stockSymbols (e.g., TSLA, AAPL).telegramChatId for receiving the report.stockSymbols you wish to track.telegramChatId where the report will be delivered.WEIGHTS object inside the "Generate Comprehensive Recommendation" Code node.
The workflow is structured into three main phases: Data Processing, Recommendation Synthesis, and Reporting.
| Node Name | Type | Key Functionality |
|---|---|---|
| Daily Stock Check | Schedule Trigger | Initiates the entire workflow daily at the set time. |
| Analyze Stock Trends | Code | Calculates Technical Indicators: SMA (20, 50, 200), RSI (14-day), Volume Trend, and Support/Resistance levels. |
| Predict Future Trends | Code | Performs Simple Linear Regression on historical prices to determine slope and predict the price 7 days ahead. |
| Analyze News Sentiment | Code | Performs keyword-based sentiment analysis on news headlines and summaries to categorize overall sentiment (positive/negative/neutral) and assign a score. |
| Process Analyst Ratings | Code | Aggregates analyst recommendations (Buy/Hold/Sell) to calculate consensus rating and average price target. |
| Analyze Social Sentiment | Code | Performs keyword-based sentiment analysis on social media data to determine community mood and trending hashtags. |
| Node Name | Type | Description |
|---|---|---|
| Combine All Analysis | Merge | Consolidates the outputs from the four analysis branches (Technical, News, Analyst, Social) into a single data item. |
| Generate Comprehensive Recommendation | Code | The 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. |
| Node Name | Type | Description |
|---|---|---|
| Format Telegram Message | Set | Constructs the final detailed report message using Markdown formatting, pulling data from all preceding analysis nodes into a clear, structured report. |
| Send Telegram Alert | Telegram | Sends the fully formatted analysis report to the pre-configured Telegram chat ID. |