Harry Hazby

Harry Hazby

Viral Video Creator: Fal.ai AI Videos β†’ TikTok, YouTube & Instagram Automation

🎬 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

  • Automated Ideation: Leverages GPT-4 to generate unique, trend-aware ASMR video concepts, complete with captions and hashtags.
  • AI-Powered Visuals: Uses Fal.ai to transform text prompts into multiple cinematic video scenes.
  • Custom Soundscapes: Generates matching ASMR audio tracks to enhance the sensory experience.
  • End-to-End Automation: The entire process, from idea generation to social media publishing, runs automatically on a schedule.
  • Content Management: Logs all ideas and final video URLs into Google Sheets for easy tracking and management.

πŸ› οΈ 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

  • n8n instance (self-hosted or cloud)
  • OpenAI account with API access
  • Google account with Sheets access
  • Fal.ai account with API access
  • Blotato account for social media publishing
  • Connected Instagram and TikTok accounts in Blotato

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 A Column B Column C Column D Column E
      Caption Idea Environment Sound Status
    • 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 A Column B Column C Column D
      final_output thumbnail_url status created_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:

  • Generates a video clip for each of the three scenes
  • Generates a single, corresponding ASMR audio track
  • Continuously polls Fal.ai until assets are ready

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:

  • Change from daily to hourly, weekly, or specific times
  • Add multiple triggers for different time zones
  • Use cron expressions for complex schedules

Error Handling

Add error handling nodes:

  • Connect error outputs to notification systems
  • Log failed attempts to a separate Google Sheet
  • Implement retry logic for API failures

🎯 Perfect For

  • Content Creators looking to scale their output with minimal effort
  • Digital Marketers seeking a consistent stream of engaging, trend-based content
  • Brands wanting to build a strong presence on short-form video platforms
  • Automation Enthusiasts building content-driven businesses

πŸš€ 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

  • Workflow Engine: n8n
  • AI Models: GPT-4, Fal.ai (Wavespeed & MMAudio-v2)
  • Data Storage: Google Sheets
  • Publishing: Blotato API
  • Output: Platform-optimized 9:16 videos with synchronized ASMR audio

Do you want to automate your business?

Let's talk about your project