{
  "name": "Automated stock analysis reports with technical & news sentiment using GPT-4o",
  "nodes": [
    {
      "id": "a9bbe9d0-51aa-40f8-8931-f405c695c732",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1140,
        140
      ]
    },
    {
      "id": "2d6315d6-959d-4e16-97ed-30839d826ce2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1080,
        -100
      ]
    },
    {
      "id": "14112026-19eb-493f-971b-28455a8d4412",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -220
      ],
      "parameters": {
        "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"
      }
    },
    {
      "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 "
      }
    },
    {
      "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 extracti"
      }
    },
    {
      "id": "13a242cf-0a01-4aea-a58e-9b734aed912c",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1900,
        140
      ]
    },
    {
      "id": "bb5dd63a-a3e6-408e-a5c9-13e9f72f2b26",
      "name": "GPT 4o",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        960,
        140
      ]
    },
    {
      "id": "94d820d2-eb20-4184-8e21-1ed5936c9166",
      "name": "Generate HTML",
      "type": "n8n-nodes-base.html",
      "position": [
        1860,
        -100
      ]
    },
    {
      "id": "84a2fe62-e936-49ca-83d6-a02371e02166",
      "name": "Send Stock Analysis",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2280,
        -100
      ]
    },
    {
      "id": "36943e20-b0fc-40b0-b695-e0bdbd9182d1",
      "name": "Adjust HTML Colors",
      "type": "n8n-nodes-base.code",
      "position": [
        2080,
        -100
      ]
    },
    {
      "id": "d9174ea1-e42b-4533-98ab-9dc8f94055db",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1680,
        140
      ]
    },
    {
      "id": "ca2820e9-553d-477b-9084-74b2fab92cc9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        260
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace OpenAI Credentials"
      }
    },
    {
      "id": "2e0013ca-2dda-425c-b6d8-bdd3b3cd262d",
      "name": "Generate Variables For API",
      "type": "n8n-nodes-base.code",
      "position": [
        2760,
        -20
      ]
    },
    {
      "id": "a3d8d689-7b9a-4d45-9a9b-ffb9597606a1",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        2920,
        -20
      ]
    },
    {
      "id": "f4eeb758-ba3e-4fb2-882f-7422bdcdc30b",
      "name": "Get News Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3100,
        -20
      ]
    },
    {
      "id": "87a2eb36-36e2-427d-8db2-2de3a280e404",
      "name": "Analyse API Input",
      "type": "n8n-nodes-base.code",
      "position": [
        3280,
        -20
      ]
    },
    {
      "id": "8a108780-d2e3-4cc7-bf7f-49da726f37fd",
      "name": "Workflow Input Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        740,
        800
      ]
    },
    {
      "id": "8491ca61-2367-401e-9ff2-4f1d90f3ce59",
      "name": "Download Chart",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1540,
        520
      ]
    },
    {
      "id": "1250dca0-d4d6-4890-9aa4-110cd0f0fbb6",
      "name": "Get Chart URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        520
      ]
    },
    {
      "id": "cfc9c470-c284-4d58-b6be-260f36d3d2b7",
      "name": "Get Price History",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        800
      ]
    },
    {
      "id": "3974f7f8-99b3-43b2-83f3-05819cdde7b2",
      "name": "Get Bollinger Bands",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        960
      ]
    },
    {
      "id": "0d333729-3fe5-4253-9989-16adaf1166b8",
      "name": "Get MACD",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        1120
      ]
    },
    {
      "id": "4bd10a52-082b-4842-91ee-ef748c6ba695",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1820,
        960
      ]
    },
    {
      "id": "8061fbcf-d138-44b5-b6d7-14c7a4e5904e",
      "name": "Calculate Support Resistance",
      "type": "n8n-nodes-base.code",
      "position": [
        1540,
        800
      ]
    },
    {
      "id": "c692581d-a41d-48ef-9a7a-0a20fbceea81",
      "name": "Organizing Data",
      "type": "n8n-nodes-base.code",
      "position": [
        2040,
        960
      ]
    },
    {
      "id": "d00b380b-43a4-478e-8265-d79299278867",
      "name": "Merge-2",
      "type": "n8n-nodes-base.merge",
      "position": [
        2440,
        800
      ]
    },
    {
      "id": "4ca4c3aa-9c91-4a6c-973f-bb0ed3754a82",
      "name": "ChatGPT 4o",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2900,
        800
      ]
    },
    {
      "id": "d46f175b-0737-4e33-b8fc-4937f0c6456e",
      "name": "Set Variable",
      "type": "n8n-nodes-base.set",
      "position": [
        2040,
        520
      ]
    },
    {
      "id": "186b6551-ac08-43f3-b000-9be984a4eb13",
      "name": "Warp as JSON for GPT",
      "type": "n8n-nodes-base.code",
      "position": [
        2660,
        800
      ]
    },
    {
      "id": "b42da048-4e0a-4e45-b6a4-9272473844cb",
      "name": "Set Final Response",
      "type": "n8n-nodes-base.set",
      "position": [
        3280,
        800
      ]
    },
    {
      "id": "c718d0a7-2689-42da-985f-17030583e51c",
      "name": "Set Stock Symbol and API Key",
      "type": "n8n-nodes-base.set",
      "position": [
        960,
        800
      ]
    },
    {
      "id": "884a7e3b-3e8f-4c69-8950-5b0f1dd25f29",
      "name": "First Technical Analysis",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1820,
        520
      ]
    },
    {
      "id": "ba7aca23-5d4c-4bfd-8d7f-af45aaa8d8a0",
      "name": "Schedule Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        2560,
        -20
      ]
    },
    {
      "id": "4b93b4ba-3369-4051-a92d-d3ff811fb566",
      "name": "Technical Analysis Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1360,
        140
      ]
    },
    {
      "id": "c5d70195-f90b-42b4-b056-52794c75c20f",
      "name": "Trends Analysis Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1520,
        140
      ]
    },
    {
      "id": "de8355ea-8f6b-4733-b5ac-06e080e42e30",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2900,
        120
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace Alphavantage API Key"
      }
    },
    {
      "id": "9c25c2ab-796f-4156-8267-efe6d0182e9d",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1800,
        680
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace OpenAI Credentials"
      }
    },
    {
      "id": "e78394cb-809e-4731-b74b-e8378f8e2bc9",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2900,
        920
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace OpenAI Credentials"
      }
    },
    {
      "id": "dcf46ba4-b309-4d41-8041-717d564c0690",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        680
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace Chart-img API Key"
      }
    },
    {
      "id": "727d5d8b-c537-41d2-a757-479813ecb733",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        980
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace TwelveData API Key"
      }
    },
    {
      "id": "580f36fb-2d85-4a74-825b-540f328b860f",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2280,
        60
      ],
      "parameters": {
        "width": 160,
        "height": 80,
        "content": "### Replace SMTP Credentials"
      }
    },
    {
      "id": "e40b611a-12c3-4975-b692-f338d0477c8b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -220
      ],
      "parameters": {
        "width": 440,
        "height": 300,
        "content": "# Advance Stock Analysis (both Technical and Trends) Using GPT4o Powered AI Agent\n\n## Built by  [Elay Guez](https://www.linkedin.com/in/elay-g)"
      }
    },
    {
      "id": "ab83de34-3083-4882-b329-c368d5818917",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        100
      ],
      "parameters": {
        "width": 440,
        "height": 1200,
        "content": "### Overview ###\n\nGet comprehensive stock analysis with this AI-powered workflow that provides actionable insights for your investment decisions. On a weekly basis, this workflow:\n\n- Analyzes stock da"
      }
    },
    {
      "id": "28e1e96f-e27c-4933-afee-35931241060c",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        720,
        -100
      ]
    },
    {
      "id": "4d9939ec-4a8e-40cb-95d2-24bbdbc27c8e",
      "name": "Refine Text",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1520,
        -100
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Organizing Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "GPT 4o": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge-2": {
      "main": [
        [
          {
            "node": "Warp as JSON for GPT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Refine Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get MACD": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "ChatGPT 4o": {
      "main": [
        [
          {
            "node": "Set Final Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Refine Text": {
      "main": [
        [
          {
            "node": "Generate HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variable": {
      "main": [
        [
          {
            "node": "Merge-2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate HTML": {
      "main": [
        [
          {
            "node": "Adjust HTML Colors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Chart URL": {
      "main": [
        [
          {
            "node": "Download Chart",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get News Data": {
      "main": [
        [
          {
            "node": "Analyse API Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Get News Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Chart": {
      "main": [
        [
          {
            "node": "First Technical Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Organizing Data": {
      "main": [
        [
          {
            "node": "Merge-2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Price History": {
      "main": [
        [
          {
            "node": "Calculate Support Resistance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger1": {
      "main": [
        [
          {
            "node": "Generate Variables For API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adjust HTML Colors": {
      "main": [
        [
          {
            "node": "Send Stock Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Bollinger Bands": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Trends Analysis Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Warp as JSON for GPT": {
      "main": [
        [
          {
            "node": "ChatGPT 4o",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Input Trigger": {
      "main": [
        [
          {
            "node": "Set Stock Symbol and API Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Technical Analysis Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "First Technical Analysis": {
      "main": [
        [
          {
            "node": "Set Variable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Variables For API": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Support Resistance": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Stock Symbol and API Key": {
      "main": [
        [
          {
            "node": "Get Chart URL",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Price History",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Bollinger Bands",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get MACD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}