{
  "name": "AI YouTube trend explorer – n8n automation workflow with Gemini/ChatGPT",
  "nodes": [
    {
      "id": "924bed93-0f27-462f-b952-7248db043997",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        220
      ]
    },
    {
      "id": "a5613e56-3124-4049-a7ff-fad8d4e8bb91",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        720,
        220
      ]
    },
    {
      "id": "937bdcbd-1b3d-46b6-8f94-884f9e832366",
      "name": "Workflow - Youtube Search",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        880,
        220
      ]
    },
    {
      "id": "618f2101-b469-4b80-8358-4c193a6ee283",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        140,
        0
      ]
    },
    {
      "id": "3fab5f20-3981-4552-8b1e-893494a46b42",
      "name": "AI Agent - Trend Explorer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        620,
        0
      ]
    },
    {
      "id": "6c1c3e0c-e7ce-449a-ac3f-d79e57c6b4f4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -360
      ],
      "parameters": {
        "width": 660,
        "height": 1420,
        "content": "## [n8n Automation] AI YouTube Trend Explorer – Try It Out!\n**This n8n template helps you automatically discover, analyze, and track trending topics and videos on YouTube using an AI-powered agent.**\n"
      }
    },
    {
      "id": "cda8930b-34a9-463d-a201-eea2655645ae",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -360
      ],
      "parameters": {
        "width": 340,
        "height": 980,
        "content": "## 1. Start When A Chat Message Is Received\n- The workflow starts when a chat message (showing your request or trend question) is received by the system.\n"
      }
    },
    {
      "id": "99a5e8e7-1e94-43f9-97d2-882f3164a938",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -360
      ],
      "parameters": {
        "width": 700,
        "height": 980,
        "content": "## 2. Process The Request & Return Response\n- Incoming chat is routed to the **AI Agent – Trend Explorer** node:\n     + First, the agent triggers the **Workflow – YouTube Search** tool to gather the l"
      }
    }
  ],
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent - Trend Explorer",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Trend Explorer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Workflow - Youtube Search": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Trend Explorer",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent - Trend Explorer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}