{
  "name": "TikTok videos for a keyword to Google Sheets every day",
  "nodes": [
    {
      "parameters": {
        "content": "## TikTok videos for a keyword to Google Sheets every day\n\nEvery day, search TikTok for your brand or competitor keywords and append the videos to a Google Sheet: caption, video URL, author, views, likes, comments, shares and date. No TikTok login needed.\n\n### Setup (3 minutes)\n1. **Apify token** - create a free account at apify.com and copy your API token (Settings > API & Integrations).\n   In the **Search TikTok** node, create a *Header Auth* credential: name `Authorization`, value `Bearer YOUR_TOKEN`.\n2. **Google Sheets** node - connect your Google account and paste the URL of an empty sheet. Columns are created from the data automatically.\n3. Edit the JSON body of **Search TikTok** with your own inputs, then activate the workflow.\n\n**Cost:** pay per video; see the Actor page. `maxTotalChargeUsd` in the body is a hard cap per run.\nActor: https://apify.com/om_kh/tiktok-search-scraper",
        "height": 460,
        "width": 460
      },
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -540,
        -160
      ],
      "id": "ef6060d4-e4e7-4ce0-81ec-9caad676c12e"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "triggerAtHour": 8
            }
          ]
        }
      },
      "name": "Every day",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ],
      "id": "c34529cb-5eea-4a6f-ad05-24d59fec14e9"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/om_kh~tiktok-search-scraper/run-sync-get-dataset-items",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"keywords\": [\n    \"your brand\",\n    \"competitor name\"\n  ],\n  \"maxTotalChargeUsd\": 1.0\n}",
        "options": {
          "timeout": 300000
        }
      },
      "name": "Search TikTok",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        260,
        0
      ],
      "id": "edf00477-675c-43be-9c83-9eb811af707a"
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": []
        },
        "options": {}
      },
      "name": "Append to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        520,
        0
      ],
      "id": "fcdf6a4f-acb1-45e6-9c52-8df44f370808"
    }
  ],
  "connections": {
    "Every day": {
      "main": [
        [
          {
            "node": "Search TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search TikTok": {
      "main": [
        [
          {
            "node": "Append to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  }
}