Centralisez la gestion des invitations à vos événements internes (séminaires, formations, réunions), programmez les relances et archivez les réponses. L’automatisation valorise la participation et optimise l’organisation.
Centralisez la gestion des invitations à vos événements internes (séminaires, formations, réunions), programmez les relances et archivez les réponses. L’automatisation valorise la participation et optimise l’organisation.
{
"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": "=# OverviewnYou are an AI agent specialized in stock analysis. You provide technical analysis and sentiment for stock investments by combining chart data and news sentiment.nn# Instructionsn1. 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 insightsn - 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 Hebrewn4. Translate the sentimentHebrew results to only one of these values:n"u05d7u05d9u05d5u05d1u05d9-u05d7u05d6u05e7/u05d7u05d9u05d5u05d1u05d9-u05d7u05dcu05e9/u05e0u05d9u05d9u05d8u05e8u05dcu05d9/u05e9u05dcu05d9u05dcu05d9-u05d7u05dcu05e9/u05e9u05dcu05d9u05dcu05d9-u05d7u05d6u05e7". Somewhat=u05d7u05dcu05e9.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 tooln8. 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 "u05deu05deu05dcu05d9u05e5 u05dcu05d7u05dbu05d5u05ea" value.nn## Toolsn- **technical_analysis**: Generates technical analysis based on stock chartsn- **trends_analysis**: Analyzes news sentiment for the requested stocknn## Response FormatnYou must respond with a JSON object containing exactly the following keys to fill the HTML template:nn```jsonn{n "stockSymbol": "u05e1u05d9u05deu05d5u05dc",n "analysisDate": "DD/MM/YYYY",n "recommendationClass": "positive/neutral/negative",n "recommendationTitle": "u05dbu05d5u05eau05e8u05ea u05d4u05deu05dcu05e6u05d4 u05d1u05e2u05d1u05e8u05d9u05ea",n "recommendationText": "u05d4u05e1u05d1u05e8 u05deu05e4u05d5u05e8u05d8 u05e9u05dc u05d4u05d4u05deu05dcu05e6u05d4 u05d1u05e2u05d1u05e8u05d9u05ea",n "bullishCount": 0,n "neutralCount": 0, n "bearishCount": 0,n "bullishHeight": 0,n "neutralHeight": 0,n "bearishHeight": 0,n "overallSentiment": "u05d7u05d9u05d5u05d1u05d9/u05e0u05d9u05d9u05d8u05e8u05dcu05d9/u05e9u05dcu05d9u05dcu05d9",n "Recommendation": "u05deu05deu05dcu05d9u05e5 u05dcu05e7u05e0u05d5u05ea/ u05deu05deu05dcu05d9u05e5 u05dcu05d7u05dbu05d5u05ea/ u05deu05deu05dcu05d9u05e5 u05dcu05deu05dbu05d5u05e8",n "sentimentScore": 0.00,n "chartImageUrl": "URL_PLACEHOLDER",n "technicalAnalysis": "u05e0u05d9u05eau05d5u05d7 u05d8u05dbu05e0u05d9 u05deu05e4u05d5u05e8u05d8 u05d1u05e2u05d1u05e8u05d9u05ea u05e2u05dd u05eau05d2u05d9 ",n "topArticles": [n {n "title": "u05dbu05d5u05eau05e8u05ea u05d4u05deu05d0u05deu05e8 u05d1u05e2u05d1u05e8u05d9u05ea",n "url": "u05dbu05eau05d5u05d1u05ea URL u05e9u05dc u05d4u05deu05d0u05deu05e8",n "source": "u05e9u05dd u05d4u05deu05e7u05d5u05e8 u05d1u05d0u05e0u05d2u05dcu05d9u05ea",n "date": "DD/MM/YYYY",n "sentimentClass": "bullish/neutral/bearish",n "sentimentHebrew": "u05d7u05d9u05d5u05d1u05d9-u05d7u05d6u05e7/u05d7u05d9u05d5u05d1u05d9-u05d7u05dcu05e9/u05e0u05d9u05d9u05d8u05e8u05dcu05d9/u05e9u05dcu05d9u05dcu05d9-u05d7u05dcu05e9/u05e9u05dcu05d9u05dcu05d9-u05d7u05d6u05e7"n }n ],n "hotTopics": [n {n "topic": "u05e9u05dd u05d4u05e0u05d5u05e9u05d0 u05d1u05e2u05d1u05e8u05d9u05ea",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 AgentnAI 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 ToolnA 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 ToolnA 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": "u05e1u05d9u05deu05d5u05dc",n "analysisDate": "DD/MM/YYYY",n "recommendationClass": "positive/neutral/negative",n "recommendationTitle": "u05dbu05d5u05eau05e8u05ea u05d4u05deu05dcu05e6u05d4 u05d1u05e2u05d1u05e8u05d9u05ea",n "recommendationText": "u05d4u05e1u05d1u05e8 u05deu05e4u05d5u05e8u05d8 u05e9u05dc u05d4u05d4u05deu05dcu05e6u05d4 u05d1u05e2u05d1u05e8u05d9u05ea",n "bullishCount": 0,n "neutralCount": 0, n "bearishCount": 0,n "bullishHeight": 0,n "neutralHeight": 0,n "bearishHeight": 0,n "overallSentiment": "u05d7u05d9u05d5u05d1u05d9/u05e0u05d9u05d9u05d8u05e8u05dcu05d9/u05e9u05dcu05d9u05dcu05d9",n "Recommendation": "u05deu05deu05dcu05d9u05e5 u05dcu05e7u05e0u05d5u05ea/ u05deu05deu05dcu05d9u05e5 u05dcu05d7u05dbu05d5u05ea/ u05deu05deu05dcu05d9u05e5 u05dcu05deu05dbu05d5u05e8",n "sentimentScore": 0.00,n "chartImageUrl": "URL_PLACEHOLDER",n "technicalAnalysis": "u05e0u05d9u05eau05d5u05d7 u05d8u05dbu05e0u05d9 u05deu05e4u05d5u05e8u05d8 u05d1u05e2u05d1u05e8u05d9u05ea u05e2u05dd u05eau05d2u05d9
",n "topArticles": [n {n "title": "u05dbu05d5u05eau05e8u05ea u05d4u05deu05d0u05deu05e8",n "url": "u05dbu05eau05d5u05d1u05ea URL u05e9u05dc u05d4u05deu05d0u05deu05e8",n "source": "u05e9u05dd u05d4u05deu05e7u05d5u05e8",n "date": "DD/MM/YYYY",n "sentimentClass": "bullish/neutral/bearish",n "sentimentHebrew": "u05d7u05d9u05d5u05d1u05d9-u05d7u05d6u05e7/u05d7u05d9u05d5u05d1u05d9-u05d7u05dcu05e9/u05e0u05d9u05d9u05d8u05e8u05dcu05d9/u05e9u05dcu05d9u05dcu05d9-u05d7u05dcu05e9/u05e9u05dcu05d9u05dcu05d9-u05d7u05d6u05e7"n }n ],n "hotTopics": [n {n "topic": "u05e9u05dd u05d4u05e0u05d5u05e9u05d0 u05d1u05e2u05d1u05e8u05d9u05ea",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": "nnn n n
u05e0u05d9u05eau05d5u05d7 u05deu05e0u05d9u05d9u05ea {{ $('AI Agent').item.json.output.stockSymbol }} nnn n n n n n n u05e0u05d9u05eau05d5u05d7 u05deu05e0u05d9u05d9u05ea {{ $('AI Agent').item.json.output.stockSymbol }}
n u05eau05d0u05e8u05d9u05da: {{ $('AI Agent').item.json.output.analysisDate }}n n n n n n n n n n n n u2696ufe0fn n {{ $('AI Agent').item.json.output.recommendationTitle }}
n {{ $json.message.content.recommendationText }}
n n n nn n n u05e0u05d9u05eau05d5u05d7 u05d8u05dbu05e0u05d9
n n n
n n n n {{ $json.message.content.technicalAnalysis }}n n n n n n u05e0u05d9u05eau05d5u05d7 u05e1u05e0u05d8u05d9u05deu05e0u05d8 u05e9u05d5u05e7
n n n n n n {{ $('AI Agent').item.json.output.bullishCount }}n n u05d7u05d9u05d5u05d1u05d9n n n {{ $('AI Agent').item.json.output.neutralCount }}n n u05e0u05d9u05d9u05d8u05e8u05dcu05d9n n n {{ $('AI Agent').item.json.output.bearishCount }}n n u05e9u05dcu05d9u05dcu05d9n n n
n n n u05d4u05e1u05e0u05d8u05d9u05deu05e0u05d8 u05d4u05dbu05dcu05dcu05d9 u05dcu05deu05e0u05d9u05d9u05ea {{ $('AI Agent').item.json.output.stockSymbol }} u05d4u05d5u05d0 n {{ $('AI Agent').item.json.output.overallSentiment }} n u05e2u05dd u05e6u05d9u05d5u05df u05e9u05dc {{ $('AI Agent').item.json.output.sentimentScore }}n n n n n n u05deu05d0u05deu05e8u05d9u05dd u05deu05e9u05e4u05d9u05e2u05d9u05dd
n n n n n n n n n n n {{ $('AI Agent').item.json.output.topArticles[0].title }}n
n n n {{ $('AI Agent').item.json.output.topArticles[0].source }} | {{ $('AI Agent').item.json.output.topArticles[0].date }} n n n {{ $('AI Agent').item.json.output.topArticles[0].sentimentHebrew }}n n n n
n n n
n n n n n n n n n n n n {{ $('AI Agent').item.json.output.topArticles[1].title }}n
n n n {{ $('AI Agent').item.json.output.topArticles[1].source }} | {{ $('AI Agent').item.json.output.topArticles[1].date }} n n n {{ $('AI Agent').item.json.output.topArticles[1].sentimentHebrew }}n n n n
n n n
n n n n n n n n n n n n {{ $('AI Agent').item.json.output.topArticles[2].title }}n
n n n {{ $('AI Agent').item.json.output.topArticles[2].source }} | {{ $('AI Agent').item.json.output.topArticles[2].date }} n n n {{ $('AI Agent').item.json.output.topArticles[2].sentimentHebrew }}n n n n
n n n
n n n n n n n n n n n n {{ $('AI Agent').item.json.output.topArticles[3].title }}n
n n n {{ $('AI Agent').item.json.output.topArticles[3].source }} | {{ $('AI Agent').item.json.output.topArticles[3].date }} n n n {{ $('AI Agent').item.json.output.topArticles[3].sentimentHebrew }}n n n n
n n n
n n n n n n n n n n n n {{ $('AI Agent').item.json.output.topArticles[4].title }}n
n n n {{ $('AI Agent').item.json.output.topArticles[4].source }} | {{ $('AI Agent').item.json.output.topArticles[4].date }} n n n {{ $('AI Agent').item.json.output.topArticles[4].sentimentHebrew }}n n n n
n n n
n n n
n n n n n u05e0u05d5u05e9u05d0u05d9u05dd u05d7u05deu05d9u05dd
n n n u05d4u05e0u05d5u05e9u05d0u05d9u05dd u05d4u05deu05e8u05dbu05d6u05d9u05d9u05dd u05e9u05deu05d5u05e4u05d9u05e2u05d9u05dd u05d1u05d7u05d3u05e9u05d5u05ea u05e2u05dc {{ $('AI Agent').item.json.output.stockSymbol }}:
n n n n n n {{ $('AI Agent').item.json.output.hotTopics[0].topic }}n n n n {{ $('AI Agent').item.json.output.hotTopics[0].article_count }} u05deu05d0u05deu05e8u05d9u05ddn n n n n n n u05e8u05dcu05d5u05d5u05e0u05d8u05d9u05d5u05ea: {{ $('AI Agent').item.json.output.hotTopics[0].average_relevance }}n n n n n n n {{ $('AI Agent').item.json.output.hotTopics[1].topic }}n n n n {{ $('AI Agent').item.json.output.hotTopics[1].article_count }} u05deu05d0u05deu05e8u05d9u05ddn n n n n n n u05e8u05dcu05d5u05d5u05e0u05d8u05d9u05d5u05ea: {{ $('AI Agent').item.json.output.hotTopics[1].average_relevance }}n n n n n n n {{ $('AI Agent').item.json.output.hotTopics[2].topic }}n n n n {{ $('AI Agent').item.json.output.hotTopics[2].article_count }} u05deu05d0u05deu05e8u05d9u05ddn n n n n n n u05e8u05dcu05d5u05d5u05e0u05d8u05d9u05d5u05ea: {{ $('AI Agent').item.json.output.hotTopics[2].average_relevance }}n n n n n n n {{ $('AI Agent').item.json.output.hotTopics[3].topic }}n n n n {{ $('AI Agent').item.json.output.hotTopics[3].article_count }} u05deu05d0u05deu05e8u05d9u05ddn n n n n n n u05e8u05dcu05d5u05d5u05e0u05d8u05d9u05d5u05ea: {{ $('AI Agent').item.json.output.hotTopics[3].average_relevance }}n n n n n n n {{ $('AI Agent').item.json.output.hotTopics[4].topic }}n n n n {{ $('AI Agent').item.json.output.hotTopics[4].article_count }} u05deu05d0u05deu05e8u05d9u05ddn n n n n n n u05e8u05dcu05d5u05d5u05e0u05d8u05d9u05d5u05ea: {{ $('AI Agent').item.json.output.hotTopics[4].average_relevance }}n n n nt n n n n u05d3u05d5u05d7 u05d6u05d4 u05e0u05d5u05e6u05e8 u05d1u05d0u05d5u05e4u05df u05d0u05d5u05d8u05d5u05deu05d8u05d9 u05d5u05d0u05d9u05e0u05d5 u05deu05d4u05d5u05d5u05d4 u05d4u05deu05dcu05e6u05ea u05d4u05e9u05e7u05e2u05d4.
n u05d9u05e9 u05dcu05d4u05eau05d9u05d9u05e2u05e5 u05e2u05dd u05d9u05d5u05e2u05e5 u05d4u05e9u05e7u05e2u05d5u05ea u05deu05d5u05e8u05e9u05d4 u05dcu05e4u05e0u05d9 u05e7u05d1u05dcu05ea u05d4u05d7u05dcu05d8u05d5u05ea u05d4u05e9u05e7u05e2u05d4.
n n n u05e0u05d1u05e0u05d4 u05d1-u2764ufe0f u05e2"u05d9 u05e2u05d9u05dcu05d9 u05d2u05d6n n n n nnn"
},
"typeVersion": 1.2
},
{
"id": "84a2fe62-e936-49ca-83d6-a02371e02166",
"name": "Send Stock Analysis",
"type": "n8n-nodes-base.emailSend",
"position": [
2280,
-100
],
"webhookId": "0de4d8cd-3519-4a4a-a05b-a9c973b64141",
"parameters": {
"html": "={{ $json.html }}",
"options": {},
"subject": "=u05d4u05e1u05e7u05d9u05e8u05d4 u05d4u05d9u05d5u05deu05d9u05ea u05e9u05dc u05deu05e0u05d9u05d9u05ea {{ $('AI Agent').item.json.output.stockSymbol }}: {{ $('AI Agent').item.json.output.analysisDate }}",
"toEmail": "={{ $('On form submission').item.json["Email:"] }}",
"fromEmail": "Elay's AI Assistant "
},
"credentials": {
"smtp": {
"id": "583PMpoYf46gbncd",
"name": "SMTP account"
}
},
"executeOnce": false,
"typeVersion": 2.1
},
{
"id": "36943e20-b0fc-40b0-b695-e0bdbd9182d1",
"name": "Adjust HTML Colors",
"type": "n8n-nodes-base.code",
"position": [
2080,
-100
],
"parameters": {
"jsCode": "// New function to remove topics with only one article - ultra-simple approachnfunction removeSingleArticleTopics(html) {n // First, see if there are any topics with exactly 1 articlen if (!html.includes('1 u05deu05d0u05deu05e8u05d9u05dd')) {n console.log('No topics with 1 article found');n return html;n }nn // Find each line that contains the "u05e0u05d5u05e9u05d0" commentn // and check if it has exactly 1 article mentionedn const lines = html.split('\n');n const linesToRemove = [];nn // For each line containing "1 u05deu05d0u05deu05e8u05d9u05dd", find the topic it belongs ton for (let i = 0; i < lines.length; i++) {n if (lines[i].includes('1 u05deu05d0u05deu05e8u05d9u05dd')) {n console.log(`Found line ${i} with 1 article mention`);n n // Go back to find the start of this topicn let startLine = -1;n for (let j = i; j >= 0; j--) {n if (lines[j].includes('<!-- u05e0u05d5u05e9u05d0') || n lines[j].includes('<div style="margin-bottom: 15px; padding-bottom: 15px; border-bottom:')) {n startLine = j;n break;n }n }n n if (startLine === -1) {n console.log(`Couldn't find start of topic for line ${i}`);n continue;n }n n // Go forward to find the end of this topicn let endLine = -1;n let divCount = 0;n for (let j = startLine; j < lines.length; j++) {n // Count opening divsn const openMatches = lines[j].match(/<div/g);n if (openMatches) {n divCount += openMatches.length;n }n n // Count closing divsn const closeMatches = lines[j].match(//g);n if (closeMatches) {n divCount -= closeMatches.length;n }n n // When divCount returns to 0, we've found the endn if (divCount === 0 && j > startLine) {n endLine = j;n break;n }n }n n if (endLine === -1) {n console.log(`Couldn't find end of topic for line ${i}`);n continue;n }n n // Now we have the start and end lines of the topicn console.log(`Found topic from line ${startLine} to ${endLine}`);n n // Mark these lines for removaln for (let j = startLine; j <= endLine; j++) {n linesToRemove.push(j);n }n }n }n n // Remove the marked linesn const newLines = [];n for (let i = 0; i ${getSentimentType(text)}`);n}nn// New function to remove undefined articles from HTMLnfunction removeUndefinedArticles(html) {n // Find all article blocksn const articleBlocksRegex = /\s*\s*