Back to Catalog

Scrape TikTok trends & generate AI videos with Apify, Fal AI & Google Suite

furuidoreandorofuruidoreandoro
659 views
2/3/2026
Official Page

Automated TikTok Repurposing & Video Generation Workflow

Who’s it for

This workflow is designed for content creators, social media managers, and marketers—specifically those in the career, recruitment, or "job change" (転職/就職) niches. It is ideal for anyone looking to automate the process of finding trending short-form content concepts and converting them into fresh AI-generated videos.

How it works / What it does

This workflow automates the pipeline from content research to video creation:

  1. Scrape Data: It triggers an Apify actor (clockworks/tiktok-scraper) to search and scrape TikTok videos related to "Job Change" (転職) and "Employment" (就職).
  2. Store Raw Data: It saves the scraped TikTok metadata (text, stats, author info) into a Google Sheet.
  3. AI Analysis & Prompting: An AI Agent (via OpenRouter) analyzes the scraped video content and creates a detailed prompt for a new video (concept, visual cues, aspect ratio).
  4. Log Prompts: The generated prompt is saved to a separate tab in the Google Sheet.
  5. Video Generation: The prompt is sent to Fal AI (Veo3 model) to generate a new 8-second, vertical (9:16) video with audio.
  6. Wait & Retrieve: The workflow waits for the generation to complete, then retrieves the video file.
  7. Cloud Storage: Finally, it uploads the generated video file to a specific Google Drive folder.

How to set up

  1. Credentials: Configure the following credentials in n8n:
    • Apify API: (Currently passed via URL query params in the workflow, recommended to switch to Header Auth).
    • Google Sheets OAuth2: Connect your Google account.
    • OpenRouter API: For the AI Agent.
    • Fal AI (Header Auth): For the video generation API.
    • Google Drive OAuth2: For uploading the final video.
  2. Google Sheets:
    • Create a spreadsheet.
    • Note the documentId and update the Google Sheets nodes.
    • Ensure you have the necessary Sheet names (e.g., "シート1" for raw data, "生成済み" for prompts) and columns mapped.
  3. Google Drive:
    • Create a destination folder.
    • Update the Upload file node with the correct folderId.
  4. Apify:
    • Update the token in the HTTP Request and HTTP Request1 URLs with your own Apify API token.

Requirements

  • n8n Version: 1.x or higher (Workflow uses version 4.3 nodes).
  • Apify Account: With access to clockworks/tiktok-scraper and sufficient credits.
  • Fal.ai Account: With credits for the fal-ai/veo3 model.
  • OpenRouter Account: With credits for the selected LLM.
  • Google Workspace: Access to Drive and Sheets.

How to customize the workflow

  • Change the Niche: Update the searchQueries JSON body in the first HTTP Request node (e.g., change "転職" to "Cooking" or "Fitness").
  • Adjust AI Logic: Modify the AI Agent system prompt to change the style, tone, or structure of the video prompts it generates.
  • Video Settings: In the Fal Submit node, adjust bodyParameters to change the duration (e.g., 5s), aspect ratio (e.g., 16:9), or disable audio.
  • Scale: Increase the amount in the Limit node to process more than one video per execution.

n8n Workflow: Scrape TikTok Trends & Generate AI Videos

This n8n workflow automates the process of scraping TikTok trend data, generating AI-powered video scripts, and managing the content within Google Sheets and Google Drive. It's designed to streamline content creation for trending topics.

What it does

This workflow simplifies and automates the following steps:

  1. Manual Trigger: The workflow is initiated manually, allowing for on-demand execution.
  2. Scrape TikTok Trends (External): It interacts with an external service (likely Apify, based on the directory name, though not explicitly defined in the JSON) to scrape trending TikTok data.
  3. Limit Data: The workflow limits the number of scraped TikTok trend items processed, focusing on a manageable subset.
  4. Generate AI Video Scripts: For each trend, an AI Agent (powered by LangChain and an OpenRouter Chat Model) generates creative video scripts.
  5. Save to Google Sheets: The generated AI video scripts and associated trend data are saved into a Google Sheet for easy organization and tracking.
  6. Wait: A brief pause is introduced, potentially to respect API rate limits or allow for data synchronization.
  7. Upload to Google Drive: The generated video scripts (or related content) are then uploaded to Google Drive, ensuring they are stored securely and accessible.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance to import and execute the workflow.
  • Google Sheets Account: Configured credentials for Google Sheets to store trend data and video scripts.
  • Google Drive Account: Configured credentials for Google Drive to store generated content.
  • OpenRouter API Key: An API key for OpenRouter to power the AI Chat Model for script generation.
  • External TikTok Scraper: Access to an external service (e.g., Apify) capable of scraping TikTok trends, which will be called via the HTTP Request node.

Setup/Usage

  1. Import the workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your Google Sheets credentials.
    • Set up your Google Drive credentials.
    • Configure your OpenRouter credentials for the "OpenRouter Chat Model" node.
  3. Configure HTTP Request:
    • Update the "HTTP Request" node (Node ID 19) with the correct URL and parameters for your chosen TikTok scraping service (e.g., Apify). Ensure it's set up to retrieve trending data.
  4. Configure AI Agent:
    • Review and adjust the prompt in the "AI Agent" node (Node ID 1119) to tailor the video script generation to your specific needs.
  5. Configure Google Sheets:
    • Specify the Spreadsheet ID and sheet name in the "Google Sheets" node (Node ID 18) where you want to store the data.
  6. Configure Google Drive:
    • Specify the folder ID and file naming conventions in the "Google Drive" node (Node ID 58) for uploading content.
  7. Execute the workflow: Click "Execute Workflow" to run the automation.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

AI-powered code review with linting, red-marked corrections in Google Sheets & Slack

Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.

higashiyama By higashiyama
90

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353