🎬 Create AI-powered YouTube shorts with OpenAI, ElevenLabs, 0CodeKit!

766 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

YouTube Shorts Automation with AI-Powered Video Generation

Overview

This workflow automates the creation of engaging YouTube Shorts by leveraging AI tools to generate scripts, audio, images, and videos, then compiles them into a final video ready for upload. It uses OpenAI for script and image prompt generation, ElevenLabs for text-to-speech, Replicate for image and video generation, Cloudinary for audio storage, and Creatomate for final video rendering. The workflow segments the script into 6-second clips, creates corresponding visuals, and combines them with audio, adding smooth transitions for a polished result.

Why is this workflow useful?

Creating YouTube Shorts manually is time-consuming, requiring scriptwriting, voiceovers, and video editing. This workflow automates the entire process, enabling creators to produce high-quality, engaging Shorts in minutes. It’s ideal for content creators, marketers, or businesses looking to maintain a consistent social media presence with minimal effort.

Who is this workflow for?

What will you need to use this workflow?

How does this workflow work?

  1. Trigger: The workflow starts manually via the “Test Workflow” button.
  2. Script Generation: OpenAI (GPT-4o-mini) generates a script with an intro (40-70 chars), base (280-350 chars), and CTA (55 chars), plus a title and description with hashtags.
  3. Text-to-Speech: ElevenLabs converts the script into an MP3 audio file with timestamps.
  4. Audio Upload: The audio is uploaded to Cloudinary for storage.
  5. Script Segmentation: A Python script segments the audio into 6-second clips, creating transcription chunks.
  6. Image Prompt Generation: OpenAI generates a visual prompt for each segment in the style of CNSTLL, ensuring simple, animatable visuals.
  7. Image Generation: Replicate creates a 9:16 image for each segment based on the prompt.
  8. Video Generation: Replicate’s Minimax model generates 5-second video clips from the images.
  9. Video Compilation: Creatomate combines the video clips with the audio, adding fade transitions and a final black shape for a smooth close.
  10. Final Output: The rendered video is retrieved from Creatomate, ready for YouTube Shorts.

Setup instructions

  1. Import the Workflow: Copy the provided JSON into n8n and import it as a new workflow.
  2. Add Credentials:
    • Configure OpenAI API credentials for the “Ideator” and “Image Prompter” nodes.
    • Set up ElevenLabs API key in the “Script Generator” node.
    • Add Replicate API key for the “Request Image,” “Request Video,” and “Get Video” nodes.
    • Configure Cloudinary credentials for the “Upload to Cloudinary” node.
    • Set Creatomate API key for the “Editor” and “Get Final Video” nodes.
  3. Test the Workflow:
    • Click “Test Workflow” to run it manually.
    • Replace <user-query> in the “Ideator” node with your video topic (e.g., “Fitness tips for beginners”).
  4. Verify Outputs: Check each node’s output, ensuring audio, images, and videos are generated correctly.
  5. Customize (Optional):
    • Adjust segment duration in the “HTTP Request” node’s Python code (default: 6 seconds).
    • Modify fade duration or video resolution in the “Create Editor JSON” node.
  6. Save and Activate: Save the workflow and activate it for regular use.

Tips for getting the most out of this workflow

Troubleshooting

Built with

Example output

For a query like “Morning routine hacks”:

🔗 Nodes Used

HTTP Request, OpenAI

📥 Import

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

📖 Importing guide · 🔑 Credential setup