{
  "name": "Scrape TikTok trends & generate AI videos with Apify, Fal AI & Google Suite",
  "nodes": [
    {
      "id": "f7ea3195-b3d6-4cfc-af35-9127b141bb9c",
      "name": "Fal Submit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1792,
        0
      ]
    },
    {
      "id": "ff5841b5-57ab-4e7d-8b8d-4748b52f76ea",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2416,
        0
      ]
    },
    {
      "id": "edd10d01-6c3b-4edc-9b20-0e643e3fb654",
      "name": "HTTP Request3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2208,
        0
      ]
    },
    {
      "id": "4fcb6775-88ce-4791-8da0-57440aa6d2a6",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        2000,
        0
      ]
    },
    {
      "id": "e4e07935-6be1-4f7e-b6f5-ff560cf2feb3",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        1040,
        0
      ]
    },
    {
      "id": "2132fb30-fb02-4abf-a386-0c79740d1361",
      "name": "Append or update row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1584,
        0
      ]
    },
    {
      "id": "d56e500d-813e-4177-9bf2-af682d96e81f",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        832,
        0
      ]
    },
    {
      "id": "d60d4cbe-ef88-434a-9a4f-8f75f22f9878",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1232,
        208
      ]
    },
    {
      "id": "ae3786f5-2407-4619-a83c-3408da37664c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1232,
        0
      ]
    },
    {
      "id": "e1129a37-ed62-4ddc-a4c9-fb2a8c0bc42a",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        416,
        0
      ]
    },
    {
      "id": "de994ac2-ab0a-4517-86a3-9c0d051edfa9",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        624,
        0
      ]
    },
    {
      "id": "4c9527a6-eb8e-4f33-802c-2d27e37b087d",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        0
      ]
    },
    {
      "id": "99f75e4a-cd04-43ee-9d29-ccb02de0ce06",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "43c7bfad-f532-485d-ab31-93fa7553b8b5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -544
      ],
      "parameters": {
        "width": 848,
        "height": 448,
        "content": "## How to set up\n1.  **Credentials:** Configure the following credentials in n8n:\n    *   **Apify API:** (Currently passed via URL query params in the workflow, recommended to switch to Header Auth).\n"
      }
    },
    {
      "id": "5ab251b0-f54c-4fc5-b31f-17c366c25c2c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -544
      ],
      "parameters": {
        "width": 752,
        "height": 448,
        "content": "## How it works / What it does\nThis workflow automates the pipeline from content research to video creation:\n1.  **Scrape Data:** It triggers an Apify actor (`clockworks/tiktok-scraper`) to search and"
      }
    },
    {
      "id": "45dab3cd-8c5d-4e53-8981-152dc88a82e9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        -288
      ],
      "parameters": {
        "width": 640,
        "height": 192,
        "content": "## Requirements\n*   **n8n Version:** 1.x or higher (Workflow uses version 4.3 nodes).\n*   **Apify Account:** With access to `clockworks/tiktok-scraper` and sufficient credits.\n*   **Fal.ai Account:** "
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "HTTP Request3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Append or update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fal Submit": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request3": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet1": {
      "main": [
        [
          {
            "node": "Fal Submit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}