RecipeAgents / Recipes / Content
Content recipeYouTube → Google Docs: blog draft with Gemini
You made the video; the blog post that should go with it never gets written. Paste the link of a public YouTube video into a form and Gemini watches the video itself (picture and sound) and writes a first blog draft into a new Google Doc: a title, a meta description, the draft, and a list of the claims and numbers to check, each with the minute it comes up. No yt-dlp, no transcript API, no YouTube API key. In our study of 13,574 public n8n templates (snapshot 2026-10-20), 40 have YouTube plus blog, article or post in their name (some of those are social posts). 36 (90.0%) have an AI step and 33 (82.5%) make an HTTP Request call, mostly to a transcript or download service; 21 (52.5%) use OpenAI and only 6 (15.0%) use Gemini, the one model family that can take a YouTube link directly. None has an error workflow trigger.
| Input | The link to one public YouTube video (yours, or one you have the rights to), plus optional notes for the draft |
| Tools | n8n (Form Trigger, Code, HTTP Request, Google Docs), Gemini API (Gemini 3.5 Flash-Lite) |
| Time | Setup about 30 minutes, most of it the Google Docs credential (our estimate). Each run takes a minute or two for a 15-minute video. |
| Cost | Google’s video understanding docs (read 2026-11-01) say the YouTube URL feature “is in preview and is available at no charge”, and that pricing and rate limits are likely to change. The free tier allows no more than 8 hours of YouTube video a day. If it starts being billed like other video input: Gemini 3.5 Flash-Lite costs $0.30 per million input tokens and $2.50 per million output tokens on the paid tier (Gemini API pricing, read 2026-11-01), and the docs count about 100 tokens per second of video at the default media resolution. Our arithmetic: a 15-minute video is about 90,000 input tokens ($0.027) plus about 2,000 output tokens for the draft ($0.005), so about 3 cents a video, or about 25 cents for 8 videos a month. On the free tier Google says it may use your prompts to improve its products. On n8n Cloud each form submission is one execution. |
n8n nodes in this workflow: n8n Form Trigger, Code, HTTP Request. Each links to usage data and known problems in our n8n node library.
Download it
- n8n workflow (.json)Import in n8n: Workflows → Import from file. Then connect your credentials.
- Zapier blueprint (.md)Step-by-step rebuild guide. Zapier has no public import format, so this isn't one-click.
- Open the Zap editorCreate a new Zap and follow the blueprint.
The n8n file has six nodes (Form Trigger, a Code node that checks the link, an HTTP Request to Gemini, a Code node that reads the answer, and Google Docs create and insert) plus a read-me note. We check that its JSON structure is valid, but we haven't run every file in a live n8n instance, so test it with sample data before you switch it on. All 26 files, the logins each needs and how to fix common import errors are on our n8n templates page. Not sure which tool to run it on? See what this kind of recipe costs in n8n vs Zapier or n8n vs Make. On n8n Cloud the trigger's poll interval matters more than the node count: n8n pricing works through it.
Steps
- Create a Gemini API key in Google AI Studio (aistudio.google.com → Get API key). In n8n add it as a <b>Google Gemini(PaLM) API</b> credential; the HTTP Request node in our file uses that credential, which sends the key for you.
- Connect a <b>Google Docs</b> credential in n8n (OAuth2). It asks for Docs and Drive access, because a new Doc is created through the Drive API.
- Form Trigger: our file has two fields, YouTube URL (required) and Notes for the draft (optional: audience, keyword, length). Open the form's test URL to try it.
- Code node “Check URL”: turns youtu.be, /shorts/, /live/ and normal watch links into one clean watch URL, and stops with a clear message if the link isn't a YouTube video.
- HTTP Request “Gemini: watch and draft”: a POST to Gemini's generateContent endpoint for gemini-3.5-flash-lite, with the video link as <code>fileData.fileUri</code>, the prompt below as text, JSON output and an 8,192-token output limit. The timeout is set to 5 minutes, because a long video takes a while.
- Code node “Read the answer”: stops with the reason if Gemini cut the answer short (MAX_TOKENS) or refused it (SAFETY, RECITATION), parses the JSON and lays out the Doc text, including the number of tokens the video used.
- Google Docs → Create: pick the Drive folder; the title is the draft title. Then Google Docs → Update → Insert text at the end of the body.
- Paste one of your own videos into the form and read the draft next to the video. Check every line in the “check before publishing” list, then activate the workflow.
The prompt
You are an editor turning a YouTube video into a first blog draft for the video's own creator. Watch the whole video, picture and sound.
Notes from the creator (may be empty): {{notes}}
Return JSON only, with these keys:
title: a blog title under 60 characters that says what the reader gets
meta_description: 120 to 155 characters
draft: the post in plain text, 600 to 1,000 words. Start with a 2-sentence answer to the video's main question. Put each section heading on its own line in Title Case, with no # or * symbols. Use the speaker's own points and examples, in your own words: do not copy long passages word for word. Mention things shown on screen (slides, code, products) only when they matter.
check_these: a list of objects with timestamp (MM:SS) and claim, for every number, price, date, name and factual claim in the draft, so a person can check them against the video.
Use only what is in the video and the notes. If something is unclear (a name you couldn't hear, a number that went by fast), say so in check_these instead of guessing.Sample run
YouTube URL: https://youtu.be/VIDEO_ID (a 12-minute video: how to price a freelance design project) Notes: audience is new freelancers, keep it practical Invented for illustration.
Title: How to Price Your First Freelance Design Project Meta description: A simple way to price freelance design work: estimate hours, add a buffer, quote a fixed fee, and know when to say no. From our video. Price the project, not the hour: estimate the hours, multiply by the rate you need, add a buffer for revisions, and quote one fixed fee... CHECK BEFORE PUBLISHING - [02:14] Suggested starting rate: 40 an hour - [06:50] Two rounds of revisions included in the fee - [09:31] The speaker's client name (unclear in the audio) Invented for illustration.
Where it breaks
- The Gemini node uploads a web page, not the video. n8n’s own Google Gemini node has a Video → Analyze operation with a Video URL(s) field, and it looks like the obvious choice. In the source of @n8n/n8n-nodes-langchain 2.45.6 that we read, the node downloads each URL with a plain GET and re-uploads what it got to Gemini’s Files API. Only links on generativelanguage.googleapis.com are passed through as they are. A YouTube watch link downloads the HTML page, so Gemini never sees the video. That is why our file calls the API with an HTTP Request node and passes the YouTube link as fileData. The same operation also caps the answer at 300 tokens by default, too short for a blog draft.
- Private and unlisted videos fail. The docs say the API only takes public videos, not private or unlisted ones. Make the video public first, or upload the file through the Files API instead.
- 8 hours a day on the free tier. The free tier stops at 8 hours of YouTube video a day; the paid tier has no length limit. Up to 10 videos per request work on Gemini 2.5 and later models, but this workflow sends one.
- Long videos run out of room. Google says a model with a 1M-token context window can take about 3 hours of video at the default low media resolution, or 1 hour at high resolution. For long recordings, Google’s docs point to an agentic video mode that uses up to 88% fewer tokens, which needs the newer Interactions API rather than this generateContent call.
- The draft stops mid-sentence. If the answer hits the output limit, Gemini returns finishReason MAX_TOKENS and the JSON is cut off. Our “Read the answer” node stops with that message instead of writing half a draft; raise maxOutputTokens in the HTTP Request body.
- RECITATION: the answer is blocked. The API reference lists RECITATION as a finish reason when an answer is flagged for reciting content. A word-for-word transcript of someone’s video is the likely trigger, which is why the prompt asks for the speaker’s points in new words. Only run videos you made or have the rights to repurpose.
- Headings come out as plain lines. n8n’s Google Docs node inserts plain text (n8n-nodes-base source), so Markdown would show up as # and ** in the Doc. The prompt asks for plain headings on their own line; apply Heading 2 in Docs, or paste the text into your CMS.
- Timestamps and names are guesses until you check. The model reads sampled frames (1 per second by default) and the audio, so a name it can’t hear or a number on a slide that flashes by can come out wrong. That is what the check list with MM:SS times is for: check each line before you publish.
- Anything customer-facing or money-related. Keep a human approval step until you've watched a few dozen runs and trust it.
Use Claude or ChatGPT instead, or build it in Zapier
- Claude or ChatGPT: neither takes a YouTube link as video input, so you first need the words. Get a transcript some other way (for your own videos, YouTube Studio lets you download the captions), add a step that reads it, and send the text to the model with the same prompt. That is the route most of the 40 public templates in our count take, with a transcript or download service called over HTTP.
- Zapier: trigger on a Zapier Forms or Google Sheets new row with the link, then Webhooks by Zapier, Custom Request: POST to the same generateContent URL with your key in an
x-goog-api-keyheader and the same JSON body. Then Google Docs, Create Document from Text. Webhooks by Zapier is a Premium app, so it needs a paid Zapier plan.
Tool names and pricing change often, so check each tool's current docs before you build. Times on this page are estimates, not measurements.
More content recipes
- One blog post → one LinkedIn post
- Show notes from a podcast transcript
- Weekly link roundup from your saved bookmarks
- Alt text for every image you upload
All collections · Full inbox-triage walkthrough
New to building agents? Plan this one first with the YouTube to blog post agent spec sheet on PlainAgent, our sister site with plain-English guides. Not sure which AI model to use? See the writing and chat assistant ranking on TaskRank.