
TikTok Trend Analyzer with Apify + Gemini + Airtable
Description
Categories
📢 Marketing🤖 AI & Machine Learning
Nodes Used
n8n-nodes-base.waitn8n-nodes-base.waitn8n-nodes-base.webhookn8n-nodes-base.airtablen8n-nodes-base.airtablen8n-nodes-base.airtablen8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNote
PriceKostenlos
Views0
Last Updated11/28/2025
workflow.json
{
"meta": {
"instanceId": "689fa22e68cd4198e4ae37f3cc44f498087edd235a867e22515be823bab694c7"
},
"nodes": [
{
"id": "400723bb-3c8e-4bb7-9d13-6fc4c3ab847e",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
1856,
624
],
"webhookId": "6654e70f-4bef-43c3-95e9-c50d55f31018",
"parameters": {
"unit": "minutes",
"amount": 4
},
"typeVersion": 1.1
},
{
"id": "fabb00ce-35c4-48e4-a6c1-bc86c985b8fc",
"name": "Wait1",
"type": "n8n-nodes-base.wait",
"position": [
2304,
672
],
"webhookId": "0b2e1c5d-2df4-438d-a4b3-5c4c876c7191",
"parameters": {
"amount": 10
},
"typeVersion": 1.1
},
{
"id": "af5d7e89-0378-4048-a9f4-5cdda53f5e97",
"name": "OpenAI Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2160,
1232
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "6cfdd775-ab4b-4abc-8552-c5047d9c16bd",
"name": "Start TikTok Trends Scraper (Apify)",
"type": "n8n-nodes-base.httpRequest",
"position": [
1632,
624
],
"parameters": {
"url": "https://api.apify.com/v2/acts/fetchly~tiktok-trends-api/runs",
"method": "POST",
"options": {},
"jsonBody": "={\n \"country\": \"United States\",\n \"downloadCoverImage\": false,\n \"downloadVideo\": false,\n \"generatePermalinks\": false,\n \"numberOfVideos\": 100,\n \"proxyType\": \"RESIDENTIAL\",\n \"useApifyProxy\": true\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "DNfktOVziN76FiRs",
"name": "Query Auth account"
}
},
"executeOnce": true,
"typeVersion": 4.2
},
{
"id": "9debcd77-79a8-42db-85ea-37cb1467ea7a",
"name": "Fetch TikTok Dataset (Apify)",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
2080,
624
],
"parameters": {
"url": "https://api.apify.com/v2/acts/fetchly~tiktok-trends-api/runs/last/dataset/items",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "DNfktOVziN76FiRs",
"name": "Query Auth account"
}
},
"executeOnce": true,
"typeVersion": 4.2
},
{
"id": "889ada0a-2d0d-4fe5-b70e-1e3e2821c495",
"name": "Save Trending TikToks to Airtable",
"type": "n8n-nodes-base.airtable",
"position": [
2304,
480
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appwEOGxCbXgEGwjT",
"cachedResultUrl": "https://airtable.com/appwEOGxCbXgEGwjT",
"cachedResultName": "Creative Ideation"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblOtG5ciGFSxE5My",
"cachedResultUrl": "https://airtable.com/appwEOGxCbXgEGwjT/tblOtG5ciGFSxE5My",
"cachedResultName": "TikTok V2"
},
"columns": {
"value": {
"Likes": "={{ $json.likes }}",
"Views": "={{ $json.views }}",
"Shares": "={{ $json.shares }}",
"Caption": "={{ $json.title }}",
"Comments": "={{ $json.comments }}",
"Username": "={{ $json.author }}",
"Tiktok URL": "={{ $json.url }}",
"Sound Title": "={{ $json.music.title }}",
"Trending Position": "={{ $json.trending_position }}",
"Downloaded Video URL": "={{ $json.permalink }}"
},
"schema": [
{
"id": "Tiktok URL",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Tiktok URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Good Video",
"type": "boolean",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Good Video",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Downloaded Video URL",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Downloaded Video URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date Added",
"type": "dateTime",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Date Added",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Caption",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Caption",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Likes",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Likes",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trending Position",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Trending Position",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Comments",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Comments",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Shares",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Shares",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Views",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Views",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Username",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Username",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Sound Title",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Sound Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Send to AI",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Send to AI",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Summary",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "AI Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Visual Hook Analysis",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Visual Hook Analysis",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Audio Script Analysis",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Audio Script Analysis",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subtitle Analysist",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Subtitle Analysist",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {
"typecast": true
},
"operation": "create"
},
"credentials": {
"airtableTokenApi": {
"id": "FWiG3Zt5LOBVBLsx",
"name": "HomefrontAI"
}
},
"typeVersion": 2.1
},
{
"id": "60d5b712-4309-4d77-9b79-9673ceebc915",
"name": "Receive TikTok Video for Analysis",
"type": "n8n-nodes-base.webhook",
"position": [
1152,
1008
],
"webhookId": "da7d9d83-9e2b-4346-9666-85b642364f19",
"parameters": {
"path": "creative-ideation",
"options": {}
},
"typeVersion": 2
},
{
"id": "10847985-1332-4c37-816b-24e3c1db6e01",
"name": "Find Airtable Record by URL",
"type": "n8n-nodes-base.airtable",
"position": [
1504,
1008
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appwEOGxCbXgEGwjT",
"cachedResultUrl": "https://airtable.com/appwEOGxCbXgEGwjT",
"cachedResultName": "Creative Ideation"
},
"limit": 1,
"table": {
"__rl": true,
"mode": "list",
"value": "tblOtG5ciGFSxE5My",
"cachedResultUrl": "https://airtable.com/appwEOGxCbXgEGwjT/tblOtG5ciGFSxE5My",
"cachedResultName": "TikTok V2"
},
"options": {},
"operation": "search",
"returnAll": false,
"filterByFormula": "={Tiktok URL} = \"{{ $json.query.media }}\""
},
"typeVersion": 2.1
},
{
"id": "d6f04810-a301-415a-a5e2-352224090568",
"name": "Analyze TikTok Video (Gemini 2.5)",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
1776,
1008
],
"parameters": {
"text": "=You are an expert AI analyst specialized in evaluating why TikTok videos go viral. Your job is to synthesize the data and produce a **deep, objective analysis**.\n\n---\n\n### **Your Goal**\n\nAnalyze the inputs holistically and answer:\n\n* Why did this video go viral?\n* What were the core drivers of performance?\n* How strong was the hook, storytelling, and trend alignment?\n* What patterns can be reused in future videos?\n\n---\n\n### **Constraints**\n\n* **Do not guess.** Derive all insights strictly from provided input data.\n* **Be objective.** Avoid vague, flattering, or promotional language.\n* **Justify every insight.** Support conclusions with clear links to input signals.\n",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"resource": "video",
"operation": "analyze",
"videoUrls": "={{ $json['Tiktok URL'] }}"
},
"typeVersion": 1
},
{
"id": "071fe056-dd5b-47c0-b82c-efa0d54da284",
"name": "Extract Insights (LLM)",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
2080,
1008
],
"parameters": {
"text": "={{ $json.content.parts[0].text }}",
"options": {},
"attributes": {
"attributes": [
{
"name": "ai_summary",
"required": true,
"description": "A concise, high-level summary of the content (main message, purpose, or context). Should explain the core idea in plain language so a non-expert can quickly understand."
},
{
"name": "visual_hook_analysis",
"required": true,
"description": "Analysis of the visual elements used as hooks (e.g., camera angles, expressions, colors, on-screen text, or visuals designed to capture attention in the first few seconds). Focus on effectiveness and engagement."
},
{
"name": "audio_analysis",
"required": true,
"description": "Evaluation of the audio aspects (tone, music, pacing, clarity, voice delivery, sound effects). Explain how these elements support engagement, mood, and message delivery."
},
{
"name": "subtitle_analysis",
"required": true,
"description": "Review of the subtitles/captions (accuracy, timing, readability, formatting, and whether they enhance comprehension and viewer retention)."
}
]
}
},
"typeVersion": 1.2
},
{
"id": "a62a3cb5-79a4-44c6-812d-2eaeb4105b60",
"name": "Update Airtable with AI Insights",
"type": "n8n-nodes-base.airtable",
"position": [
2432,
1008
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appwEOGxCbXgEGwjT",
"cachedResultUrl": "https://airtable.com/appwEOGxCbXgEGwjT",
"cachedResultName": "Creative Ideation"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblOtG5ciGFSxE5My",
"cachedResultUrl": "https://airtable.com/appwEOGxCbXgEGwjT/tblOtG5ciGFSxE5My",
"cachedResultName": "TikTok V2"
},
"columns": {
"value": {
"id": "={{ $('Find Airtable Record by URL').item.json.id }}",
"AI Summary": "={{ $json.output.ai_summary }}",
"Audio Analysis": "={{ $json.output.audio_analysis }}",
"Subtitle Analysis": "={{ $json.output.subtitle_analysis }}",
"Visual Hook Analysis": "={{ $json.output.visual_hook_analysis }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Tiktok URL",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Tiktok URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Good Video",
"type": "boolean",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Good Video",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Date Added",
"type": "dateTime",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Date Added",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Caption",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Caption",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Likes",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Likes",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Trending Position",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Trending Position",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Comments",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Comments",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Shares",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Shares",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Views",
"type": "number",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Views",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Username",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Username",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Sound Title",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Sound Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Send to AI",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Send to AI",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Summary",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "AI Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Visual Hook Analysis",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Visual Hook Analysis",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Audio Analysis",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Audio Analysis",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subtitle Analysis",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Subtitle Analysis",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update"
},
"typeVersion": 2.1
},
{
"id": "7912c2ed-a29e-4e7a-8843-11bc97032f63",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-64,
48
],
"parameters": {
"width": 704,
"height": 640,
"content": "## TikTok Trend Analyzer with Apify + Gemini + Airtable\n\nAutomatically scrape trending TikTok videos, analyze their virality using Gemini AI, and store insights directly into Airtable for creative research or content planning.\n\n## Who’s it for?\nMarketing analysts, creators, and creative agencies looking to understand why videos go viral and how to replicate successful hooks and formats.\n\n## How it works\n1. A scheduled trigger runs the Apify TikTok Trends Scraper weekly.\n2. The scraper collects trending video metadata.\n3. Data is stored in Airtable (views, likes, captions, sounds, etc.).\n4. When a specific video is submitted via webhook, the workflow fetches it from Airtable.\n5. Gemini AI analyzes the video and extracts structured insights: summary, visual hook, audio, and subtitle analysis.\n6. The workflow updates the Airtable record with these AI insights.\n\n## How to set up\nConnect Apify and Airtable credentials, link Gemini or OpenAI keys, and adjust the schedule frequency. Add your Airtable base and table IDs. You can trigger analysis manually via the webhook endpoint.\n"
},
"typeVersion": 1
},
{
"id": "84be31a2-4fef-47df-a264-16ee9ed5a6af",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1552,
528
],
"parameters": {
"color": 5,
"height": 272,
"content": "Ensure your Apify API key is stored in the Credential Manager. Choose your region or modify scrape parameters.\n"
},
"typeVersion": 1
},
{
"id": "52b5ee81-6b61-4a6d-b36c-4c2a0fafb664",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2224,
400
],
"parameters": {
"color": 5,
"height": 256,
"content": "Update your Airtable base and table IDs; map fields for Likes, Views, Caption, Username, etc."
},
"typeVersion": 1
},
{
"id": "d6ee9441-bfc8-4279-b66a-5ae16389c509",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1024,
544
],
"parameters": {
"color": 5,
"height": 224,
"content": "Adjust the cron schedule for how often you want to scrape TikTok trends (default: weekly)."
},
"typeVersion": 1
},
{
"id": "5012380d-da8f-41fa-a30b-cd53938537e1",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
2352,
928
],
"parameters": {
"color": 5,
"height": 256,
"content": "Confirm mapping of AI Summary, Hook, Audio, and Subtitle Analysis columns."
},
"typeVersion": 1
},
{
"id": "ae759972-c8aa-4728-a0e7-181d1df3b4f1",
"name": "Weekly Trend Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
1088,
624
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 0 * * 1"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "f665c606-b97b-4e76-9ee3-6c57514a63b9",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
928
],
"parameters": {
"color": 5,
"height": 256,
"content": "Review the system prompt to refine how Gemini analyzes virality factors."
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Wait": {
"main": [
[
{
"node": "Fetch TikTok Dataset (Apify)",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Fetch TikTok Dataset (Apify)",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Extract Insights (LLM)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Weekly Trend Trigger": {
"main": [
[
{
"node": "Start TikTok Trends Scraper (Apify)",
"type": "main",
"index": 0
}
]
]
},
"Extract Insights (LLM)": {
"main": [
[
{
"node": "Update Airtable with AI Insights",
"type": "main",
"index": 0
}
]
]
},
"Find Airtable Record by URL": {
"main": [
[
{
"node": "Analyze TikTok Video (Gemini 2.5)",
"type": "main",
"index": 0
}
]
]
},
"Fetch TikTok Dataset (Apify)": {
"main": [
[
{
"node": "Save Trending TikToks to Airtable",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Analyze TikTok Video (Gemini 2.5)": {
"main": [
[
{
"node": "Extract Insights (LLM)",
"type": "main",
"index": 0
}
]
]
},
"Receive TikTok Video for Analysis": {
"main": [
[
{
"node": "Find Airtable Record by URL",
"type": "main",
"index": 0
}
]
]
},
"Start TikTok Trends Scraper (Apify)": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
}
}
}