Back to Templates

AI-Driven Video Creation & Upload to Instagram, TikTok & YouTube from Drive

Created by

Created by: DevCode Journey || devcodejourney

DevCode Journey

Last update

Last update 12 hours ago

Share


👥 Who is this for?

This n8n workflow is designed for content creators, marketers, social media managers, and developers focused on generating high-volume, trend-based video content for platforms like TikTok, Reels, or Shorts. It's perfect for anyone wanting to automate the creative process from idea inception to final rendered video, especially for niches like career coaching, resume building, and job-seeking advice delivered with an edgy, viral tone. It minimizes manual steps in scriptwriting, image/video generation, and audio production.

🎬 What this Workflow Does

This n8n workflow automates the creation of a full 5-part video segment, complete with custom captions, hyper-realistic images converted to video clips, and a unique voice-over. It takes an idea from a Google Sheet, uses OpenAI to craft a viral narrative (captions and script) and detailed image prompts, utilizes PiAPI for Flux (Image) and Kling (Video) generation, creates a voice-over with Eleven Labs, and finally stitches everything together using a Creatomate template for final rendering. The output is a ready-to-post MP4 file.

✨ Key Features

  • AI-Driven Narrative: Generates 5 dramatic captions and an edgy voice script using OpenAI in an Andrew Tate/Charlie Sheen style.
  • Dual-Model Media Creation: Uses PiAPI to generate high-quality images via Flux and converts them to dynamic video clips via Kling.
  • Hyper-Realistic Visuals: Image prompts are optimized for first-person POV (Point-of-View) for high engagement.
  • Automated Audio Production: Generates a custom voice-over using Eleven Labs and makes it publicly accessible via Google Drive.
  • Seamless Assembly: Uses Creatomate to combine all 5 video clips, 5 captions, and the single audio track into one final video file.
  • Publishing & Tracking: Uploads the final video to Google Drive and updates the originating Google Sheet with completion status and token usage for cost analysis.

🛠️ Requirements

  • API Credentials:
    • OpenAI API: For generating captions, scripts, and image prompts.
    • PiAPI Key: For accessing the Flux (image) and Kling (video) generation models.
    • Eleven Labs API Key: For Text-to-Speech voice-over generation.
    • Creatomate API Key: For rendering the final video using a specified template.
  • Google Credentials:
    • Google Sheets OAuth2: For loading the initial ideas and logging results.
    • Google Drive OAuth2: For uploading the voice-over audio and final video.
  • Creatomate Template ID: A pre-built Creatomate template configured to accept 5 videos, 5 text layers, and 1 audio track.
  • Discord Webhook: (Optional) For receiving completion notifications.

🚀 How to Use

Step-by-Step Setup

1. Configure API Keys

  • Add credentials for OpenAI, PiAPI, Eleven Labs, and Creatomate in your n8n credentials manager (or the dedicated "Set API Keys" node).
  • Ensure your Creatomate Template ID is correctly entered in the relevant node configuration.

2. Set Up Google Sheet

  • Copy the [Google Sheet Template] and update the "Load Google Sheet" node with your copied sheet ID and credentials.
  • Add your video ideas to the sheet and mark them "for production".

3. Customize AI Prompts

  • Review and adjust the system messages in the "Generate Video Captions" and "Generate Image Prompts" nodes to refine the tone, style, and content of the output.
  • Confirm the voice ID in the "Generate voice" node for Eleven Labs if you wish to change the default speaker.

4. Configure Google Drive Upload

  • Specify the target Google Drive folder ID in the "Upload Voice Audio" and final video upload nodes to ensure assets are saved correctly.
  • Verify public sharing permissions are set correctly for the voice audio.

5. Test the Pipeline

  • Run the workflow manually to process a test idea from the Google Sheet.
  • Check the "Wait" nodes' duration to ensure they accommodate the processing times for Flux (3 min), Kling (10 min), and Creatomate (3 min).
  • Verify that the final video URL is correctly logged back to the Google Sheet and sent to Discord.

🧩 Workflow Components

1. Idea & Content Generation

  • Load Google Sheet: Retrieves a new video idea marked for production.
  • Generate Video Captions: Uses GPT-4o-mini to create 5 high-impact, story-driven captions.
  • Generate Image Prompts: Uses O3-mini to expand each caption into a detailed POV prompt for Flux.
  • Generate Script: Uses GPT-4o-mini to create a short, continuous voice-over script linking the 5 scenes.

2. Media Generation (Parallel Processing)

  • Generate Image (PiAPI/Flux): Creates the 5 initial images.
  • Image-to-Video (PiAPI/Kling): Converts the 5 images into dynamic video clips.
  • Wait 3min / Wait 10min: Delays to wait for asynchronous image and video processing to complete.
  • Generate voice (Eleven Labs): Converts the script into an MP3 audio file.

3. Assembly & Publishing

  • Match captions with videos / Pair Videos with Audio: Merge nodes combine all 5 video URLs, 5 captions, and the 1 audio URL into a single data item.
  • Render Final Video (Creatomate): Submits the combined media to the video template for final assembly.
  • Get Final Video: Polls Creatomate for the finished MP4 video URL.
  • Upload Final Video (Google Drive): Stores the final video.
  • Update Google Sheet: Logs the final video URL and cost data.

📊 Optional Features

  • Cost Tracking: The "Calculate Token Usage" node automatically totals OpenAI token consumption for cost analysis.
  • Failure Retries: "Check for failures" nodes (for image and video generation) allow the workflow to automatically wait and retry failed tasks.
  • Discord Notification: The "Notify me on Discord" node provides instant alerts when a new video is ready for download and posting.

🙋 For Help & Community