Skip to main content
D

DevCode Journey

3
Workflows

Workflows by DevCode Journey

Workflow preview: Real-time stock insights using xAI
Free advanced

Real-time stock insights using xAI

## 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 * **Daily Scheduling**: Automatically triggers analysis every day at a specified time (e.g., 9:00 AM). * **Multi-Factor Analysis**: Combines **four key domains** for a holistic view: Technical, Prediction, News Sentiment, Analyst Ratings, and Social Sentiment. * **Technical Indicator Calculation**: Calculates **SMA (20, 50, 200)**, **RSI (14-day)**, and identifies Support/Resistance levels. * **Price Prediction**: Uses **Simple Linear Regression** to forecast a 7-day price trend and generate an initial recommendation. * **Sentiment Analysis**: Custom Code nodes perform **keyword-based sentiment analysis** on news articles and social media posts. * **Composite Recommendation**: A weighted model combines all analysis scores (35% Technical, 25% News, 25% Analyst, 15% Social) to generate a **final recommendation, confidence score, and summary**. * **Automated Alerting**: Delivers a fully formatted, easily readable **Markdown report** via **Telegram**. ## Requirements * **API Configuration Node**: A preliminary node (implied by the expression references) containing: * Target **`stockSymbols`** (e.g., `TSLA`, `AAPL`). * **`telegramChatId`** for receiving the report. * **API Keys** for data sources (e.g., a Financial Data API for price/news/ratings, a Social Media API). * **Telegram Credentials**: For the Telegram node to send the final message. * **Financial Data Source Workflow**: Requires preceding nodes (not fully visible) to fetch: * Historical price data (required for SMA/RSI/Regression). * Recent news headlines and summaries. * Recent analyst ratings. * Social media data (e.g., from Twitter/StockTwits). * **n8n Instance**: Self-hosted or cloud-based n8n installation. --- ## How to Use ### Step-by-Step Setup #### 1. Configure Scheduling * Open the **"Daily Stock Check"** node. * Set the **interval rule** to the precise hour you want the report to run (e.g., 9:00 AM). #### 2. Configure Stock Symbol and Telegram * In the (implied) **"API Configuration"** node, set the **`stockSymbols`** you wish to track. * Set the target **`telegramChatId`** where the report will be delivered. * Ensure your Telegram credentials are set up in n8n. #### 3. Verify Data Fetching Nodes * Ensure the nodes feeding data into **"Analyze Stock Trends," "Analyze News Sentiment," "Process Analyst Ratings,"** and **"Analyze Social Sentiment"** are correctly configured to fetch the required historical price, news, ratings, and social data. #### 4. Adjust Analysis Weights (Advanced) * If you wish to change the importance of different factors, edit the **`WEIGHTS`** object inside the **"Generate Comprehensive Recommendation"** Code node. * *Default Weights:* Technical (0.35), News (0.25), Analyst (0.25), Social (0.15). #### 5. Test the Workflow * Manually execute the workflow to ensure all Code nodes process the incoming data correctly and the **"Send Telegram Alert"** successfully delivers the final, formatted message. --- ## Workflow Components The workflow is structured into three main phases: **Data Processing, Recommendation Synthesis, and Reporting.** ### 1. Data Processing and Indicator Calculation | 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. | ### 2. Recommendation Synthesis | 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. | ### 3. Reporting and Alerting | 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. | ## 🙋 For Help & Community - 👾 Discord: [n8n channel](https://discord.gg/9SDFKGnh2Y) - 🌐 Website: [devcodejourney.com](https://devcodejourney.com) - 🔗 LinkedIn: [Connect with Shakil](https://www.linkedin.com/in/shakilpg/) - 📱 WhatsApp Channel: [Join Now](https://whatsapp.com/channel/0029Vb5l6JuDTkK5BRORNn0B) - 💬 Direct Chat: [Message Now](https://wa.me/8801316320957)

D
DevCode Journey
Crypto Trading
8 Nov 2025
282
0
Workflow preview: Create your first AI agent
Free intermediate

Create your first AI agent

