🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

YouTube to Google Sheets, topics emailed via Gmail

Lisa Granqvist Partner Workflow Automation Expert

You already have the best content brief sitting in plain sight. It’s in your YouTube comments. The problem is you rarely have time to read 300 of them, spot patterns, and turn that into a clean list of video ideas.

This YouTube comment automation hits content marketers first, but solo creators and small agency teams feel it too. You will go from “I think this topic might work” to five audience-driven, SEO-friendly titles landing in Gmail each week.

Below is the exact workflow: it pulls comments from your latest videos, archives them in Google Sheets, then uses an AI Agent to email you the top 5 video topics based on real viewer requests.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: YouTube to Google Sheets, topics emailed via Gmail

The Problem: Turning YouTube Comments Into Good Video Ideas

Comment mining sounds simple until you actually do it. You open YouTube Studio, jump between videos, scroll forever, copy a few quotes, then lose track of what you already checked. A week later, you repeat the whole thing because nothing is organized, and the “good insights” are stuck in a messy Notes doc. Meanwhile, you’re planning content based on vibes while your audience is literally asking you for the next video. That gap is expensive. It costs time, consistency, and momentum.

It adds up fast. Here’s where it breaks down in real life.

  • Reading and sorting comments across five videos can easily take about 2 hours, and that’s before you write titles.
  • Good requests get buried because you do not have a searchable archive of what people asked for last month.
  • Manual copy-paste introduces errors, missing context, and duplicated ideas that waste a planning session.
  • When you’re rushed, you default to generic topics, which means weaker hooks and less click-worthy packaging.

The Solution: Weekly YouTube Comment Analysis to Sheets + Gmail

This workflow runs on a schedule (every Friday by default) and quietly does the research for you. It grabs the latest five videos from a playlist you choose, then pulls up to 100 comment threads per video through the YouTube API. Those comments are saved into Google Sheets so you always have a backup and can filter or search later. Next, the workflow formats the comment digest and hands it to an AI Agent powered by OpenAI (GPT-4o-mini). The agent looks for recurring questions, pain points, and topic clusters, then produces exactly five SEO-optimized video titles. Finally, n8n sends that content plan straight to your Gmail inbox, ready to use.

The workflow starts with a weekly trigger, then moves through comment collection and archiving in Google Sheets. After that, OpenAI summarizes what viewers are actually asking for and Gmail delivers a clean “Top 5” list you can paste into your content calendar.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you publish one video a week and keep a “latest uploads” playlist. Manually reviewing five videos with about 100 comments each can take roughly 2 hours, then another 30 minutes to turn notes into decent titles. With this workflow, your work is basically picking the playlist once and skimming the email when it arrives. The run might take about 10 minutes in the background, and you get five ready-to-use titles in Gmail every Friday.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • YouTube Data API v3 to fetch playlist videos and comments.
  • Google Sheets for comment archiving and searching.
  • Gmail to receive the weekly “top 5 titles” email.
  • OpenAI API key (get it from your OpenAI dashboard API keys page).

Skill level: Beginner. You’ll mainly connect accounts, paste a Playlist ID, and select the target Google Sheet.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

A weekly schedule kicks it off. The workflow runs every Friday by default (you can change the day and time). No reminders. No “did we do the research?” meeting.

YouTube data gets collected and cleaned. n8n pulls the latest playlist items, extracts video IDs, then uses an HTTP request to fetch comment threads for each video. A code step compiles those comment records into something consistent.

Everything gets archived in Google Sheets. Each run appends rows to your chosen spreadsheet, creating a simple database of audience feedback you can filter by date, video, keyword, or theme.

OpenAI turns raw feedback into five usable titles. The AI Agent receives a formatted digest, identifies recurring themes, then the structured output parser forces a clean “exactly five titles” result.

Gmail delivers the plan. You get an email summary you can forward to a client, drop into Asana, or paste into your editorial calendar in a minute.

You can easily modify the playlist source to a different content bucket based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Trigger

Set the workflow to run on a weekly schedule and kick off the playlist retrieval sequence.

  1. Add and open Scheduled Run Trigger.
  2. Set the schedule rule to weekly with triggerAtDay set to 5 (Friday).
  3. Connect Scheduled Run Trigger to Retrieve Playlist Entries.

Step 2: Connect YouTube and Fetch Playlist Data

Pull the latest videos from a YouTube playlist and extract the video IDs needed for comment retrieval.

  1. Open Retrieve Playlist Entries and set Resource to playlistItem and Operation to getAll.
  2. Set Playlist ID to [YOUR_ID] and Limit to 5.
  3. Credential Required: Connect your youTubeOAuth2Api credentials.
  4. Open Extract Video Identifiers and keep the code as provided to output videoId and videoTitle.
  5. Verify the connection flow: Retrieve Playlist EntriesExtract Video Identifiers.

Step 3: Retrieve and Compile YouTube Comments

Query the YouTube API for comments per video and transform results into structured records.

  1. Open External API Call and set URL to https://www.googleapis.com/youtube/v3/commentThreads.
  2. Enable Send Query and add query parameters: videoId = ={{ $json.videoId }}, part = snippet, maxResults = 100.
  3. Credential Required: Connect your youTubeOAuth2Api credentials.
  4. Open Compile Comment Records and keep the JavaScript as provided to output one item per comment and reply.
  5. Confirm the flow: Extract Video IdentifiersExternal API CallCompile Comment Records.

