YouTube to Gmail, comment insights sent ready to share
You open YouTube Studio to “quickly” check comments, and suddenly it’s been an hour. You scroll, you spot a few patterns, then you lose them again because there’s no clean way to summarize what people are actually saying.
This YouTube comment insights automation hits content creators first, honestly. But a marketing manager reporting on campaigns and an agency lead juggling client channels feel the same pain: too much raw feedback, not enough clarity. The outcome is simple. You get a share-ready email summary with sentiment, themes, questions, and next actions.
You’ll learn what the workflow does, what you need to run it, and how to adapt it so your team gets insights without living in the comments tab.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: YouTube to Gmail, comment insights sent ready to share
flowchart LR
subgraph sg0["Pick Video Ids from Google sheet Flow"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Limit", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "AI Agent", pos: "b", h: 48 }
n2@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Video Details", pos: "b", h: 48 }
n5@{ icon: "mdi:cog", form: "rounded", label: "Get Youtube Video Details", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get Youtube Video Comments"]
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Prepare Comments Data"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Prepare HTML for Email"]
n9@{ icon: "mdi:message-outline", form: "rounded", label: "Gmail Account Configuration", pos: "b", h: 48 }
n10@{ icon: "mdi:database", form: "rounded", label: "Update Status on Google Sheet", pos: "b", h: 48 }
n11@{ icon: "mdi:play-circle", form: "rounded", label: "Pick Video Ids from Google s..", pos: "b", h: 48 }
n3 --> n0
n0 --> n4
n1 --> n8
n2 -.-> n1
n4 --> n5
n7 --> n1
n8 --> n9
n5 --> n6
n6 --> n7
n9 --> n10
n11 --> n3
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n11 trigger
class n1 ai
class n2 aiModel
class n3 decision
class n10 database
class n6 api
class n7,n8 code
classDef customIcon fill:none,stroke:none
class n6,n7,n8 customIcon
Why This Matters: Turning Comment Noise Into Decisions
Comments are one of the best “free” research streams you have, but they’re messy. The useful bits are scattered between compliments, inside jokes, and random arguments, and it’s on you to turn all that into something you can act on. Most people try to skim a few dozen comments and call it done. Then a week later you realize viewers asked the same question 50 times, or a negative theme kept repeating, and you missed it because it didn’t jump out in one sitting.
The friction compounds. Not because any single step is hard, but because you repeat it for every video, every week, forever.
- Reading 100 comments per video is manageable once, but it becomes a recurring time sink when you publish consistently.
- Important feedback gets buried, so you end up making content decisions based on hunches instead of patterns.
- Sharing insights with a client or team turns into copy-pasting screenshots and trying to explain “the vibe.”
- Without status tracking, you re-check the same videos and still miss new ones that should be reviewed.
What You’ll Build: Google Sheets → AI Analysis → Gmail Report
This workflow turns a simple spreadsheet into a lightweight YouTube research pipeline. You log a YouTube video ID in Google Sheets and mark it as “Pending.” From there, n8n pulls the video’s metadata, fetches up to 100 top comments via the YouTube API (ordered by relevance), and calculates basic engagement metrics from what it collected. Then an AI Agent powered by the OpenAI Chat Model (GPT-4) reads a curated set of comments and produces a structured analysis: sentiment, recurring themes, common questions, and practical recommendations. Finally, the workflow builds a polished HTML email and sends it to you in Gmail, then updates the sheet to “Mail Sent” so it won’t process the same row again.
The flow starts in Google Sheets. It moves through comment collection and AI summarization, then ends with a formatted email you can forward to a client or drop into a weekly report. No extra dashboards to babysit.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you publish 3 videos a week and you want real insight from the top 100 comments on each. Manually skimming, sorting, and summarizing usually takes about 45 minutes per video, so you’re spending around 2–3 hours a week just to produce a “best guess” summary. With this workflow, adding the ID to Google Sheets takes a minute, and the rest runs in the background. You typically get the Gmail report after a short wait while comments are fetched and analyzed, and you’re done for the week.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for logging video IDs and status.
- Gmail to send the formatted report email.
- YouTube API credentials (get them from Google Cloud Console APIs & Services).
- OpenAI API key (get it from the OpenAI dashboard).
Skill level: Intermediate. You’ll connect accounts, add API keys, and slightly adjust prompts and email recipients.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A Google Sheet row is marked “Pending.” The workflow watches your spreadsheet for new or updated rows and only proceeds when the Status column is set correctly.
The workflow fetches YouTube details and comments. Using the YouTube Video ID, it pulls basic metadata, then collects up to 100 top comments via an HTTP request to the YouTube API.
Metrics are calculated and the AI generates insights. A code step prepares comment stats and a trimmed comment set, then the AI Agent (GPT-4 via the OpenAI Chat Model) produces sentiment, themes, viewer questions, and clear recommendations.
A formatted Gmail report is sent and the sheet is updated. Another code step builds the HTML email, Gmail sends it, and the workflow marks the row as “Mail Sent” so you don’t get duplicates.
You can easily modify the analysis prompt to focus on brand mentions, product feedback, or content ideas based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Google Sheets Trigger
This workflow starts when new or updated rows are detected in your Google Sheet via Retrieve Sheet Video IDs.
- Add Retrieve Sheet Video IDs and set Document to
[YOUR_ID]and Sheet toYoutube_Video. - Set the polling schedule to Every Minute (already configured in pollTimes).
- Credential Required: Connect your Google Sheets credentials.
Step 2: Connect Google Sheets
Use the incoming row data to filter pending items and prepare your video parameters.
- In Check Pending Status, confirm the condition compares Status to
Pendingusing{{ $json.Status }}. - In Throttle Items, keep the default limit or set a custom item cap if you want to control throughput.
- In Map Video Parameters, set videoId to
{{ $json['Youtube video id'] }}and maxComments to100.
Youtube video id and Status to avoid missing data when Map Video Parameters runs.Step 3: Set Up YouTube Data Retrieval
Fetch metadata and comments for the target video ID, then compute summary statistics.
- In Fetch YouTube Metadata, set Video ID to
{{ $json.videoId }}, Resource tovideo, and Operation toget. - Credential Required: Connect your YouTube OAuth2 credentials.
- In Retrieve YouTube Comments, set URL to
https://www.googleapis.com/youtube/v3/commentThreadsand keep Authentication aspredefinedCredentialTypewith nodeCredentialType set toyouTubeOAuth2Api. - Confirm the query parameters include part
snippet, videoId{{ $('Map Video Parameters').item.json.videoId }}, maxResults100, and orderrelevance. - In Process Comment Metrics, keep the existing JavaScript to calculate totals, averages, top comments, and sentiment counts.
Step 4: Set Up AI Analysis
The AI layer analyzes comment text and produces a structured JSON response used in the email report.
- In Analyze Comments with AI, keep the Text field as
Analyze these comments from the video "{{ $json.videoTitle }}": ... {{ $json.commentTexts }}to pass metrics and comment text into the prompt. - Set or confirm the System Message requires JSON output with keys:
overall_sentiment_breakdown,main_themes,common_questions,key_feedback_points,actionable_insights. - In OpenAI Chat Engine, select the model
gpt-4o-miniand set Response Format tojson_object. - Credential Required: Connect your OpenAI credentials in OpenAI Chat Engine (the AI tool for Analyze Comments with AI).
Step 5: Configure Output Actions
Build an HTML email report and send it, then mark the original row as completed.
- In Build Email HTML, keep the JavaScript that parses
$json.outputand generatesemailHTMLandsubject. - In Send Email Report, set Send To to
[YOUR_EMAIL], Message to{{ $json.emailHTML }}, and Subject to{{ $json.subject }}. - Credential Required: Connect your Gmail credentials in Send Email Report.
- In Mark Sheet as Sent, set Operation to
update, match on Id, and update Status toMail Sentusing{{ $('Retrieve Sheet Video IDs').item.json.Id }}. - Credential Required: Connect your Google Sheets credentials in Mark Sheet as Sent.
JSON.parse($json.output) successfully.Step 6: Test and Activate Your Workflow
Run a manual test with a “Pending” row to confirm the data pipeline, AI response, and email report.
- In your sheet, add a row with a valid Youtube video id and set Status to
Pending. - Click Execute Workflow and verify the execution flow: Retrieve Sheet Video IDs → Check Pending Status → Throttle Items → Map Video Parameters → Fetch YouTube Metadata → Retrieve YouTube Comments → Process Comment Metrics → Analyze Comments with AI → Build Email HTML → Send Email Report → Mark Sheet as Sent.
- Confirm the email arrives with a subject like
YouTube Analysis: [Video Title] - [#] comments analyzed. - Verify the sheet row is updated to
Mail Sentin the Status column. - Turn the workflow Active to enable continuous monitoring.
Troubleshooting Tips
- YouTube API credentials can expire or lack the right scopes. If fetching comments fails, check your Google Cloud Console project, enabled APIs, and quota first.
- If you’re using Wait nodes or external processing, timing can be unpredictable. Increase the wait duration if the AI step runs before comments or metrics are fully available.
- Default AI prompts are generic. Add your brand voice, what “good feedback” looks like, and the format you prefer early, because otherwise you will keep rewriting the email summary.
Quick Answers
About 30 minutes if you already have your API keys.
No. You’ll mostly connect Google Sheets, Gmail, and paste in API keys, then tweak the AI prompt.
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 (often a few cents per report) and YouTube API quota limits.
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.
Yes, and you should. Most teams start by editing the AI Agent prompt to focus on brand mentions, product feedback, or content ideas, and by changing who receives the Gmail report. You can also adjust the “Retrieve YouTube Comments” step to pull fewer comments for faster runs, or expand it when you’re doing deeper research. If you want the results stored instead of emailed, swap the “Send Email Report” output for a Google Sheets update that writes the summary back into new columns.
Usually it’s permissions or an expired OAuth connection. Reconnect your Google account in n8n, confirm the workflow has access to the exact spreadsheet, and double-check the column names match what the workflow expects (especially “YouTube Video ID” and “Status”).
It’s designed to scale across many videos, but the practical limit is your n8n executions and API quotas. On n8n Cloud Starter, you can run thousands of executions per month, which is plenty for weekly reporting across a few channels. If you self-host, executions aren’t capped, so it mainly depends on your server and how many videos you queue as “Pending.” The workflow pulls up to 100 comments per video by default, so batching lots of videos at once can increase YouTube API usage and slow processing.
Often, yes. This workflow benefits from n8n’s flexible logic (filters, code steps, and branching) and the ability to self-host when volume grows. Zapier or Make can work, but AI + API-heavy workflows tend to get expensive or awkward once you add “fetch comments, compute metrics, then format HTML.” If you only need a simple “new row in Sheets → send an email” flow, those tools can be faster to set up. If you’re unsure, Talk to an automation expert and explain your volume and reporting needs.
Once this is running, comment review becomes a repeatable system instead of a weekly rabbit hole. The workflow handles the scroll. You focus on what to change next.
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.