{
  "name": "Smart stock trading recommendations with GPT-4, TwelveData & NewsAPI analysis",
  "nodes": [
    {
      "id": "e58d9c28-2f7f-4332-ab99-1431a2f1b68a",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        112,
        288
      ]
    },
    {
      "id": "d89ad9e2-7a74-44ff-b889-7cf8435f4481",
      "name": "4h trend",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        0
      ]
    },
    {
      "id": "bbce42d7-e50e-4b9e-a168-a0f2f68af753",
      "name": "1day trend",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        192
      ]
    },
    {
      "id": "27d3fd72-380f-412e-b004-bcf101af280d",
      "name": "1week trend",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        944,
        416
      ]
    },
    {
      "id": "0f22b55e-8c91-4694-9fde-8810d016fce6",
      "name": "Get News",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1568,
        640
      ]
    },
    {
      "id": "344af493-dad1-48f9-bdbe-d7754ca9c47e",
      "name": "News Sentiment Analyzer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1840,
        576
      ]
    },
    {
      "id": "fb4954a2-9203-4574-8332-2053ec97c3bb",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1392,
        224
      ]
    },
    {
      "id": "905c0187-c652-468e-9081-bff1cfde5b2f",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1232,
        224
      ]
    },
    {
      "id": "d7d5bb3f-8364-4cb7-9653-1ebf30d037c9",
      "name": "Technical Data AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2768,
        384
      ]
    },
    {
      "id": "09d9912b-cdbb-41ac-9f5b-2d92cadddb9e",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2576,
        592
      ]
    },
    {
      "id": "36d679d0-5b6d-4c2e-873b-1c0822093a84",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        128
      ]
    },
    {
      "id": "e1b272a7-2de0-47cd-a7ed-66adee5205f4",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        2784,
        640
      ]
    },
    {
      "id": "64480805-811b-4ab3-871e-13cee359226a",
      "name": "Get Stock Sentiment",
      "type": "n8n-nodes-base.perplexityTool",
      "position": [
        2944,
        656
      ]
    },
    {
      "id": "799885b8-c23b-44f3-a0d3-ac2a31051230",
      "name": "Check Twelvedata API Success",
      "type": "n8n-nodes-base.switch",
      "position": [
        1616,
        224
      ]
    },
    {
      "id": "8a313633-398e-454c-8f18-bb4b2a665fd1",
      "name": "Get Chart Image for Stock",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        3392,
        768
      ]
    },
    {
      "id": "ced4c850-4182-451c-ba54-7c4bc00d40a3",
      "name": "Respond with Error",
      "type": "@n8n/n8n-nodes-langchain.chat",
      "position": [
        1904,
        368
      ]
    },
    {
      "id": "66370ec1-4c88-4e92-b10e-3302d11488cf",
      "name": "Respond to Chat",
      "type": "@n8n/n8n-nodes-langchain.chat",
      "position": [
        3232,
        384
      ]
    },
    {
      "id": "c9c3f88f-8ed6-4413-a4db-d1861b575b84",
      "name": "Convert to Stock Symbol",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        416,
        288
      ]
    },
    {
      "id": "26bc4bf6-cae8-4478-8b8a-96033c5fb50d",
      "name": "Merge News & Technical",
      "type": "n8n-nodes-base.merge",
      "position": [
        2192,
        384
      ]
    },
    {
      "id": "07b32114-e812-4020-97cf-e71eac41afea",
      "name": "Aggregate to a single list",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2416,
        384
      ]
    },
    {
      "id": "5930faea-8e92-4279-9595-eee74b2963e0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        -176
      ],
      "parameters": {
        "width": 384,
        "height": 768,
        "content": "## STOCK PRICE TREND\n* Fetch using TwelveData APIs\n* Get your free API Key from here: https://twelvedata.com/\n* Replace your API Key under the Credentials"
      }
    },
    {
      "id": "bcceb836-7cbf-4bee-9e1b-a4a49b319c70",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        464
      ],
      "parameters": {
        "width": 288,
        "height": 352,
        "content": "## NEWS API\n* Get your free API key from here: https://newsapi.org/\n* Replace your API Key under the Credentials"
      }
    },
    {
      "id": "7689378b-b357-4105-aef2-e81eb619322d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3216,
        624
      ],
      "parameters": {
        "width": 432,
        "height": 352,
        "content": "## CHART-IMG API\n* Get your free API key from here: http://chart-img.com/\n* Replace your API Key under the Credential\n* Optional Step. You can even delete this"
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Merge News & Technical",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Technical Data AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "4h trend": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get News": {
      "main": [
        [
          {
            "node": "News Sentiment Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Check Twelvedata API Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1day trend": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "1week trend": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Respond to Chat": {
      "main": [
        []
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Technical Data AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get Stock Sentiment": {
      "ai_tool": [
        [
          {
            "node": "Technical Data AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Merge News & Technical": {
      "main": [
        [
          {
            "node": "Aggregate to a single list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Stock Symbol": {
      "main": [
        [
          {
            "node": "4h trend",
            "type": "main",
            "index": 0
          },
          {
            "node": "1day trend",
            "type": "main",
            "index": 0
          },
          {
            "node": "1week trend",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "News Sentiment Analyzer": {
      "main": [
        [
          {
            "node": "Merge News & Technical",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Technical Data AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Chart Image for Stock": {
      "ai_tool": [
        [
          {
            "node": "Technical Data AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate to a single list": {
      "main": [
        [
          {
            "node": "Technical Data AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Convert to Stock Symbol",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Twelvedata API Success": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond with Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}