Skip to content
AI Automations

n8n YouTube Shorts generator: the workflow, the prompts and the JSON

An n8n workflow that turns one row in a Google Sheet into a 15-second first-person YouTube Short: three AI-written scenes, Flux images, Kling clips, ElevenLabs sound, a Creatomate render and a private upload.

The n8n canvas for the YouTube Shorts generator in four labelled groups: pick the next idea from a Google Sheet, make each scene one at a time with image, video and sound polling loops, render the Short in Creatomate, then upload privately to YouTube and email the result.

An n8n YouTube Shorts generator is a workflow that takes an idea from a list, writes a short story around it, generates the pictures, motion and sound, and stitches them into a vertical video ready for YouTube. Ours makes 15-second first-person clips, the "POV: you are..." format, from one row in a Google Sheet. It uploads every video as private, so a person still decides what goes public.

Below is the whole build, node by node, with the free JSON at the top. We also explain why it checks on each job instead of waiting a set number of minutes, and what we changed from the version we started with.

What does the n8n YouTube Shorts generator do?

It turns one idea into one finished Short, once a day. The canvas has four groups.

The first runs at 9am. It opens a Google Sheet and takes the first row whose productionStatus is todo. That row holds the idea, the visual style, the YouTube title and the caption.

The second group is where the work happens. An AI chain turns the idea into three short beats, a bit like a storyboard with three frames. The workflow then takes those beats one at a time. For each beat it writes a detailed image prompt, generates a still with Flux, animates the still into a 5-second clip with Kling, and makes a matching sound effect with ElevenLabs.

The third group sends all three scenes to a Creatomate template, which places the clips, the audio and a caption for each beat, and renders the final video.

The last group downloads that render, uploads it to YouTube as private, updates the sheet and emails you a link so you can watch it before anyone else does.

Download the n8n workflow JSON

The download is the full workflow, cleaned up for sharing. It has every node, the notes that label each group and both prompts in full.

Download the n8n YouTube Shorts generator workflow (JSON)

To set it up:

  • In n8n, go to Workflows, choose Import from File and pick the JSON.
  • Connect Google Sheets, Google Drive, YouTube and Gmail through their usual OAuth credentials, and add an OpenAI credential for the two AI steps.
  • Create three Header Auth credentials for the HTTP Request nodes. PiAPI uses the header x-api-key, ElevenLabs uses xi-api-key, and Creatomate uses Authorization with the value Bearer followed by your key.
  • Replace the four placeholders: YOUR_SHEET_ID in the four Google Sheets nodes, YOUR_FOLDER_ID in Save Sound, YOUR_CREATOMATE_TEMPLATE_ID in Start Render, and you@example.com in the two emails.
  • Run it once by hand with a single test row before you let the schedule take over.

There are no keys in the file. We mention it because the export we started from had three live API keys typed straight into HTTP header fields. n8n saves whatever you type into a node, so it's worth opening any workflow JSON in a text editor before you send it to anyone.

What did we change from the original workflow?

The overall shape comes from an n8n course we worked through: a sheet of ideas feeding images, clips, sound and a template render. We rebuilt it as our own. The prompts are new, and the plumbing is different in seven places.

  • It checks each job's status instead of sleeping. The original paused for a fixed 3 minutes after each image, 8 after each clip and 2 after the render. If a job ran long, the next step read an unfinished result. If it finished early, the run sat there doing nothing.
  • It makes one scene at a time. The original pushed all three scenes through together and matched them up by position at the end, which only holds if nothing finishes out of order.
  • Each scene gets its own sound. The original generated all three sound effects from the first scene's prompt, so a scene in the rain could end up with the crackle of a campfire.
  • Request bodies are built with JSON.stringify. The original pasted prompts into a hand-written JSON string, so a single quotation mark in a prompt broke the request. That's probably why its prompt banned quotation marks outright.
  • The sound file gets shared before Creatomate fetches it. Files uploaded to Google Drive are private by default, and a private link returns a sign-in page instead of audio.
  • The clip URL is read from where current Kling responses put it, with fallbacks. The original read a field PiAPI no longer fills for every Kling model.
  • A failed upload now reports as a failure. The original compared the upload id to the text "undefined", and its failure email went out with the subject "Youtube Video was published".

How should the Google Sheet be set up?

Use one row per video, with nine columns: id, title, idea, caption, style, productionStatus, publishStatus, videoLink and postedToYouTube.

You fill in the first five. The idea is a phrase like "night shift in a lighthouse during a storm". The style is the look you want across the whole video, something like "35mm film, cold blue light, heavy rain". The title and caption become the YouTube title and description.

The workflow fills in the rest. productionStatus moves from todo to rendered to complete, videoLink holds the Creatomate render, and publishStatus records whether the upload worked.

If an image, clip or render fails, the row stays todo and tomorrow's run tries it again, so fix whatever broke first. If only the upload fails, the row is already marked rendered and won't be remade. The failure email gives you the finished file so you can upload it by hand.

Why write the scenes before the image prompts?

Because a model writing three long image prompts in one go tends to lose the story. By the third prompt it's describing a nice picture, not an ending.

