Skip to main content

Create YouTube videos daily from Google Sheets using MagicHour + Gemini

Workflow preview

Workflow preview
100%
Create YouTube videos daily from Google Sheets using MagicHour + Gemini preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 templa...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googlesheetstrigger, @n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Divyansh Chauhan.

Original n8n.io source

1.1 Workflow description

Title
Create YouTube videos daily from Google Sheets using MagicHour + Gemini
Workflow name
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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sheet Row Added

Type / Role
n8n-nodes-base.googleSheetsTrigger - googleSheetsTrigger
Config choices
Version 1

Block 2 - Chat Input

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 3 - Normalize Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Generate Video Parameters

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 5 - Video Params Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 6 - Create Video

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - Initialize Retry Counter

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Check Video Status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Video Complete?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Wait & Retry

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 11 - Download Video

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Prepare Metadata

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Generate YouTube Data

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 14 - YouTube JSON Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 15 - Prepare Sheet Update

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 16 - Update Results

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 17 - Gemini AI Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 18 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 19 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 20 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - Limit

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 23 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 24 - Upload a video

Type / Role
n8n-nodes-base.youTube - youTube
Config choices
Version 1

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Create YouTube videos daily from Google Sheets using MagicHour + Gemini
Complexity advanced
Nodes 31
Categories Content Creation, Multimodal AI
Author Divyansh Chauhan
Published 17 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9843/9843.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Create YouTube videos daily from Google Sheets using MagicHour + Gemini do?

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 templa...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.