{ "meta": { "instanceId": "6c3d8936583f8a98fa8ebe06f510117c0e8fff2df771e73deba4126a853eb55e" }, "nodes": [ { "id": "a9bbe9d0-51aa-40f8-8931-f405c695c732", "name": "Window Buffer Memory", "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", "position": [ 1140, 140 ], "parameters": { "sessionKey": "=335458847", "sessionIdType": "customKey" }, "typeVersion": 1.3 }, { "id": "2d6315d6-959d-4e16-97ed-30839d826ce2", "name": "AI Agent", "type": "@n8n/n8n-nodes-langchain.agent", "position": [ 1080, -100 ], "parameters": { "text": "=Ticker = {{ $json[\"Ticker symbol:\"] }}", "options": { "systemMessage": "=# Overview\nYou are an AI agent specialized in stock analysis. You provide technical analysis and sentiment for stock investments by combining chart data and news sentiment.\n\n# Instructions\n1. When a user requests an analysis of a stock with its symbol:\n - Send the stock symbol to both tools **technical_analysis** and **trends_analysis**\n - Analyze the combined data and prepare a JSON report with your insights\n - Provide a clear recommendation (positive, neutral, or negative)\n2. Your output must be in the format of a structured JSON object that will be used to fill an HTML template.\n3. Translate the article titles in topArticles to Hebrew\n4. Translate the sentimentHebrew results to only one of these values:\n\"חיובי-חזק/חיובי-חלש/נייטרלי/שלילי-חלש/שלילי-חזק\". Somewhat=חלש.\n5. Write the Date value in each article: \"topArticles\" only in this format: \"DD/MM/YYYY\".\n6. Update the technicalAnalysis value as a detailed technical analysis of three paragraphs, which explains even to those who don't understand economics what you did and how you reached your conclusions. Touch on all the indicators examined (Volume, EMA, RSI, Fibonacci retracement, MACD, Bollinger bands, Resistance and support levels)\n7. Ensure that the text in the technicalAnalysis value is written in proper Hebrew, like a professional analyst. Use the think tool\n8. In the Recommendation value - recommend to buy or sell only if you think with high probability that there will be a rise or fall. Use the think tool to verify your Recommendation based on recommendationText. Advise something only if you really believe it. Your default is the \"ממליץ לחכות\" value.\n\n## Tools\n- **technical_analysis**: Generates technical analysis based on stock charts\n- **trends_analysis**: Analyzes news sentiment for the requested stock\n\n## Response Format\nYou must respond with a JSON object containing exactly the following keys to fill the HTML template:\n\n```json\n{\n \"stockSymbol\": \"סימול\",\n \"analysisDate\": \"DD/MM/YYYY\",\n \"recommendationClass\": \"positive/neutral/negative\",\n \"recommendationTitle\": \"כותרת המלצה בעברית\",\n \"recommendationText\": \"הסבר מפורט של ההמלצה בעברית\",\n \"bullishCount\": 0,\n \"neutralCount\": 0, \n \"bearishCount\": 0,\n \"bullishHeight\": 0,\n \"neutralHeight\": 0,\n \"bearishHeight\": 0,\n \"overallSentiment\": \"חיובי/נייטרלי/שלילי\",\n \"Recommendation\": \"ממליץ לקנות/ ממליץ לחכות/ ממליץ למכור\",\n \"sentimentScore\": 0.00,\n \"chartImageUrl\": \"URL_PLACEHOLDER\",\n \"technicalAnalysis\": \"ניתוח טכני מפורט בעברית עם תגי
\",\n \"topArticles\": [\n {\n \"title\": \"כותרת המאמר בעברית\",\n \"url\": \"כתובת URL של המאמר\",\n \"source\": \"שם המקור באנגלית\",\n \"date\": \"DD/MM/YYYY\",\n \"sentimentClass\": \"bullish/neutral/bearish\",\n \"sentimentHebrew\": \"חיובי-חזק/חיובי-חלש/נייטרלי/שלילי-חלש/שלילי-חזק\"\n }\n ],\n \"hotTopics\": [\n {\n \"topic\": \"שם הנושא בעברית\",\n \"article_count\": 0,\n \"average_relevance\": \"0.00\"\n }\n ]\n}" }, "promptType": "define", "hasOutputParser": true }, "typeVersion": 1.7 }, { "id": "14112026-19eb-493f-971b-28455a8d4412", "name": "Sticky Note", "type": "n8n-nodes-base.stickyNote", "position": [ 680, -220 ], "parameters": { "color": 4, "width": 1820, "height": 580, "content": "# AI Agent\nAI agent powered by GPT-4o that analyses stocks by combining technical analysis and news sentiment, generating detailed reports in Hebrew with data-driven investment recommendations" }, "typeVersion": 1 }, { "id": "8b2e573e-7acc-4b0b-a708-4ce33873a893", "name": "Sticky Note1", "type": "n8n-nodes-base.stickyNote", "position": [ 680, 380 ], "parameters": { "width": 2820, "height": 920, "content": "# Technical Analysis Tool\nA tool that performs in-depth technical analysis of stock charts by combining visual pattern recognition with quantitative indicators. It fetches data from Chart-img API for generating visual charts, Twelve Data API for historical prices and technical indicators (Bollinger Bands, MACD), and uses OpenAI's GPT-4o for visual chart pattern recognition.\nThe system synthesizes this multi-source data into a comprehensive technical assessment with actionable trading insights based on support/resistance levels, Fibonacci retracements, and candlestick patterns." }, "typeVersion": 1 }, { "id": "b0d49fa6-5c57-4ab5-a752-93d7d278b8fa", "name": "Sticky Note2", "type": "n8n-nodes-base.stickyNote", "position": [ 2520, -220 ], "parameters": { "width": 980, "height": 580, "content": "# Trends Analysis Tool\nA tool that analyses news sentiment for requested stocks by fetching recent financial news articles, calculating sentiment metrics, identifying influential stories, and extracting trending topics. It processes data from Alpha Vantage's news API, determines overall market sentiment, and delivers structured analysis on stock sentiment, relevance, and market outlook." }, "typeVersion": 1 }, { "id": "13a242cf-0a01-4aea-a58e-9b734aed912c", "name": "Structured Output Parser", "type": "@n8n/n8n-nodes-langchain.outputParserStructured", "position": [ 1900, 140 ], "parameters": { "schemaType": "manual", "inputSchema": "{\n \"stockSymbol\": \"סימול\",\n \"analysisDate\": \"DD/MM/YYYY\",\n \"recommendationClass\": \"positive/neutral/negative\",\n \"recommendationTitle\": \"כותרת המלצה בעברית\",\n \"recommendationText\": \"הסבר מפורט של ההמלצה בעברית\",\n \"bullishCount\": 0,\n \"neutralCount\": 0, \n \"bearishCount\": 0,\n \"bullishHeight\": 0,\n \"neutralHeight\": 0,\n \"bearishHeight\": 0,\n \"overallSentiment\": \"חיובי/נייטרלי/שלילי\",\n \"Recommendation\": \"ממליץ לקנות/ ממליץ לחכות/ ממליץ למכור\",\n \"sentimentScore\": 0.00,\n \"chartImageUrl\": \"URL_PLACEHOLDER\",\n \"technicalAnalysis\": \"ניתוח טכני מפורט בעברית עם תגי
\",\n \"topArticles\": [\n {\n \"title\": \"כותרת המאמר\",\n \"url\": \"כתובת URL של המאמר\",\n \"source\": \"שם המקור\",\n \"date\": \"DD/MM/YYYY\",\n \"sentimentClass\": \"bullish/neutral/bearish\",\n \"sentimentHebrew\": \"חיובי-חזק/חיובי-חלש/נייטרלי/שלילי-חלש/שלילי-חזק\"\n }\n ],\n \"hotTopics\": [\n {\n \"topic\": \"שם הנושא בעברית\",\n \"article_count\": 0,\n \"average_relevance\": \"0.00\"\n }\n ]\n}" }, "typeVersion": 1.2 }, { "id": "bb5dd63a-a3e6-408e-a5c9-13e9f72f2b26", "name": "GPT 4o", "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", "position": [ 960, 140 ], "parameters": { "model": { "__rl": true, "mode": "list", "value": "gpt-4o", "cachedResultName": "gpt-4o" }, "options": {} }, "credentials": { "openAiApi": { "id": "2m1HH5crgPAhTJlv", "name": "OpenAi account" } }, "typeVersion": 1.2 }, { "id": "94d820d2-eb20-4184-8e21-1ed5936c9166", "name": "Generate HTML", "type": "n8n-nodes-base.html", "position": [ 1860, -100 ], "parameters": { "html": "\n\n
\n \n \n{{ $json.message.content.recommendationText }}
\n \n\n {{ $('AI Agent').item.json.output.bullishCount }} \n \n חיובי \n | \n \n {{ $('AI Agent').item.json.output.neutralCount }} \n \n נייטרלי \n | \n \n {{ $('AI Agent').item.json.output.bearishCount }} \n \n שלילי \n | \n
\n
| \n ||||
\n
| \n ||||
\n
| \n ||||
\n
| \n ||||
\n
| \n
הנושאים המרכזיים שמופיעים בחדשות על {{ $('AI Agent').item.json.output.stockSymbol }}:
\n \n \nדוח זה נוצר באופן אוטומטי ואינו מהווה המלצת השקעה.
\nיש להתייעץ עם יועץ השקעות מורשה לפני קבלת החלטות השקעה.
\n