So the job is split in two. The scene writer only writes the story: three beats of five to ten words, each one a single physical action, with a setup, a moment where things get worse, and a payoff. The image prompt step then expands one beat at a time. It puts the viewer's hands in the lower third of the frame and describes the place behind them.

Both prompts avoid things video models still draw badly. The scene writer skips close-ups of feet and anything about getting dressed. The image prompt asks for hands in the middle of an action, since a hand gripping a railing reads as first person straight away, and it keeps real people, brands and logos out.

Why does the workflow make one scene at a time?

A Loop Over Items node hands the three beats through the scene steps one by one. Each beat goes all the way from prompt to shared sound file before the next one starts, and the Collect Scene node keeps its clip URL, sound URL and caption. Once all three are done, the loop passes them on together to Build Render.

It's slower. Three scenes in a row take roughly three times as long as three running side by side. We think that's the right trade for a job that runs once a day. When something fails, the execution shows you exactly which beat, which service and what came back, and that's worth more than a few saved minutes.

How does the workflow know when a video is ready?

It asks. Image generation, video generation and rendering all work the same way: you submit a job, you get an id back, and the result turns up later. How much later depends on the queue, the model and the time of day.

Each of the three jobs runs a small loop. Start the job, wait a few seconds, check its status, then branch. If it's finished, carry on. If it has failed, stop the run and keep the provider's error message. If it's still going, wait and check again. PiAPI reports completed or failed in data.status. Creatomate reports succeeded or failed in status.

A job that never finishes and never fails would loop forever, so the workflow settings include a one-hour execution timeout. A normal run ends well before that.

How do you build the Creatomate template?

Make a vertical template, 1080 by 1920, with three five-second scenes and nine named elements: Video-1, Video-2, Video-3, Audio-1, Audio-2, Audio-3, Text-1, Text-2 and Text-3.

Build Render collects the three scenes into one set of changes, and Start Render sends them to Creatomate along with your template id. The template decides everything visual, from where the captions sit to how one scene cuts to the next. If you rename an element in Creatomate, rename it in the Build Render code as well, or that scene comes out blank.

Why the videos upload as private

Two reasons, and either one would be enough.

The first is quality. Some renders will have a hand with six fingers, or a middle scene that doesn't follow from the first. You want to catch those before your subscribers do.

The second is YouTube's own rule. According to the YouTube Data API documentation, videos uploaded through the API from unverified projects created after 28 July 2020 are restricted to private until the project passes an audit. If your Google Cloud project is new, your uploads will be private whatever the node says.

When an upload does fail, the YouTube node carries on instead of stopping the run. The sheet records the failure and the email says so, with a link to the rendered file.

What does each Short cost to make?

Each video uses three images, three 5-second clips, three sound effects, four language model calls and one render. The clips cost the most by a long way, and they're the only step where changing a setting really moves the bill. The workflow uses Kling's standard mode. Prices change often, so check PiAPI, ElevenLabs and Creatomate's current rates against the number of Shorts you plan to make before you switch the schedule on.

Will AI-generated Shorts actually go viral?

Some will, most won't, and the workflow can't tell you which. What it does is take away the production grind. First-person clips grab attention fast and 15 seconds is short enough to watch twice, but the idea still has to be good.

That's why we'd spend your time on the sheet. Ten sharp ideas with a consistent style will do more for a channel than a hundred generic ones. Reviewing each video before it goes public is how you keep the strange renders off it. Our n8n LinkedIn post generator works on the same principle for text posts: the machine drafts, and a person decides what gets published.

If you'd rather have a pipeline like this built around your own channel or process, that's the work our AI automation service covers.

Common questions

Is the n8n workflow template free to download?

Yes. The JSON is free, there's no form in front of it, and there are no keys or credentials inside. Import it, connect your own accounts and change whatever you like.

Which AI models does the workflow use?

GPT-4o writes the three beats and expands each one into an image prompt. Flux dev, through PiAPI, makes the stills at 540 by 960. Kling, also through PiAPI, turns each still into a 5-second clip, and ElevenLabs makes the sound effects. You can swap any of them in the node settings.

Can n8n upload to YouTube automatically?

Yes. The YouTube node uploads videos through an OAuth credential, as public, unlisted or private. We upload as private and review first. If your Google Cloud project is new and hasn't been audited, YouTube keeps API uploads private anyway.

Do I need a Creatomate account?

You need Creatomate or some other way to stitch the clips together. The workflow sends Creatomate three clips, three sound files and three captions, and your template decides how they're laid out. Without a template, Start Render has nothing to fill in.

What happens if a step fails halfway through a run?

The run stops at the step that failed and keeps the provider's error message, and the sheet row stays marked todo. Open the execution in n8n to see which scene and which service failed. Once you've fixed it, the next scheduled run picks the row up again.

Can I make more than one Short a day?

Yes. Change the schedule trigger, or duplicate it at different times. Each run takes one todo row, so you'll need more ideas in the sheet and more generation credit. YouTube also caps API uploads per day, so check your quota if you plan to post a lot.

1Downloads

Take it with you.

2Keep reading

More from the studio.

Ready to build something that pays for itself?

Tell us what you need and get a written scope, timeline and fixed quote within 48 hours of a free 30-minute call, whether you work with us or not.

Replies within 24 hours · NDA on request · No commitment