{
  "name": "Real-time crypto news & sentiment analysis via Telegram with GPT-4o",
  "nodes": [
    {
      "id": "e10ed4da-ab3e-4ff0-b489-a3ed9e88e042",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1340,
        1520
      ]
    },
    {
      "id": "edb76989-766a-43e6-bf49-3896a1d257dd",
      "name": "Set Query",
      "type": "n8n-nodes-base.set",
      "position": [
        -780,
        1340
      ]
    },
    {
      "id": "0ef0571a-d0c2-4f05-898e-1aed56b02d56",
      "name": "Crypto News & Sentiment Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1280,
        1340
      ]
    },
    {
      "id": "8f7859fa-e80c-4c0e-b8b5-5593d5108f5f",
      "name": "RSS Cointelegraph",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        500
      ]
    },
    {
      "id": "5ce9dc61-de8e-4b3a-a0e2-4c077a28e0d4",
      "name": "RSS Bitcoinmagazine",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        660
      ]
    },
    {
      "id": "d2491728-8a51-4384-adfa-8636f8d8cacd",
      "name": "RSS Coindesk",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        820
      ]
    },
    {
      "id": "60b17a68-b7b0-444f-8bbc-4d9ccfba6892",
      "name": "RSS Bitcoinist",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        980
      ]
    },
    {
      "id": "82b50de0-68a7-4660-b6d9-fa01922c2492",
      "name": "RSS Newsbtc",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        1140
      ]
    },
    {
      "id": "90f9a5be-8eb2-4073-9c18-50478ba4890b",
      "name": "RSS Cryptopotato",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        1500
      ]
    },
    {
      "id": "6428c19d-c66c-4577-b6ca-8c0c82a757fa",
      "name": "RSS 99bitcoins",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        1680
      ]
    },
    {
      "id": "b2fc6584-cd64-4b90-91cf-b9bfdc483203",
      "name": "RSS Cryptobriefing",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        1860
      ]
    },
    {
      "id": "8be5859b-bb82-4ece-9aa5-5bfbc27e4cca",
      "name": "RSS Crypto.news",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -160,
        2020
      ]
    },
    {
      "id": "b5f393de-a3da-47a4-8a19-ebf53c29051d",
      "name": "Merge All Articles",
      "type": "n8n-nodes-base.merge",
      "position": [
        520,
        1180
      ]
    },
    {
      "id": "ce4da50f-ecff-4d13-a90d-e62db6bc3ef9",
      "name": "Filter by Query",
      "type": "n8n-nodes-base.code",
      "position": [
        760,
        1320
      ]
    },
    {
      "id": "566e842f-8e2c-491c-87b5-5f1d322a9de8",
      "name": "Build Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        1080,
        1320
      ]
    },
    {
      "id": "2f5b2eb5-bc2e-432d-b0c8-44c6822b831b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        1020
      ],
      "parameters": {
        "width": 300,
        "height": 580,
        "content": "## Send Telegram Response\n\nSends the final AI-generated summary to the user.\n⚠️ Replace chatId with a dynamic value like << Telegram ID here >> to ensure it sends to the right user."
      }
    },
    {
      "id": "d9f178d6-b834-4a18-b8a5-ab1261b99ca6",
      "name": "Adds the sessionId",
      "type": "n8n-nodes-base.set",
      "position": [
        -1740,
        1340
      ]
    },
    {
      "id": "4dd3e531-ab2a-4930-a127-08adb5bde409",
      "name": "Summarize News & Sentiment (GPT-4o)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1360,
        1320
      ]
    },
    {
      "id": "b0da1d25-9c17-49a1-85f4-82425e7c9f91",
      "name": "Prepare Telegram Message",
      "type": "n8n-nodes-base.set",
      "position": [
        1780,
        1320
      ]
    },
    {
      "id": "95cb909b-51f4-4661-9db5-e8181a7efffe",
      "name": "Sends Response",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2180,
        1320
      ]
    },
    {
      "id": "a783bddf-7d70-4345-88f3-c474a50bdea0",
      "name": "Send Crypto or Company Name for Analysis",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2180,
        1340
      ]
    },
    {
      "id": "d847a178-c0f2-482b-8773-ac0362435dfd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2320,
        1200
      ],
      "parameters": {
        "width": 380,
        "height": 360,
        "content": "## Telegram Setup \nThis bot listens for incoming messages in Telegram. To use it, create a bot with @BotFather and paste your bot token into the credentials."
      }
    },
    {
      "id": "75ee14cf-6236-4f45-b864-b422f18c8214",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1860,
        1220
      ],
      "parameters": {
        "width": 360,
        "height": 320,
        "content": "## Initialize Chat Session\nStores the user's chat ID as sessionId, which is used to manage conversation memory across steps."
      }
    },
    {
      "id": "674f2555-752d-4ffc-894c-efd705f32887",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        1200
      ],
      "parameters": {
        "width": 600,
        "height": 460,
        "content": "##  Extract Keyword \nThis AI agent parses the user input and returns a single-word keyword to help match relevant news articles."
      }
    },
    {
      "id": "bece27b1-bc60-44f7-bdc9-6ec61f7a2e5b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        300
      ],
      "parameters": {
        "width": 460,
        "height": 1980,
        "content": "## News Aggregators\nPulls articles from major crypto news sources. You can add more RSS feeds here to expand coverage."
      }
    },
    {
      "id": "7f7a2949-4147-4ab9-bb52-99c1bb2205ed",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        980
      ],
      "parameters": {
        "width": 480,
        "height": 760,
        "content": "## Merge & Filter News\nCombines all RSS articles and filters them using the extracted keyword to match only relevant results."
      }
    },
    {
      "id": "d19d53c0-7d23-4ccb-9a68-dc2855e5b73d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        1140
      ],
      "parameters": {
        "width": 260,
        "height": 360,
        "content": "## Prepare AI Prompt\nConstructs the input prompt for GPT-4o with a list of filtered articles. Output includes summary, sentiment, and article links."
      }
    },
    {
      "id": "17607891-ed84-4cca-ad3d-c398e5652a8c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        1100
      ],
      "parameters": {
        "width": 340,
        "height": 440,
        "content": "## Summarize News & Sentiment (GPT-4o)\nUses OpenAI GPT-4o to generate a concise summary of the news, analyze market sentiment, and return formatted results.\n\n"
      }
    },
    {
      "id": "9d47eb56-4469-4f42-84a1-6f76bb7fa598",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1720,
        1060
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## Format for Telegram\n\nExtracts the AI summary and prepares it for Telegram delivery. Change the variable if you want to include other data.\n\n\n"
      }
    },
    {
      "id": "7c02860b-f865-4ff9-baeb-0903a76278d9",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        320
      ],
      "parameters": {
        "width": 520,
        "height": null,
        "content": "## ✅ How to Use This Template\n \n🛠 1. Connect your Telegram bot\n🤖 2. Add your OpenAI credentials\n📰 3. Customize the RSS feeds (optional)\n✅ 4. Start your bot and send a query like “Bitcoin” or “NFT”"
      }
    }
  ],
  "connections": {
    "Set Query": {
      "main": [
        [
          {
            "node": "RSS Cointelegraph",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Bitcoinmagazine",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Coindesk",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Bitcoinist",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Newsbtc",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Cryptopotato",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS 99bitcoins",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Cryptobriefing",
            "type": "main",
            "index": 0
          },
          {
            "node": "RSS Crypto.news",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Newsbtc": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "Build Prompt": {
      "main": [
        [
          {
            "node": "Summarize News & Sentiment (GPT-4o)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Coindesk": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "RSS 99bitcoins": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 7
          }
        ]
      ]
    },
    "RSS Bitcoinist": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Filter by Query": {
      "main": [
        [
          {
            "node": "Build Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Crypto.news": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 9
          }
        ]
      ]
    },
    "RSS Cryptopotato": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 6
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Crypto News & Sentiment Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "RSS Cointelegraph": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adds the sessionId": {
      "main": [
        [
          {
            "node": "Crypto News & Sentiment Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Articles": {
      "main": [
        [
          {
            "node": "Filter by Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Cryptobriefing": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 8
          }
        ]
      ]
    },
    "RSS Bitcoinmagazine": {
      "main": [
        [
          {
            "node": "Merge All Articles",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Prepare Telegram Message": {
      "main": [
        [
          {
            "node": "Sends Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crypto News & Sentiment Agent": {
      "main": [
        [
          {
            "node": "Set Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize News & Sentiment (GPT-4o)": {
      "main": [
        [
          {
            "node": "Prepare Telegram Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Crypto or Company Name for Analysis": {
      "main": [
        [
          {
            "node": "Adds the sessionId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}