## Who is this for? This workflow is designed for anyone who wants to automate AI-driven chat responses integrated with Google Docs and Google Sheets, using the Google Gemini (PaLM) language model via n8n. It’s perfect for teams looking to: - Automatically generate AI replies to chat messages, - Pull content dynamically from Google Docs, ## What this Workflow Does - Receives chat messages via a webhook trigger. - Sends the chat input to the Google Gemini AI Chat Model for generating replies. - Optionally retrieves a document from Google Docs if a URL or ID is provided. - Uses an AI agent node to coordinate between the AI model and tools like Google Docs. ## Key Features - Integration with Google Gemini (PaLM) AI for natural language understanding and response generation. - Ability to fetch and use data from Google Docs dynamically. - Modular structure using n8n nodes for flexibility and easy customization. - Credential management for Google APIs (Docs, Gemini) via n8n’s built-in credential system. ## Get Your Google AI API Key 1. Visit [Google AI Studio](https://aistudio.google.com/app/apikey). 2. Click **"Create API key in new project"**. 3. Copy the API key that appears. ## Add Your Credential in n8n 1. On the **workflow canvas**, go to the **Connect your model (Google Gemini)** node. 2. Click the **Credential** dropdown and select **+ Create New Credential**. 3. Paste your **API key** into the `API Key` field. 4. Click **Save**. ## Start Chatting! 1. Go to the **Example Chat** node. 2. Click the **"Open Chat"** button in its parameter panel. 3. Try asking it one of the example questions: - _"What's your name?"_ - _"What time now in bangladesh?"_ - _"What's the weather in bangladesh?"_ You're now ready to chat with your **personal AI agent powered by Google Gemini**! 🎉 ## Requirements - n8n instance with internet access. - Google Cloud account with: - Access to PaLM API (Google Gemini). - Proper OAuth2 credentials configured in n8n for Google APIs. --- ## 🙋 For Help & Community - 👾 Discord: [n8n channel](https://discord.gg/9SDFKGnh2Y) - 🌐 Website: [devcodejourney.com](https://devcodejourney.com) - 🔗 LinkedIn: [Connect with Shakil](https://www.linkedin.com/in/shakilpg/) - 📱 WhatsApp Channel: [Join Now](https://whatsapp.com/channel/0029Vb5l6JuDTkK5BRORNn0B) - 💬 Direct Chat: [Message Now](https://wa.me/8801316320957)

D
DevCode Journey
Support Chatbot
6 Oct 2025
78
0
Workflow preview: Build a Telegram chatbot with Gemini
Free intermediate

Build a Telegram chatbot with Gemini

## Overview - This workflow connects a Telegram bot to OpenAi/Google Gemini (PaLM API) so the bot can reply to users with AI-generated answers. - Useful for FAQs, assistants, classroom helpers, or bots that fetch document content to answer questions. Who is this for - Educators, creators, developers, and support teams who want a low-code Telegram chatbot powered by Gemini. What it does (quick) - Listens for messages sent to your Telegram bot. - Sends incoming text to Google Gemini and receives a generated reply. - Optionally fetches content from Google Docs or an external API to enrich replies. - Sends the reply back to the original Telegram user. - Processes messages in batches and adds short delays to avoid spamming. Quick setup (5 steps) 1. Create a Telegram bot with @BotFather and copy the bot token. 2. Add Telegram credentials to n8n (Telegram node). 3. OpenAi API key and add it to n8n. 3. Get a Google Gemini (PaLM) API key and add it to n8n. 4. (Optional) Connect Google Docs OAuth2 if you want the bot to read documents. 5. Activate the workflow and test by messaging the bot. Required items - Telegram bot token - OpenAi API key - Google Gemini (PaLM) API key - n8n instance with Telegram and HTTP nodes enabled - (Optional) Google Docs OAuth2 credential How it works (step-by-step) 1. Telegram message arrives → Trigger node. 2. Workflow extracts message and user info. 3. (Optional) Pull supporting content from Google Docs or an API. 4. Send prompt + context to Gemini → receive reply. 5. Send reply back to the Telegram user. 6. Add small delays and batch processing to handle volume safely. How to customize - Edit the Gemini prompt to change response style and behavior. - OpenAi Chat model - Switch Gemini model (Flash vs Pro) for speed vs. quality. - Add conditions (If / Switch) to route different inputs to different behaviors. - Append more data sources (Sheets, external APIs) to enrich replies. - Add error handling to retry or log failed requests. Testing checklist - Send a test message to the bot and confirm a reply. - If using Google Docs, confirm the bot can read the target document. - Check logs and node outputs in n8n for any errors. Tips and best practices - Keep prompts concise and include only needed context to reduce costs. - Use rate limiting (Wait node) and batching to avoid API throttling. - Store API keys securely in n8n credentials. - Start with small tests before enabling automated production runs. ## 🙋 For Help & Community - 👾 Discord: [n8n channel](https://discord.gg/9SDFKGnh2Y) - 🌐 Website: [devcodejourney.com](https://devcodejourney.com) - 🔗 LinkedIn: [Connect with Shakil](https://www.linkedin.com/in/shakilpg/) - 📱 WhatsApp Channel: [Join Now](https://whatsapp.com/channel/0029Vb5l6JuDTkK5BRORNn0B) - 💬 Direct Chat: [Message Now](https://wa.me/8801316320957)

D
DevCode Journey
Support Chatbot
16 Sep 2025
1869
0