{
  "nodes": [
    {
      "id": "955b0c62-4fc9-49d5-a7b6-8c99e2800e07",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f78fbb07-e36e-4b8a-a395-c4f12bdc4e5d",
      "name": "Run an Actor and get dataset",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        208,
        0
      ],
      "parameters": {
        "memory": 8192,
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "GdWCkxBtKWOsKjdch",
          "cachedResultUrl": "https://console.apify.com/actors/GdWCkxBtKWOsKjdch/input",
          "cachedResultName": "TikTok Scraper (clockworks/tiktok-scraper)"
        },
        "operation": "Run actor and get dataset",
        "customBody": "={\n    \"excludePinnedPosts\": false,\n    \"hashtags\": [\n        \"\u8cc3\u8cb8\"\n    ],\n    \"maxProfilesPerQuery\": 1,\n    \"proxyCountryCode\": \"None\",\n    \"resultsPerPage\": 1,\n    \"scrapeRelatedVideos\": false,\n    \"shouldDownloadAvatars\": false,\n    \"shouldDownloadCovers\": false,\n    \"shouldDownloadMusicCovers\": false,\n    \"shouldDownloadSlideshowImages\": false,\n    \"shouldDownloadSubtitles\": false,\n    \"shouldDownloadVideos\": false\n}",
        "authentication": "apifyOAuth2Api"
      },
      "typeVersion": 1
    },
    {
      "id": "3fb4890b-0da4-4202-ba1b-c0445fa6dbc2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        416,
        0
      ],
      "parameters": {
        "text": "=20\u4ee3\u30ab\u30c3\u30d7\u30eb\u5411\u3051\u306e\u7269\u4ef6\u3092\u52d5\u753b\u5185\u304b\u3089\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\n\n\u8aac\u660e\u3084\u524d\u7f6e\u304d\u306f\u7701\u3044\u3066\u4e0b\u3055\u3044\nURL\u306e\u307f\u3092\u51fa\u529b\u3057\u3066\u4e0b\u3055\u3044\n---\n#URL\n{{ $json.webVideoUrl }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "df16d619-c769-4517-a119-0ef994929bd9",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        288,
        208
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "b644b4f8-87a9-408e-9e5d-8e22d29476f0",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1136,
        0
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "output",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "output",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "YOUR_SPREADSHEET_URL",
          "cachedResultName": "\u30b7\u30fc\u30c81"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_SPREADSHEET_ID",
          "cachedResultUrl": "YOUR_SPREADSHEET_URL",
          "cachedResultName": "\u30b7\u30fc\u30c8\u540d"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "51c31ac4-9985-40c1-9549-ca03b789e309",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        768,
        0
      ],
      "parameters": {
        "text": "=URL\u306e\u52d5\u753b\u3092\u898b\u3066\u300120\u4ee3\u30ab\u30c3\u30d7\u30eb\u306b\u304a\u3059\u3059\u3081\u306a\u7406\u7531\u3092\u51fa\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002\n\u8aac\u660e\u3084\u3001\u6307\u793a\u6587\u306a\u3069\u306f\u5165\u308c\u306a\u3044\u3067\u4e0b\u3055\u3044\nURL\u3068\u8aac\u660e\u3067\u5206\u3051\u3066\u4e0b\u3055\u3044\n\n{{ $json.output }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "27916f90-3e7f-4511-929a-b172bbe9ab9b",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        768,
        192
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "a512e396-a44c-4dbd-95e5-a929a71ed859",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1344,
        0
      ],
      "parameters": {
        "text": "=\u304a\u3059\u3059\u3081\u306e\u7269\u4ef6\u60c5\u5831\u3067\u3059\n{{ $json.output }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_CHANNEL_ID",
          "cachedResultName": "YOUR_CHANNEL_NAME"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "ec50a998-619c-47ff-ac1b-4613772859b1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 576,
        "height": 144,
        "content": "### How to set up\nImport the JSON code into n8n and configure credentials for Apify, OpenRouter, Google Sheets, and Slack. Select your target spreadsheet in the Google Sheets node and choose the destination channel in the Slack node. Optionally, adjust the Apify search hashtags or AI prompts to fit your specific criteria before testing."
      },
      "typeVersion": 1
    },
    {
      "id": "0c73a6d5-8688-4bc7-934f-f73db0366fde",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -192
      ],
      "parameters": {
        "width": 512,
        "height": 144,
        "content": "### Who\u2019s it for & How it works\nThis workflow helps real estate agents and house hunters automate TikTok research. It scrapes videos tagged \"rental\" via Apify, uses AI to filter properties specifically for \"couples in their 20s,\" and generates recommendation reasons. Finally, it saves the curated links to Google Sheets and sends a notification to Slack."
      },
      "typeVersion": 1
    },
    {
      "id": "10974974-ddee-4c62-94f2-ca5edcb19e2f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 560,
        "height": 144,
        "content": "### Requirements\nYou need an active n8n instance (v1.0+) and valid accounts for Apify, OpenRouter, Google Cloud, and Slack. Specifically, you must have API keys for Apify and OpenRouter, along with OAuth credentials for Google Sheets and Slack, to allow the workflow to access data and post messages on your behalf."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "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
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Run an Actor and get dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}