{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "7b6e9e4a-7a26-465c-bb24-89dc34db952d",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -864,
        -160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8b2dba6c-c4c6-469c-a60a-4f8d2ecd1e0f",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -16,
        -160
      ],
      "parameters": {
        "text": "=\u3053\u306e\u4e2d\u304b\u3089\u30dd\u30b1\u30e2\u30f3\u30ab\u30fc\u30c9\u304c\u767a\u58f2\u3055\u308c\u305f\u308a\u3001\u5728\u5eab\u304c\u3042\u308b\u306e\u3088\u3046\u306a\u60c5\u5831\u304c\u3042\u3063\u305f\u5834\u5408\u306f\u30c4\u30fc\u30eb\u3092\u4f7f\u3044\u304b\u3089\u8ca9\u58f2\u5e97\u3092\u8abf\u3079\u3066\u3001\u51fa\u529b\u3057\u3066\u4e0b\u3055\u3044\n\n\u60c5\u5831\u304c\u306a\u3044\u5834\u5408\u306f\u3001SNS\u306b\u60c5\u5831\u306a\u3057\u3092\u51fa\u529b\u3057\u3066\u4e0b\u3055\u3044\n\n\u8aac\u660e\u6587\u3084\u88dc\u8db3\u306a\u3069\u306f\u5916\u3057\u3066\u4e0b\u3055\u3044",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "d3e89578-8efd-47ea-b2bd-a405ced531ca",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -16,
        48
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "acc612f0-2337-4be9-8685-07099df3d11d",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        128,
        48
      ],
      "parameters": {
        "url": "https://map.pokemon-card.com/",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "e900f045-d49d-48ae-9ef2-24664e32c733",
      "name": "Run an Actor",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        -656,
        -160
      ],
      "parameters": {
        "memory": 8192,
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "61RPP7dywgiy0JPD0",
          "cachedResultUrl": "https://console.apify.com/actors/61RPP7dywgiy0JPD0/input",
          "cachedResultName": "\ud83c\udfef Tweet Scraper V2 - X / Twitter Scraper (apidojo/tweet-scraper)"
        },
        "customBody": "={\n    \"customMapFunction\": \"(object) => { return {...object} }\",\n    \"includeSearchTerms\": false,\n    \"maxItems\": 3,\n    \"onlyImage\": false,\n    \"onlyQuote\": false,\n    \"onlyTwitterBlue\": false,\n    \"onlyVerifiedUsers\": false,\n    \"onlyVideo\": false,\n    \"searchTerms\": [\n        \"\u30dd\u30b1\u30e2\u30f3\u30ab\u30fc\u30c9\",\n        \"\u30dd\u30b1\u30e2\u30f3\u30ab\u30fc\u30c9\u8ca9\u58f2\u60c5\u5831\",\n        \"\u30dd\u30b1\u30ab\"\n    ],\n    \"sort\": \"Latest\",\n    \"tweetLanguage\": \"ja\"\n}",
        "authentication": "apifyOAuth2Api"
      },
      "typeVersion": 1
    },
    {
      "id": "e8e22200-725d-467a-8638-3bcb52f370b2",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -448,
        -160
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "801baede-9953-4ba5-b3e5-d50c5031c929",
      "name": "Replace Me",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -272,
        16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "39c29e8f-796d-4884-9146-d854e3a05dd6",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        336,
        -160
      ],
      "parameters": {
        "text": "=\u30c4\u30fc\u30eb\u306e\u4e2d\u304b\u3089\u8abf\u3079\u3066\u3001\u6700\u65b0\u306e\u30ab\u30fc\u30c9\u8ca9\u58f2\u72b6\u6cc1\u3092\u8abf\u3079\u3066\u4e0b\u3055\u3044\u3002\n\u8aac\u660e\u306a\u3069\u306f\u3064\u3051\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\n\u51fa\u529b\u3059\u308b\u6587\u7ae0\u3068{{ $json.output }}\n\u3053\u3061\u3089\u3092\u5206\u3051\u3066\u51fa\u529b\u3057\u3066\u4e0b\u3055\u3044\n---\n\u8abf\u3079\u308b\u5185\u5bb9\n\u30fb\u5728\u5eab\u72b6\u6cc1\u306b\u3066\u8cfc\u5165\u3067\u304d\u308b\u5728\u5eab\u304c\u3042\u308b\u5546\u54c1\u304c\u3042\u308b\u306e\u304b\uff1f\n\n\u3053\u3061\u3089\u306e\u60c5\u5831\u306f\u3001\u516c\u5f0f\u60c5\u5831\u3068\u3044\u3046\u540d\u524d\u306e\u5909\u6570\u306b\u3057\u3066\u4e0b\u3055\u3044\n\n\u8ca9\u58f2\u60c5\u5831\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u6700\u65b0\u306e\u901f\u5831\u306f\u3042\u308a\u307e\u305b\u3093\u3068\u51fa\u529b\u3057\u3066\u4e0b\u3055\u3044",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "2168d71e-5664-4b30-a54f-edf9a2c7d8db",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        336,
        80
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "714d2797-020e-4307-b862-903861c70b60",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        496,
        64
      ],
      "parameters": {
        "url": "https://www.pokemon-card.com/products/",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "94fd0e82-a476-4452-b84d-aae800834bd2",
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        608,
        96
      ],
      "parameters": {
        "url": "https://www.pokemoncenter-online.com/",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "2753f830-9b3e-481a-8c9c-abcc4d58be88",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        688,
        -160
      ],
      "parameters": {
        "text": "=\u4eca\u65e5\u306e\u30dd\u30b1\u30e2\u30f3\u30ab\u30fc\u30c9\u306e\u8ca9\u58f2\u901f\u5831\u3067\u3059\n{{ $json.output }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": ""
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "dd601fc4-0df4-417f-a330-382eb5466f99",
      "name": "Main Description",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        -400
      ],
      "parameters": {
        "color": 2,
        "width": 387,
        "height": 632,
        "content": "## How it works\nThis workflow automates stock tracking for Pokemon Cards in Japan. It combines social media scraping with official data verification to provide accurate alerts.\n1. **Scrape:** Fetches latest tweets about Pokemon cards via Apify.\n2. **Analyze:** An AI Agent filters noise and identifies potential stock info.\n3. **Verify:** A second AI Agent cross-checks rumors against the official Pokemon Center website.\n4. **Alert:** Sends validated reports to Slack.\n\n## Setup steps\n1. **Apify:** Configure the `Run an Actor` node with your API key and ensure the \"Tweet Scraper V2\" actor is selected.\n2. **OpenRouter:** Add your credentials to both Chat Model nodes.\n3. **Slack:** Connect your Slack account in the final node.\n4. **Customize:** Adjust search keywords in the Apify node if needed."
      },
      "typeVersion": 1
    },
    {
      "id": "357f4923-3ad2-4f3e-aaa3-c7c475c5412a",
      "name": "Group: Data Collection",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -384
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 624,
        "content": "## Data Collection\nScrapes X (Twitter) for latest info and prepares items for processing."
      },
      "typeVersion": 1
    },
    {
      "id": "61a0a718-6380-4df6-a994-501d912357d4",
      "name": "Group: Analysis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -384
      ],
      "parameters": {
        "color": 7,
        "width": 504,
        "height": 623,
        "content": "## Initial Analysis\nAI analyzes tweet content to identify potential stock availability."
      },
      "typeVersion": 1
    },
    {
      "id": "a3adc07f-8906-43da-923c-96455d5c6a78",
      "name": "Group: Verification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -384
      ],
      "parameters": {
        "color": 7,
        "width": 392,
        "height": 628,
        "content": "## Verification\nCross-checks info with official Pokemon Center sites."
      },
      "typeVersion": 1
    },
    {
      "id": "7033b1da-2b0c-493e-b336-5061a8c94cba",
      "name": "Group: Notification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        -384
      ],
      "parameters": {
        "color": 7,
        "width": 280,
        "height": 633,
        "content": "## Notification\nSends the report to Slack."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace Me": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "ai_tool": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Replace Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Run an Actor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}