Automate YouTube Video Metadata with n8n & GPT-4

Struggling with manual updates on YouTube video titles, descriptions, and tags? This n8n workflow seamlessly automates fetching your latest videos, generating SEO-friendly summaries and tags using GPT-4, then updates metadata—saving hours and improving discoverability.
youTube
openAi
splitInBatches
+7
Workflow Identifier: 1949
NODES in Use: YouTube, SplitInBatches, OpenAI, Code, HTTP Request, RemoveDuplicates, If, Wait, Set, Langchain
Automate YouTube metadata with n8n and GPT-4

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow gets the newest videos from a YouTube channel.

It reads each video’s transcript and uses AI to create detailed descriptions and tags that help videos show up in searches.

It then updates the video’s metadata on YouTube automatically.

Unpublished videos get set to private and scheduled to publish on Friday at 17:00 UTC.

The main problem solved is saving creators time and reducing mistakes in video metadata editing.


Who should use this workflow

Content creators with many YouTube channels or videos can benefit.

Anyone wanting to cut down on manual title, description, and tag writing should use it.

It fits users who want better search visibility and consistent metadata updates.


Tools and services used

  • n8n: Workflow automation platform.
  • YouTube API (OAuth2): To fetch video data and update metadata.
  • Apify YouTube Transcript Scraper API: To get video transcripts.
  • OpenAI GPT-4.1-nano model: To generate video descriptions and titles.
  • Google Gemini API (optional): Used here for extra AI tag generation.

Inputs, processing steps, and output

Inputs

  • YouTube channel videos fetched via OAuth2 API node.
  • Video URLs passed to Apify transcript API with API token.

Processing steps

  • Splitting videos to process one by one.
  • Getting full video details with YouTube node.
  • Setting publish dates and privacy for unpublished videos using JavaScript in a code node.
  • Calling Apify API to get full transcript JSON data.
  • Running custom JavaScript code to join transcript text into one string.
  • Sending transcript text to OpenAI GPT-4 to create long, engaging descriptions in first-person German with hashtags and emojis.
  • Sending transcript text to LangChain agent node for German YouTube SEO tag generation.
  • Updating video’s metadata (description, tags, optional title) back on YouTube.

Output

  • Videos on YouTube with improved, AI-generated descriptions and tags.
  • Automatically scheduled publishing for private videos on Fridays 17:00 UTC.
  • Time saved from manual metadata edits.

Beginner step-by-step: How to use this workflow in n8n production

Download and import the workflow

  1. Use the Download button on this page to get the workflow file.
  2. Open the n8n editor.
  3. Click the menu, choose “Import from File”, then select the downloaded workflow JSON file.

Configure credentials

  1. Add your YouTube OAuth2 credentials in the YouTube nodes.
  2. Enter your OpenAI API Key in the OpenAI nodes.
  3. Add your Apify API token in the HTTP Request node “Get Transcript” query parameters.
  4. Provide Google Gemini API credentials in the relevant node if you want extra tag generation.

Check video IDs and URLs

  1. Confirm the YouTube channel linked is correct in the YouTube nodes.
  2. If needed, update video or channel IDs in code or node parameters.

Test and activate

  1. Run the workflow manually using the manual trigger node by clicking “Test workflow”.
  2. Check outputs for transcript, description, and tag generation.
  3. Once working, activate the workflow in n8n to run regularly or on schedule.

For advanced hosting options, consider self-host n8n.


Common problems and failures

Sometimes YouTube API calls fail due to missing or expired OAuth tokens.

Check and refresh YouTube OAuth2 credentials inside n8n.

If transcripts come back empty or broken, the video may be private or the token for Apify may be invalid.

Make sure videos are public or unlisted and tokens have correct access.

OpenAI nodes can fail if the prompt has errors or API key limits are reached.

Fix prompt placeholders and verify API quota for OpenAI keys.


Ideas for customization

  • Turn on automatic AI title creation by enabling the OpenAI “YT Title” node.
  • Replace the Apify transcript API URL and token with other transcript services if preferred.
  • Change the JavaScript scheduling code to publish videos on different days or times.
  • Modify the “YT Tags” node’s AI prompt to add multilingual tags or niche keywords.

Summary of benefits

✓ Saves time by automating metadata writing from video transcripts.

✓ Improves YouTube SEO with AI-generated descriptions and tags in German.

✓ Reduces errors and keeps video metadata consistent.

✓ Schedules private videos to publish automatically on Fridays at 17:00 UTC.

→ You get faster uploads with better chances to reach the right audience.


Example OpenAI prompt for description generation

The workflow uses a GPT-4.1-nano prompt like this:

Du bist ein professioneller Texteschreiber.
Schreibe eine ausführlichere Zusammenfassung des Videos aus dem folgenden Transkript.
Benutze die Ich-Form, keinen Passiv.
Füge relevante Hashtags und Emojis ein.
Der Text soll auf Deutsch sein.

This guides the AI to write in first-person German with SEO tags.


Automate YouTube metadata with n8n and GPT-4

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Yes, by replacing the HTTP Request node URL and API token, other transcript services can be used if the input and output format stays the same.
No, it uses the GPT-4.1-nano model and creates short but detailed descriptions and tags to reduce token usage.
Refresh YouTube OAuth2 credentials in n8n by re-authenticating and ensuring proper token scopes.
Yes, API keys and credentials stay inside the n8n environment without external sharing.
Author
Written By
Ritu Sanjali

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.