GeminiCreativeVideoAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

YouTube Video to Blog Post: Gemini AI Transcription

YouTube link → download audio → Gemini transcribe → AI generates structured blog → output JSON

Some experienceStepsWorkflowPromptTip
Who
Content creators, marketers, educators, bloggers
You get
Automatically convert any YouTube video into a blog post with title, description, category, tags, and full transcript
You need
n8n · yt-dlp

Constraints

Requires a self-hosted n8n instance with yt-dlp installed, plus a Google Gemini API key (googlePalmApi credential type). Trigger via POST webhook with a YouTube URL. The workflow downloads audio, transcribes it, generates blog content, and returns or forwards structured JSON to a configured endpoint.

What they did

Author attakhalighi published this workflow template on the n8n official template library. It demonstrates how to pass a YouTube video URL via webhook, automatically download audio, transcribe with Gemini 1.5 Flash, generate a blog post with a fixed JSON Schema via AI Agent, and return results via webhook.

How it went

The author reports that the template can convert video content into publish-ready blog posts within minutes, preserving the original video language (author_report). The template is officially listed on n8n.io.

Worth knowing

1) yt-dlp must be installed on the server hosting n8n; cloud-hosted n8n may lack shell access. 2) Uses googlePalmApi credential type for Gemini, not the standard Gemini API credential name. 3) The AI Agent systemMessage enforces JSON markdown code block output; Structured Output Parser uses autoFix and provides jsonSchemaExample as a format reference. 4) Output language follows the input transcript language, not fixed English. 5) The output webhook must be configured to your actual CMS or receiver. 6) Webhook path is 57fddbda-a118-4546-a223-8e91a7d53ff6 with responseMode=responseNode. 7) In the Set node, videoUrl is taken from body.url, not body.videoUrl. 8) This site has not tested execution; verify yt-dlp availability and API quota before running.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Google Gemini Chat Model node: connect Google Gemini/PaLM API credentials.
  • Transcribe a recording node: connect Google Gemini/PaLM API credentials.

Configuration to replace

  • Source template is n8n public workflow #8037 (~12 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-24

Steps

  1. Configure webhook trigger to receive YouTube URL

    Set up a Webhook node in n8n with method POST, path 57fddbda-a118-4546-a223-8e91a7d53ff6, and responseMode set to responseNode. The caller sends a JSON body: {"videoUrl": "https://www.youtube.com/watch?v=..."}. The workflow starts from this node.

  2. Generate timestamp

    Use a Set node to generate the current Unix timestamp (now_unix = {{ new Date().getTime() }}) for unique audio file naming in subsequent steps.

  3. Download YouTube audio

    Use an Execute Command node to run yt-dlp, extracting audio to MP3. The command references the upstream videoUrl and timestamp. Ensure yt-dlp is installed on the n8n host.

    Execution prompt · Source text。Execute Command node Command field

    =yt-dlp -x --audio-format mp3 -o output-{{ $json.now_unix }}.mp3 '{{ $('Get Youtube Url').item.json.body.videoUrl }}'
  4. Read MP3 binary file

    Use a Read/Write Files from Disk node to read the generated MP3 file (file selector: =output-{{ $('Get Time').item.json.now_unix }}.mp3) as binary data, passing it to the transcription node.

  5. Transcribe audio with Gemini

    Use a Google Gemini node (models/gemini-1.5-flash) with binary audio input to transcribe speech to text. Requires googlePalmApi credentials, resource set to audio, inputType set to binary.

  6. AI Agent generates structured blog post

    The AI Agent node receives the transcript and generates a blog post via Google Gemini Chat Model with Structured Output Parser enforcing a fixed JSON Schema. The Structured Output Parser has autoFix enabled and provides jsonSchemaExample as a format reference. Includes both user prompt and system prompt.

    Execution prompt · Source text。AI Agent node Text / User Message field

    =Please create a blog post from the following video transcript. Identify the key themes, structure the content logically, and generate a title, category, and tags.
    
    Transcript:
    {{ $json.content.parts[0].text }}

    Execution prompt · Source text。AI Agent node Options > System Message field

    =You are an expert content strategist and editor. Your task is to transform a raw video transcript into a well-structured and engaging blog post.
    
    You must adhere to the following rules:
    1.  Your entire response must be a single JSON object enclosed in a markdown code block (```json ... ```).
    2.  Do NOT include any introductory phrases, explanations, apologies, or any text whatsoever outside of the JSON markdown block.
    3.  The tone should be informative, clear, and engaging, transforming the conversational transcript into polished written content.
    4.  The language of all generated text in the output JSON must match the primary language of the input transcript.
    5.  The JSON object must have this exact structure:
    {
      "category": "A single, top-level category based on the content.",
      "tags": [
        "An array of 3 to 5 relevant, lowercase string tags."
      ],
      "title": "A creative, compelling title for the blog post.",
      "short_description": "A concise, one-to-two sentence summary of the blog post, optimized for search engines (around 150-160 characters).",
      "body": "The full blog post content formatted in HTML, including <h1>, <h2>, and <p> tags."
    }
  7. Merge video URL and full transcript

    Use a Set node to append the original YouTube URL (videoUrl = {{ $('Get Youtube Url').item.json.body.url }}) and full transcript text (fulltext = {{ $('Transcribe a recording').item.json.content.parts[0].text }}) to the AI Agent output, enriching the final payload. includeOtherFields is set to true to preserve upstream fields.

  8. Return blog post JSON

    Use a Respond to Webhook node to return the final structured JSON (blog post, category, tags, transcript, original video link) to the caller, or forward it to a configured CMS/database endpoint.

Prompt you can copy

Setup guidance · Editorial suggestion。交给搭建助手,先确认输入和权限

This block is the prompt. Ads are never placed here.

You are an n8n workflow setup assistant. The user wants to replicate the "YouTube video to blog post" template. First confirm: 1) whether the user has shell access to their n8n instance to install yt-dlp; 2) whether they have a Google Gemini API key; 3) their target output endpoint (CMS, Notion, Slack, or other webhook). Then guide them to import the workflow JSON or build nodes manually, replacing credentials and the output endpoint.

Confirm yt-dlp installation, Gemini API key, and output endpoint before importing or manual setup

Source

Automated YouTube video to blog post conversion with Gemini AI transcription · attakhalighi · n8n.io · 2025-08-29

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related