If your playlist has more than 5 videos, increase the Limit value in Retrieve Playlist Entries to fetch more videos.

Step 4: Store Comments and Build the Digest

Append comment data to Google Sheets and format a digest string for AI analysis.

  1. Open Append Sheet Row and set Operation to append.
  2. Select the target spreadsheet using Document ID and the destination tab using Sheet Name.
  3. Credential Required: Connect your googleSheetsOAuth2Api credentials.
  4. Open Format Comment Digest and keep the code as provided to create formattedComments.
  5. Verify the flow: Compile Comment RecordsAppend Sheet RowFormat Comment Digest.

⚠️ Common Pitfall: If Format Comment Digest returns an empty array, the workflow stops. Make sure your playlist has comments available.

Step 5: Set Up the AI Analysis and Structured Output

Analyze the comment digest with an AI agent and parse the structured results.

  1. Open Content Strategy Agent and set Text to =You are a YouTube content strategist for my channel. Analyse the following comments and identify the TOP 5 most requested video topics for next week. Make each title SEO-optimized, and start with "How to". {{ $json.formattedComments }}.
  2. Ensure Prompt Type is define and Has Output Parser is enabled.
  3. Open OpenAI Chat Engine and set Model to gpt-4o-mini.
  4. Credential Required: Connect your openAiApi credentials to OpenAI Chat Engine.
  5. Open Structured Result Parser and set JSON Schema Example to { "video1": "Video 1 Title", "video2": "Video 2 Title", "video3": "Video 3 Title", "video4": "Video 4 Title", "video5": "Video 5 Title" }.
  6. Note: Structured Result Parser is an AI sub-node; credentials should be added to OpenAI Chat Engine, not the parser.
  7. Confirm the flow: Format Comment DigestContent Strategy Agent.

Step 6: Configure the Email Output

Send the AI-generated video topic recommendations via Gmail.

  1. Open Send Email Update and set Message to =Hi, <br><br> I am your AI Agent and I suggest you should create following videos as per analysis of your audience comments which I did this week. <br><br> Video 1: {{ $json.output.video1 }} <br> Video 2: {{ $json.output.video2 }} <br> Video 3: {{ $json.output.video3 }} <br> Video 4: {{ $json.output.video4 }} <br> Video 5: {{ $json.output.video5 }} <br> <br> Thanks!.
  2. Credential Required: Connect your gmailOAuth2 credentials.
  3. Confirm the final connection: Content Strategy AgentSend Email Update.

Step 7: Test & Activate Your Workflow

Run a manual test to verify data flow from YouTube to Sheets and email, then activate the schedule.

  1. Click Execute Workflow to run a manual test from Scheduled Run Trigger.
  2. Confirm Append Sheet Row adds rows to your target sheet and Send Email Update delivers the message.
  3. Verify the email contains five suggestions from {{ $json.output.video1 }} through {{ $json.output.video5 }}.
  4. Enable the workflow using the Active toggle so it runs on schedule.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google (YouTube/Sheets/Gmail) credentials can expire or need specific permissions. If things break, check the credential connection status inside n8n and confirm the YouTube Data API v3, Sheets API, and Gmail API are enabled in Google Cloud first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this YouTube comment automation automation?

About 30 minutes if your Google and OpenAI accounts are ready.

Do I need coding skills to automate YouTube comment automation?

No. You’ll connect credentials and paste your YouTube Playlist ID. The workflow’s code nodes are already built for you.

Is n8n free to use for this YouTube comment automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API usage (usually a few cents per weekly run for this size of analysis).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this YouTube comment automation workflow for a different schedule or playlist?

Yes, and it’s straightforward. Change the day/time in the Scheduled Run Trigger, then swap the Playlist ID in the “Retrieve Playlist Entries” node. You can also adjust the AI Agent prompt to make titles more educational, more “clicky,” or aligned to a client’s brand voice.

Why is my YouTube connection failing in this workflow?

Usually it’s an API permission issue in Google Cloud. Confirm YouTube Data API v3 is enabled, then re-check the OAuth scopes in your YouTube/Google credential inside n8n. If it worked once and then stopped, your token may have expired or been revoked. Rate limits can also show up when you increase the number of videos or comments pulled in a single run.

How many comments can this YouTube comment automation automation handle?

Per run, this workflow pulls up to about 500 comment threads (five videos × 100 threads each), and you can scale it up if your YouTube API quota allows it.

Is this YouTube comment automation automation better than using Zapier or Make?

Often, yes, because this is not a simple “send data from A to B” zap. You’re pulling batches of comments, transforming them, archiving them, and then forcing a structured AI output with exactly five titles, which is the kind of multi-step logic that gets awkward (and pricey) in Zapier. n8n also gives you the self-host option, which matters when you want predictable costs as you scale. That said, if all you want is “email me new comments,” Zapier or Make can be quicker. If you want help choosing, Talk to an automation expert.

Set it once, then let your audience do the planning for you. The workflow handles the repetitive digging, and you get to spend that time making better videos.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal