ChatGPTCreativeVideoAI score · 74/100AI-assisted edit · no obvious prompt-injection riskn8n.io

n8n Auto-Generate YouTube Video SEO Tags with GPT and Slack Notifications

Weekly scheduled fetch of new channel videos → AI analyzes titles and descriptions to generate 15–20 SEO tags → auto-write back to YouTube and notify team via Slack

Some experienceStepsWorkflowPromptTip
Who
YouTube creators, channel admins, marketing teams, and agencies managing multiple channels that publish regularly
You get
Automatically generate and apply SEO-friendly tags to improve discoverability, with Slack team notifications
You need
n8n · slack

Constraints

Prerequisites: accessible n8n instance; Google Cloud project with YouTube Data API v3 enabled; Slack workspace and Bot Token; OpenAI API key. Required credentials: openAiApi, youTubeOAuth2Api, slackOAuth2Api. Optional: telegramApi (Telegram node currently disabled). Note: the template's 'Get all videos uploaded last week' node has publishedAfter set to {{ $today.minus(1,'days') }} (1 day), which differs from the described 'past 7 days'; the Update video node hardcodes categoryId=28 and regionCode=VN.

What they did

Template author trungtran built an n8n workflow that automatically fetches new videos from a specified YouTube channel on a weekly schedule, generates 15–20 SEO tags by analyzing each video's title, description, and channel name via an OpenAI GPT model, writes the tags back to the video metadata through the YouTube Data API, and sends a confirmation message to Slack with the video title, ID, and applied tags.

How it went

Published as an official n8n template (n8n_id=7881), the template had 864 views at time of collection (author_report). No specific channel growth metrics or A/B test results are provided by the source.

Worth knowing

1. The 'Get all videos uploaded last week' node has publishedAfter set to {{ $today.minus(1,'days') }} (1 day), which differs from the 'past 7 days' description; adjust as needed for your use case. 2. The Update video node hardcodes categoryId=28 (Science & Technology) and regionCode=VN; change these for non-Vietnam channels. 3. The Telegram node (Alternative channel to inform) is currently disabled=true and serves as an optional fallback notification channel requiring telegramApi credentials. 4. YouTube tag updates are write operations that consume API quota; the source recommends avoiding re-writing unchanged tags and adding throttling (1–2 sec/item) for bulk processing. 5. The source recommends adding safety guardrails: split Agent output by comma, trim, deduplicate, drop empty/over-long tags, and maintain an allow/deny list for brand terms.

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

  • OpenAI Chat Model node: connect OpenAI API credentials.
  • Get all videos uploaded last week node: connect YouTube OAuth2 credentials.
  • Get video detail node: connect YouTube OAuth2 credentials.
  • Update video with AI generated tags node: connect YouTube OAuth2 credentials.
  • Inform via slack message node: connect Slack OAuth2 credentials.
  • Alternative channel to inform node: connect Telegram API credentials.

Configuration to replace

  • Source template is n8n public workflow #7881 (~19 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 credentials and channel information

    Set up three credentials in n8n: 1) YouTube OAuth2: create a Google Cloud project, enable YouTube Data API v3, configure an OAuth client, authorize with the Google account managing the channel, add the credential with scopes youtube.readonly and youtube/youtube.force-ssl. 2) Slack OAuth2: create or reuse a Slack App, install to workspace, capture the Bot Token, add slackOAuth2Api credential with chat:write scope. 3) OpenAI API: add openAiApi credential. Then set the channel ID in the Set Channel Information node (field name: Channel_Id).

  2. Set up schedule trigger and video fetch

    Configure Weekly Schedule Trigger: select day/time for weekly runs (e.g., Mondays at 09:00). Configure 'Get all videos uploaded last week' node: resource=video, returnAll=true, filters.channelId mapped to {{ $json.Channel_Id }}, filters.publishedAfter currently set to {{ $today.minus(1,'days') }} (as in source template; adjust to 7 days if needed), options.order=date.

  3. Fetch video details and feed to AI Agent

    'Get video detail' node: resource=video, operation=get, videoId mapped to {{ $json.id.videoId }} (from previous video list). This node outputs snippet.title, snippet.description, snippet.channelTitle, which flow via main connection to the Youtube Video Auto Tagging Agent.

  4. AI generates SEO tags

    Youtube Video Auto Tagging Agent node uses OpenAI Chat Model (model options: gpt-4.1-mini / gpt-4.1 / gpt-4). This is an Agent node (typeVersion=2.1) with promptType=define. Map video detail fields to prompt variables: snippet.title → video title, snippet.description → video description, snippet.channelTitle → channel name.

    Execution prompt · Source text。Youtube Video Auto Tagging Agent node Options > System Message field

    You are an expert YouTube SEO strategist. 
    Your goal is to generate a list of highly relevant, diverse, and SEO-friendly tags for a YouTube video based on its title, description, and channel name. 
    The tags should:
    - Improve discoverability and ranking on YouTube search and recommendations
    - Cover both specific keywords (directly related to the video) and broader categories (general niche)
    - Include variations (short-tail and long-tail keywords)
    - Avoid duplicates, irrelevant terms, or hashtags (#)
    - Be limited to 15–20 tags, formatted as a clean comma-separated list
    - Prioritize high-search-intent keywords that align with the channel’s theme

    Execution prompt · Source text。Youtube Video Auto Tagging Agent node Text field (User Prompt)

    =Here is my YouTube video information:
    
    Title: {{ $json.snippet.title }}
    Description: {{ $json.snippet.description }}
    Channel Name: {{ $json.snippet.channelTitle }}
    
    Please analyze this information and provide me with the most relevant and SEO-friendly tags (15–20, comma-separated). 
    Focus on tags that increase reach, match viewer search intent, and balance between trending keywords and niche keywords.
  5. Write tags back to YouTube and send Slack notification

    'Update video with AI generated tags' node: resource=video, operation=update, videoId mapped to {{ $('Get video detail').item.json.id }}, title preserved from original, updateFields.tags mapped to {{ $json.output }} (tag string from Agent), updateFields.description preserved from original. Note hardcoded categoryId=28 and regionCode=VN; modify as needed. Then 'Inform via slack message' node sends confirmation.

    Execution prompt · Source text。Inform via slack message node Text field

    =The video ”{{ $json.snippet.title }} - {{ $json.id }}” has been auto-tagged successfully with the following tags: {{ $('Youtube Video Auto Tagging Agent').item.json.output }}

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant; confirm inputs and permissions first, then guide node configuration and prompt placement

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

You are an n8n workflow setup assistant. The user wants to replicate the 'Auto-Generate YouTube Video SEO Tags with GPT and Slack Notifications' template. First confirm they have: 1) access to an n8n instance; 2) a Google Cloud project with YouTube Data API v3 enabled; 3) Slack workspace admin rights to create an App; 4) an OpenAI API key. Then guide them through credential setup, node parameter mapping, prompt placement, and remind them to check the publishedAfter date range and regionCode settings.

Before using this starter prompt, prepare your YouTube channel ID, Google Cloud OAuth client credentials, Slack Bot Token, and OpenAI API key.

Source

Automate YouTube video SEO tagging with GPT and Slack notifications · trungtran · n8n.io · 2025-08-26

Comments & feedback

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

Loading…

    Related