{
  "name": "Technical stock analysis with Telegram, Airtable and a GPT-powered AI agent",
  "nodes": [
    {
      "id": "1340d672-61c8-403e-89a7-f28e3afbc0e7",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1760,
        540
      ]
    },
    {
      "id": "3c770b79-d6c5-4512-94fa-7719af6d0620",
      "name": "Get Chart",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1900,
        560
      ]
    },
    {
      "id": "a44b48ac-9bfc-4988-81d7-177357971558",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1660,
        320
      ]
    },
    {
      "id": "a6d405f0-52c5-4937-85cd-7ef6e4a596b6",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        760,
        320
      ]
    },
    {
      "id": "22bd61a2-45cb-4074-a027-28a9a0d327f5",
      "name": "Send Analysis",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2040,
        320
      ]
    },
    {
      "id": "6f18a794-c302-47c3-8516-d14597408ae7",
      "name": "Workflow Input Trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        780,
        960
      ]
    },
    {
      "id": "102a021b-c0bb-4bdb-bca1-a4f0f7a84687",
      "name": "response",
      "type": "n8n-nodes-base.set",
      "position": [
        2040,
        960
      ]
    },
    {
      "id": "ba96d38a-5a12-44a0-927f-5893cd91ac9b",
      "name": "Download Chart",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1440,
        960
      ]
    },
    {
      "id": "7deaf5b4-0280-46d2-b9f8-4d14a67f60b6",
      "name": "Get Chart URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1220,
        960
      ]
    },
    {
      "id": "46ebe865-b13b-4d7d-8acf-a10d78ba4b5b",
      "name": "Send Chart",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1840,
        960
      ]
    },
    {
      "id": "e5a62237-af1e-42dd-befd-51aa0e0a0c08",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1600,
        540
      ]
    },
    {
      "id": "c3d63b6f-5908-4e64-9063-1910024b0ed4",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        940,
        320
      ]
    },
    {
      "id": "1d27102b-47c9-4aa7-a93c-71699326960d",
      "name": "Transcribe",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1460,
        240
      ]
    },
    {
      "id": "1252b926-9965-4499-a539-3c7e2a7eb151",
      "name": "Download File",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1300,
        240
      ]
    },
    {
      "id": "3777f861-d933-4a95-af74-2e787beda709",
      "name": "Set Text",
      "type": "n8n-nodes-base.set",
      "position": [
        1360,
        440
      ]
    },
    {
      "id": "5630eed3-7b99-400f-ad54-bf72c7e52570",
      "name": "Set Values",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        960
      ]
    },
    {
      "id": "534cad9e-b3b8-4435-9db4-d7d22adfa305",
      "name": "Technical Analysis",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1640,
        960
      ]
    },
    {
      "id": "92b4c7c2-8f0e-48a1-8ecf-01f74e612657",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1300,
        60
      ]
    },
    {
      "id": "e1d42095-3bcf-4841-b18c-6f8165576bc7",
      "name": "Set Text1",
      "type": "n8n-nodes-base.set",
      "position": [
        1460,
        60
      ]
    },
    {
      "id": "5f0649d2-3f7d-42b8-a630-5dfb03035052",
      "name": "Save Ticker",
      "type": "n8n-nodes-base.airtableTool",
      "position": [
        2020,
        540
      ]
    },
    {
      "id": "b4bf95da-8be0-447c-9b83-b1a60ab95d41",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1200,
        1340
      ]
    },
    {
      "id": "e7061b7f-8058-430d-bc3c-92efdfa84131",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        800,
        1340
      ]
    },
    {
      "id": "4adbd0b3-8246-43a2-b1fb-114add46f35d",
      "name": "Run Agent",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1380,
        1420
      ]
    },
    {
      "id": "59c87621-13bb-46fe-94ab-c631654ba0e0",
      "name": "Get tokens",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1000,
        1340
      ]
    },
    {
      "id": "4d44a382-8dd6-4a83-8a02-6e060feb24a8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        20
      ],
      "parameters": {
        "width": 1540,
        "height": 780,
        "content": "## Scenario 1 - AI Agent"
      }
    },
    {
      "id": "60e58a9c-07d1-497a-b65b-8346e7d3f0ca",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        1220
      ],
      "parameters": {
        "width": 1540,
        "height": 420,
        "content": "## Scenario 2 - Scheduled analyses"
      }
    },
    {
      "id": "330b32f3-a965-497d-ac1f-807416cfb297",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        840
      ],
      "parameters": {
        "width": 1540,
        "height": 320,
        "content": "## Scenario 1 - Get Chart "
      }
    },
    {
      "id": "91e34e31-7a13-43b5-934d-af714b238ac7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        500
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "### Replace Telegram connection"
      }
    },
    {
      "id": "fdca89e7-3e31-49f2-b0ed-d703fed3803e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1700,
        700
      ],
      "parameters": {
        "width": null,
        "height": 80,
        "content": "### Replace Chat ID"
      }
    },
    {
      "id": "01c9ecc5-6326-45b9-9f2a-863e4518893f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        860
      ],
      "parameters": {
        "width": 220,
        "height": 80,
        "content": "### Replace API key (header = x-api-key) and  chart settings"
      }
    },
    {
      "id": "322d6cc7-4793-455f-a112-e5e0f1df21d5",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1780,
        860
      ],
      "parameters": {
        "width": 220,
        "height": 80,
        "content": "### Replace Chat ID"
      }
    },
    {
      "id": "b33faeeb-d109-4984-927c-fa32878a6384",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        220
      ],
      "parameters": {
        "width": 220,
        "height": 80,
        "content": "### Replace Chat ID"
      }
    },
    {
      "id": "6c11f9e9-f83e-42d3-9c31-3d9c4007b23a",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        620
      ],
      "parameters": {
        "width": 330.5152611046425,
        "height": 239.5888196628349,
        "content": "### ... or watch set up video [11 min]\n[![Youtube Thumbnail](https://res.cloudinary.com/de9jgixzm/image/upload/v1740845597/Youtube%20Thumbs/Video%2022%20-%20Philipp%20Trading%20Blur.png)](https://yout"
      }
    },
    {
      "id": "09704bed-c71b-4dd1-a843-eb5c2fdb568d",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        620
      ],
      "parameters": {
        "width": 280,
        "height": 586,
        "content": "### Setup\n\n1. **Prepare Airtable**:\n    - Create simple table to store tickers.\n\n2. **Prepare Telegram Bot**:\n    - Ensure your Telegram bot is set up correctly and listening for new messages.\n\n3. **R"
      }
    },
    {
      "id": "85425ad0-4def-42bb-93e6-107102b86de6",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        20
      ],
      "parameters": {
        "width": 636,
        "height": 577,
        "content": "![5min Logo](https://res.cloudinary.com/de9jgixzm/image/upload/v1739773200/Skool%20Assets/ejm3hqnvhgwpnu2fv92s.png)\n## How to build AI Agent for Technical Analysis with N8N\n**Made by [Mark Shcherbakov"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Set Text1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Chart": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Run Agent": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get tokens": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Chart": {
      "main": [
        [
          {
            "node": "response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Values": {
      "main": [
        [
          {
            "node": "Get Chart URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Ticker": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Transcribe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Chart URL": {
      "main": [
        [
          {
            "node": "Download Chart",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Chart": {
      "main": [
        [
          {
            "node": "Technical Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Run Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get tokens",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Technical Analysis": {
      "main": [
        [
          {
            "node": "Send Chart",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Input Trigger": {
      "main": [
        [
          {
            "node": "Set Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}