🎬 Viral video creator: Fal.ai AI videos → TikTok, YouTube & Instagram automation

⚡ 838 views · 🎬 Content Creation & Video

💡 Pro Tip — Since TikTok doesn’t have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments — drop it into your workflow and skip the parsing.

View All Scrapers

Description

🎬 The AI Viral Video Factory: From Concept to Content in Minutes

This n8n workflow is a fully automated pipeline that takes a creative concept and transforms it into a polished, platform-ready short-form video. It ideates, generates video and audio using AI, merges them, and publishes the final content to your social media accounts!

✨ Core Features

🛠️ Setup and Configuration Guide

Follow these detailed steps to get the workflow running. You’ll need accounts for n8n, OpenAI, Google, Fal.ai, and Blotato.

Prerequisites

Step 1: Google Sheets Template Setup

This workflow requires two separate sheets in a single Google Spreadsheet.

  1. Create a new Google Spreadsheet

    • Go to Google Sheets and create a new spreadsheet
    • Name it something memorable (e.g., “AI Video Factory Data”)
    • Note the Spreadsheet ID from its URL:
      https://docs.google.com/spreadsheets/d/SPREADSHEET_ID_IS_HERE/edit#gid=0
    • You’ll need this ID later for the workflow configuration
  2. Sheet 1: Idea Logging

    This sheet stores the initial ideas generated by the AI.

    • Create a sheet and name it exactly: Ideas

    • Set up the following columns in this exact order (case-sensitive):

      Column AColumn BColumn CColumn DColumn E
      CaptionIdeaEnvironmentSoundStatus
    • Do not add any additional columns or headers

  3. Sheet 2: Final Output Logging

    This sheet stores the links to the final, published videos.

    • Create a second sheet in the same spreadsheet

    • Name it exactly: Published

    • Set up the following columns in this exact order (case-sensitive):

      Column AColumn BColumn CColumn D
      final_outputthumbnail_urlstatuscreated_date
    • Do not add any additional columns or headers

Step 2: API Key and Credentials Configuration

You need to obtain and configure credentials for each service used in the workflow.

OpenAI Configuration

  1. Get your API Key:

  2. Add to n8n:

    • In n8n, go to Credentials > New
    • Search for “OpenAI” and select it
    • Paste your API key
    • Name the credential (e.g., “OpenAI account”)
    • Save the credential
  3. Update the workflow:

    • In the nodes LLM: Generate Raw Idea (GPT-4.1) and LLM: Draft Video Prompt Details (GPT-4.1)
    • Select the OpenAI credential you just created

Google Sheets Configuration

  1. Set up OAuth2:

    • In n8n, go to Credentials > New
    • Search for “Google Sheets” and select Google Sheets OAuth2 API
    • Follow the OAuth setup instructions to connect your Google account
    • Name the credential (e.g., “Google Sheets account”)
  2. Update the workflow:

    • In all Google Sheets nodes:
      • Save Idea & Metadata to Google Sheets
      • Save Final Video URL to Sheets
      • Retrieve Final Video Data
    • Select your Google Sheets credential
    • Enter your Spreadsheet ID in the Document ID field
    • Ensure the sheet names match exactly (“Ideas” and “Published”)

Fal.ai Configuration

  1. Get your API Key:

    • Sign up at fal.ai
    • Go to your dashboard and get your API Key
    • The key format is: key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  2. Update the workflow:

    • No separate n8n credential needed
    • Find these HTTP Request nodes and update the Authorization header:
      • Generate Video Clips (Wavespeed AI)
      • Generate ASMR Sound (Fal AI)
      • Merge Clips into Final Video (Fal AI)
      • Poll Video Generation Status
      • Poll Sound Generation Status
      • Poll Merge Status
    • In each node’s Header Parameters, replace {{YOUR_FAL_AI_KEY}} with your actual key
    • The value should be: key YOUR_ACTUAL_FAL_AI_KEY

Blotato Configuration

  1. Get your API Key:

    • Sign up at blotato.com
    • Get your API key from the dashboard
    • Connect your Instagram and TikTok accounts
    • Note down the Account IDs for each platform
  2. Update the workflow:

    • In these nodes:
      • Upload Video to Blotato
      • Publish to Instagram
      • Publish to TikTok
    • Replace {{YOUR_BLOTATO_API_KEY}} with your actual API key in the Header Parameters
  3. Set Social Media IDs:

    • In the Assign Social Media IDs node
    • Replace {{YOUR_INSTAGRAM_ACCOUNT_ID}} with your Instagram account ID from Blotato
    • Replace {{YOUR_TIKTOK_ACCOUNT_ID}} with your TikTok account ID from Blotato

Step 3: Workflow Activation

  1. Test the workflow:

    • Use the manual trigger to test before scheduling
    • Monitor each node’s execution
    • Check Google Sheets for proper data logging
  2. Schedule automation:

    • The workflow is set to run daily
    • Adjust the schedule in the Trigger: Start Daily Content Generation node as needed

⚙️ Workflow Breakdown

Ideation & Storage

The workflow triggers on schedule. An AI Agent generates a unique ASMR video concept and saves the Idea, Caption, Environment, and Sound details into your first Google Sheet.

Scene Prompting

A second AI Agent takes the approved idea from the sheet and creates three detailed, cinematic scene prompts designed for text-to-video AI.

Video & Audio Generation

The workflow makes parallel API calls to Fal.ai:

Merging & Finalizing

Once all assets are generated, it sends a request to Fal.ai’s FFMPEG API to stitch the video clips and audio track into one final video.

Logging & Publishing

The final video URL is saved to your second Google Sheet. The workflow then uploads this video to Blotato and publishes it to your specified Instagram and TikTok accounts.

🎨 Customization Guide

Content Type Customization

To adapt this workflow for different content types:

  1. Modify the AI prompts:

    • In AI Agent: Generate Creative Video Idea, update the prompt to match your content style
    • Adjust the systemMessage to reflect your brand voice and content guidelines
  2. Change video parameters:

    • In Generate Video Clips (Wavespeed AI), modify:
      • duration: Video length (default: 10 seconds)
      • aspect_ratio: Change from “9:16” to “16:9” for horizontal videos
  3. Adjust audio generation:

    • In Generate ASMR Sound (Fal AI), update the prompt for different audio styles
    • Modify cfg_strength (1-10) for more/less adherence to prompt

Platform-Specific Adjustments

  1. Instagram-specific:

    • Maximum video duration: 90 seconds for Reels
    • Optimal hashtag count: 5-10
  2. TikTok-specific:

    • Maximum video duration: 10 minutes
    • Optimal hashtag count: 3-5
    • In Publish to TikTok node, adjust privacy settings as needed

Scheduling Options

Modify the Trigger: Start Daily Content Generation node:

Error Handling

Add error handling nodes:

🎯 Perfect For

🚀 Getting Started

  1. Import the workflow into your n8n instance
  2. Follow the setup guide above step-by-step
  3. Test with manual execution first
  4. Monitor the first few automated runs
  5. Adjust prompts and parameters based on results

đź“§ Support

For questions or issues with this template:

đź”§ Technical Stack


đź”— Nodes Used

Google Sheets, HTTP Request, Schedule Trigger, AI Agent, OpenAI Chat Model, Structured Output Parser

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup