{
  "name": "Project: Crypto Sentiment Analysis",
  "nodes": [
    {
      "parameters": {
        "options": {
          "responseMode": "responseNodes"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        656
      ],
      "id": "a1f2155f-e4a6-4f08-9a0e-38127048eb97",
      "name": "When chat message received",
      "webhookId": "9337ada3-a00b-4bab-9691-039e917d8766"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "Your job is to analyze the keyword of the question and output it as a single word."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        224,
        656
      ],
      "id": "653a139c-7283-43d4-b052-7441880edc29",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        296,
        880
      ],
      "id": "3ac78cb1-7cbc-42fb-9317-571dd9dc2b64",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "xHWDVrLvQFklSodD",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "url": "https://cointelegraph.com/rss",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        -208
      ],
      "id": "4515e327-5c40-4ec2-8feb-fe8c11f771a8",
      "name": "Coingraph"
    },
    {
      "parameters": {
        "url": "https://www.coindesk.com/arc/outboundfeeds/rss/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        176
      ],
      "id": "35020a76-282e-4bdb-bde6-0adb68c91e22",
      "name": "Coindesk"
    },
    {
      "parameters": {
        "url": "https://bitcoinist.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        368
      ],
      "id": "9de71b57-f1ab-4eb9-901e-399307271426",
      "name": "Bitcoinist"
    },
    {
      "parameters": {
        "url": "https://www.newsbtc.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        560
      ],
      "id": "345ad880-aa9a-49ca-983a-227ee37f6bef",
      "name": "News BTC"
    },
    {
      "parameters": {
        "url": "https://cryptoslate.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        752
      ],
      "id": "98739662-7ff8-48c4-a5a2-34cba64113f3",
      "name": "Cryptoslate"
    },
    {
      "parameters": {
        "url": "https://cryptopotato.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        944
      ],
      "id": "361d1873-7ffa-42ca-9a26-d1022d22ed37",
      "name": "Crypto Potato"
    },
    {
      "parameters": {
        "url": "https://99bitcoins.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        1136
      ],
      "id": "a99bcb3e-50c5-4b09-bedf-28cc8ddefefe",
      "name": "99Bitcoins"
    },
    {
      "parameters": {
        "url": "https://cryptobriefing.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        1328
      ],
      "id": "2094d0c9-6f2c-47a8-ae61-da4e10df2f42",
      "name": "Crypto Briefing"
    },
    {
      "parameters": {
        "url": "https://crypto.news/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        1520
      ],
      "id": "691167fe-b90d-4719-8dd9-752218e3bc28",
      "name": "Crypto News"
    },
    {
      "parameters": {
        "numberInputs": 10
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        800,
        528
      ],
      "id": "94af2f34-5abe-4b2f-bba6-43eadf285167",
      "name": "Merge"
    },
    {
      "parameters": {
        "url": "https://decryptmedia.com/feed/",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        576,
        -16
      ],
      "id": "23267306-f137-4c01-9238-ee0daaaba3e4",
      "name": "Decrypt Media"
    },
    {
      "parameters": {
        "jsCode": "const term = $('AI Agent').first().json.output;\nreturn items.filter(item => {\n  const j            = item.json;\n  const title        = (j.title || \"\").toLowerCase();\n  const snippet      = (j.contentSnippet || j.description || \"\").toLowerCase();\n  const fullContent  = (j.content || \"\").toLowerCase();\n  return title.includes(term)\n      || snippet.includes(term)\n      || fullContent.includes(term);\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1024,
        656
      ],
      "id": "49df00d8-7a60-4366-9143-4ff8e17dd496",
      "name": "Code"
    },
    {
      "parameters": {
        "jsCode": "const q   = $('AI Agent').first().json.output;\nconst list = items\n  .map(i => `- ${i.json.title} (${i.json.link})`)\n  .join(\"\\n\");\nconst prompt = `\nYou are a crypto-industry news analyst.\nSummarize current news and market sentiment for **${q}** based on these articles:\n${list}\n\nAnswer in 3 parts:\n1. Summary of News\n2. Market Sentiment\n3. Links to reference news articles\n`;\n\nreturn [{ json: { prompt } }];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1248,
        656
      ],
      "id": "98885471-ac02-4fa3-80bc-426fdd985aca",
      "name": "Code1"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "GPT-4O-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "={{ $json.prompt }}"
            },
            {
              "content": "You are a crypto‐industry news analyst. Summarize sentiment clearly and concisely.",
              "role": "system"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1472,
        656
      ],
      "id": "36e6a89b-1c26-4308-a704-db7f0ae1508e",
      "name": "Message a model",
      "credentials": {
        "openAiApi": {
          "id": "xHWDVrLvQFklSodD",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "message": "={{ $json.message.content }}",
        "waitUserReply": false,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chat",
      "typeVersion": 1,
      "position": [
        1824,
        656
      ],
      "id": "093ba1a6-6759-4e82-813f-827f9a356a2c",
      "name": "Respond to Chat"
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Coingraph",
            "type": "main",
            "index": 0
          },
          {
            "node": "Decrypt Media",
            "type": "main",
            "index": 0
          },
          {
            "node": "Coindesk",
            "type": "main",
            "index": 0
          },
          {
            "node": "Bitcoinist",
            "type": "main",
            "index": 0
          },
          {
            "node": "News BTC",
            "type": "main",
            "index": 0
          },
          {
            "node": "Cryptoslate",
            "type": "main",
            "index": 0
          },
          {
            "node": "Crypto Potato",
            "type": "main",
            "index": 0
          },
          {
            "node": "99Bitcoins",
            "type": "main",
            "index": 0
          },
          {
            "node": "Crypto Briefing",
            "type": "main",
            "index": 0
          },
          {
            "node": "Crypto News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Coingraph": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Coindesk": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Bitcoinist": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "News BTC": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "Cryptoslate": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 5
          }
        ]
      ]
    },
    "Crypto Potato": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 6
          }
        ]
      ]
    },
    "99Bitcoins": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 7
          }
        ]
      ]
    },
    "Crypto Briefing": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 8
          }
        ]
      ]
    },
    "Crypto News": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 9
          }
        ]
      ]
    },
    "Decrypt Media": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Respond to Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8119504f-a962-438b-a3cc-906d5ec0c93b",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "281c34c03b9c41f054c536eeb966e9e503918cf7f00e3bc32a5ff9cca85ca255"
  },
  "id": "Gedm78qhWNgIEiwG",
  "tags": []
}