Create YouTube Videos Daily from Google Sheets using MagicHour + Gemini
πͺ Prompt To Video (MagicHour API) with Music & YouTube
Automate AI video creation, background music, YouTube uploads, and result logging β all from a single text prompt.
β‘ Overview
This n8n template turns a text prompt into a complete AI-generated video using the MagicHour API, adds background music, generates YouTube metadata, uploads to YouTube, and logs results in Google Sheets β all in one flow.
Perfect for creators, marketers, and startups producing YouTube content at scale β from daily AI Shorts to explainers or marketing clips.
π§© Use Cases
π₯ Daily AI-generated Shorts
π§ Product explainers
π Marketing & brand automation
π Repurpose blog posts into videos
π‘ AI storytelling or creative projects
βοΈ How It Works
Trigger when a new row is added to Google Sheets or via Chat input.
Gemini parses and normalizes the text prompt.
MagicHour API generates the AI video.
Poll until the render completes.
(Optional) Mix background audio using MediaFX.
Gemini generates YouTube title, description, and tags.
Upload the video to YouTube with metadata.
Log YouTube URL, metadata, and download link back to Google Sheets.
π§° Requirements Service Purpose MagicHour API Key Text-to-video generation Gemini API Key Prompt parsing & metadata YouTube OAuth2 Video uploads Google Sheets OAuth2 Trigger & logging (Optional) MediaFX Node Audio mixing ποΈ Google Sheets Setup Column Description Prompt Text prompt for video Background Music URL (Optional) Royalty-free track Status Tracks flow progress YouTube URL Auto-filled after upload Metadata Title, tags, and description JSON Date Generated (Optional) Auto-filled with video creation date π 100 Daily Prompts Automation
You can scale this workflow to generate one video per day from a batch of 100 prompts in Google Sheets.
Setup Steps
Add 100 prompts to your Google Sheet β one per row.
Set the Status column for each to Pending.
Use a Cron Trigger in n8n to run the workflow once daily (e.g., at 9 AM).
Each run picks one Pending prompt, generates a video, uploads to YouTube, then marks it as Done.
Continues daily until all 100 prompts are processed.
Example Cron Expression 0 9 * * *
β Runs the automation every day at 9:00 AM.
Node Sequence [Schedule Trigger (Daily)] β [Get Pending Prompt from Sheets] β [Gemini Prompt Parser] β [MagicHour Video Generation] β [Optional: MediaFX Audio Mix] β [Gemini Metadata Generator] β [YouTube Upload] β [Update Row in Sheets]
π‘ Optional Enhancements:
Add a notification node (Slack, Discord, or Email) after each upload.
Add a counter check to stop after 100 videos.
Add a βPausedβ column to skip specific rows.
π§ Gemini Integration
Gemini handles:
JSON parsing for MagicHour requests
Metadata generation (title, description, tags)
Optional creative rewriting of prompts
π§ Audio Mixing (Optional)
Install MediaFX Community Node β Settings β Community Nodes β n8n-nodes-mediafx
Use it to blend background music automatically into videos.
πͺΆ Error Handling
Avoid βContinue on Failβ in key nodes
Use IF branches for MagicHour API errors
Add retry/timeout logic for polling steps
π§± Node Naming Tips
Rename generic nodes for clarity:
Merge β Merge Video & Audio
If β Check Video Completion
HTTP Request β MagicHour API Request
π How to Use
Add MagicHour, Gemini, YouTube, and Sheets credentials
Replace background music with your own track
Use Google Sheets trigger or daily cron for automation
Videos are created, uploaded, and logged β hands-free
β οΈ Disclaimer
This template uses community nodes (MediaFX). Install and enable them manually. MagicHour API usage may incur costs based on video duration and quality.
π SEO Keywords
MagicHour API, n8n workflow, AI video generator, automated YouTube upload, Gemini metadata, AI Shorts, MediaFX, Google Sheets automation, AI marketing, content automation.
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
πΈ Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments