Deploy an advanced n8n workflow to analyze stock technicals and news sentiment using GPT-4, TwelveData, and NewsAPI. Generate actionable trading recommendations automatically with this n8n template.
Download this n8n workflow template and start using it instantly.
This comprehensive n8n workflow addresses the complexity of manual financial analysis by integrating real-time stock data (technical indicators from TwelveData) and market news sentiment (from NewsAPI/GPT-4) into a single, highly structured AI decision engine. This powerful n8n automation starts with a simple chat message and orchestrates multiple external APIs and specialized AI models. The core decision logic resides within a Langchain Agent n8n node, which is configured to act as an expert algorithmic trader. It prioritizes risk management and ensures trend alignment across 4-hour, daily, and weekly timeframes before delivering a clear BUY, SELL, or HOLD signal. This is an essential n8n template for sophisticated finance automation, ensuring every recommendation is backed by both technical and fundamental data.
The entire process begins with the When chat message received n8n trigger, which initiates the n8n workflow upon a user request.
Convert to Stock Symbol OpenAI n8n node, which strictly returns the stock ticker (e.g., 'MSFT').4h trend, 1day trend, 1week trend) fetch time-series pricing data from the TwelveData API using the extracted symbol.Check Twelvedata API Success Switch n8n node. If the API returns an error, the flow terminates, and the Respond with Error n8n node notifies the user.Code n8n node executes a complex JavaScript function to calculate key technical indicators: Moving Averages (MA5, MA10, MA20), multi-timeframe trend direction, support, resistance, and volume profiles. This creates a clean JSON structure for the AI agent.Get News n8n node fetches recent headlines using NewsAPI. The News Sentiment Analyzer OpenAI n8n node then analyzes this text, returning a structured sentiment score and rationale.Technical Data AI Agent n8n node (powered by the GPT-4o language model) utilizes its predefined persona and trading framework. It can use specialized tools like Get Stock Sentiment (Perplexity) and Get Chart Image for Stock (Chart-Img API) to gather external context and visual aids, adhering to strict trading rules (e.g., minimum 1:2 risk/reward ratio).Respond to Chat n8n node.To deploy this powerful n8n workflow, follow these steps:
Get Stock Sentiment n8n node requires a Perplexity API key for additional real-time analysis.When chat message received n8n trigger by sending a sample message to the configured endpoint. When chat message received (n8n trigger): The starting point of this n8n workflow. It monitors for user chat inputs, typically a stock name or ticker, sending the content to the next step.
Convert to Stock Symbol (OpenAI n8n node): Uses a small GPT model (GPT-4.1-mini) to reliably convert natural language stock names into strict trading symbols required for the data APIs.
HTTP Request (n8n node - TwelveData): Used three times to fetch critical time-series data for 4-hour, 1-day, and 1-week intervals, crucial for multi-timeframe analysis within the n8n workflow.
Code (n8n node): Contains extensive custom JavaScript logic. Its function is to transform raw TwelveData JSON into calculated financial metrics (MAs, Support/Resistance, Trend Direction) suitable for complex consumption by the final LLM agent.
News Sentiment Analyzer (OpenAI n8n node): Analyzes fetched news articles to derive a precise, quantified sentiment score and rationale, outputting a strict JSON payload.
Technical Data AI Agent (Langchain Agent n8n node): The core intelligence of the n8n workflow. It combines technical analysis and sentiment data and uses its internal systemMessage (Algorithmic Trader persona) and tools (Perplexity, Chart-Img, GPT-4o) to execute a sophisticated trade analysis and produce the final, actionable recommendation. This specialized n8n node is central to the decision process.
Automate abandoned cart recovery for Shopify using this smart n8n workflow template. It leverages AI (GPT-4o-mini) to generate personalized emails, waits 1 hour, and ensures timely follow-up, boosting recovery rates.

Automate shipping priority determination using Google Gemini within an n8n workflow. Analyze Google Sheets data and mark the highest priority order.

Use this powerful n8n workflow to monitor RSS feeds, leverage DeepSeek AI for article summarization and sentiment analysis, and receive targeted, relevant news alerts directly on Slack. A high-value n8n template.

Automate travel planning with this advanced n8n workflow. It searches Skyscanner and Booking.com APIs, generates optimized flight and hotel combinations, and delivers a ranked HTML itinerary via Gmail using custom n8n node logic.

AI Automation Specialist - OpenAI, CRM & Automation Expert with a solid understanding of various tools that include Zapier, Make, Zoho CRM, Hubspot, Google Sheets, Airtable, Pipedrive, Google Analytics, and more.







































