YouTube to Google Sheets, comments logged clean
Copying YouTube comments into a spreadsheet is one of those tasks that looks “quick” until you’re 40 minutes deep, you’ve lost a thread, and you’re not sure which comment came from which video.
YouTube comment logging hits marketers hard when you’re trying to pull message testing insights. Creators feel it when you want to spot patterns in what your audience keeps asking. And growth teams get stuck when campaign reporting needs real examples, not vibes.
This workflow takes a list of video URLs, crawls the comments, and writes them into Google Sheets in a clean, analysis-ready format. You’ll see how it works, what you need, and how to avoid the common setup headaches.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: YouTube to Google Sheets, comments logged clean
flowchart LR
subgraph sg0["Test Workflow Flow"]
direction LR
n0@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If - Check Success Response", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Update Status", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If - Check Video Url is Not ..", pos: "b", h: 48 }
n5["<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/>HTTP Request - Get Comments"]
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If - Check Comment Exists", pos: "b", h: 48 }
n7@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Get Video URLs", pos: "b", h: 48 }
n8@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Insert/Updat..", pos: "b", h: 48 }
n9@{ icon: "mdi:play-circle", form: "rounded", label: "Test Workflow", pos: "b", h: 48 }
n10@{ icon: "mdi:database", form: "rounded", label: "Google Sheets - Update Statu..", pos: "b", h: 48 }
n0 --> n6
n9 --> n7
n3 --> n5
n6 --> n8
n6 --> n10
n5 --> n1
n1 --> n0
n1 --> n10
n2 --> n3
n7 --> n4
n4 --> n3
n8 --> n2
n10 --> 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 n9 trigger
class n1,n4,n6 decision
class n2,n7,n8,n10 database
class n5 api
classDef customIcon fill:none,stroke:none
class n5 customIcon
The Problem: YouTube Comments Don’t Turn Into Usable Data
YouTube comments are full of market research. Objections, feature requests, competitor mentions, and the exact language people use when they’re excited or annoyed. The problem is getting those comments out in a way you can actually work with. Manual copy-paste breaks threads, loses author context, and turns links into a mess. After that, you still have to clean everything before you can filter, tag, or summarize. It’s not just time. It’s attention, and it’s easy to miss the one comment that would have changed your next campaign.
It adds up fast. Here’s where it breaks down in the real world:
- Pulling comments across multiple videos can burn about 2 hours a week, and that’s before you even start analysis.
- You lose reply chains when you paste one comment at a time, so the “why” behind a complaint disappears.
- Teams end up working from partial samples because grabbing “just the top comments” feels faster, even when it skews conclusions.
- Without a consistent structure (video URL, author, comment link, thread), filtering and pivoting becomes a chore.
The Solution: Crawl Comments From Video URLs Into Google Sheets
This n8n workflow turns YouTube comments into something you can actually use: a linked Google Sheet with rows you can filter, sort, and share. You start with a simple “Video URLs” tab where you paste the YouTube links you care about and mark them as Ready. When the workflow runs, it loops through each Ready URL, calls the YouTube API to fetch comments, and checks that the response is valid before moving on. Each comment gets expanded into individual records and written into a “Results” tab. Once a video is processed, the workflow updates its status to Finished, so you always know what’s done and what still needs attention.
The workflow starts with a manual run inside n8n, so you stay in control. Then it reads your sheet, grabs comments via HTTP requests, and only inserts rows when real comment data exists. Finally, it updates the status column so the same URLs don’t get re-processed by accident.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you’re analyzing 10 videos for a campaign retro. Manually, if you spend maybe 15 minutes per video opening it, scrolling, copying comments, and trying to keep reply threads straight, that’s about 2.5 hours of busywork. With this workflow, you paste 10 URLs into the “Video URLs” tab, mark them Ready, then run n8n (about 5 minutes of setup time). The API calls and sheet updates run in the background, and you come back to a filled “Results” tab that’s ready for filters and pivots.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets to store URLs and results.
- YouTube Data API to retrieve video comments via HTTP request.
- Google Cloud Console credentials (create OAuth/API access in Google Cloud Console)
Skill level: Intermediate. You’ll connect Google credentials, duplicate a Sheet template, and paste a YouTube API request into the HTTP node.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
You run it on demand. The workflow starts when you click Execute Workflow in n8n, which is useful when you’re building a one-time dataset for research or reporting.
It pulls your URL queue from Google Sheets. n8n reads the “Video URLs” tab and filters down to the rows marked Ready, so you control exactly what gets processed.
It fetches and expands comment data. For each video URL, an HTTP request hits the YouTube API, the workflow checks for a successful response, then expands the returned items so each comment becomes its own record.
It writes clean rows and updates statuses. Comments are upserted into the “Results” tab, and the original URL row is updated to Finished (or flagged as Error) so your sheet stays accurate.
You can easily modify the “Ready/Finished” status logic to run automatically when new URLs are added, based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Start the workflow with a manual trigger so you can test runs on demand.
- Add and keep Manual Execution Start as the trigger node.
- Leave all parameters at their defaults for Manual Execution Start.
- Confirm the connection from Manual Execution Start to Retrieve Video URL List.
Step 2: Connect Google Sheets
Pull the list of video URLs that are ready for processing.
- Select Retrieve Video URL List and set the spreadsheet to
YouTube - Crawl Video Comments. - Set Sheet Name to
Video URLs. - In Filters, add a filter where status equals
ready. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials for Retrieve Video URL List. - Ensure the output flows from Retrieve Video URL List to Validate Video URL Present.
Step 3: Set Up Batch Processing and the YouTube API Call
Validate each video URL, batch through records, and call the YouTube Comments API with pagination.
- In Validate Video URL Present, set the condition to check that
{{ $json.video_url }}is not empty. - Keep Batch Iterate Records connected after Validate Video URL Present to iterate through each URL.
- Open YouTube Comments API Call and set URL to
https://www.googleapis.com/youtube/v3/commentThreads. - Enable Send Query and add query parameters: part =
snippet, videoId ={{ $json.video_url.match(/(?:v=|\/)([0-9A-Za-z_-]{11})/)[1] || ''}}, limit =100. - In Pagination, set pageToken to
{{ $response.body.nextPageToken }}and Complete When to{{ !$response.body.nextPageToken}}. - Credential Required: Connect your
youTubeOAuth2Apicredentials for YouTube Comments API Call.
video_url does not contain a valid 11-character video ID, YouTube Comments API Call will return errors. Validate your URL format in the source sheet.Step 4: Configure Comment Validation and Upsert
Verify API success, expand comment items, and upsert comment data into the results sheet.
- In Verify Response Success, set the condition to check
{{ $json.statusCode }}equals200. - Set Expand Comment Items to split out Field To Split Out =
body.items. - In Confirm Comment Exists, set the condition to check
{{ $json.snippet.videoId }}exists. - Configure Upsert Comment Rows with Operation =
appendOrUpdateand Matching Columns =comment_id. - Map columns in Upsert Comment Rows: likes =
{{ $json.snippet.topLevelComment.snippet.likeCount }}, reply ={{ $json.snippet.totalReplyCount }}, comment ={{ $json.snippet.topLevelComment.snippet.textOriginal }}, video_url ==https://www.youtube.com/watch?v={{ $json.snippet.videoId }}, comment_id ={{ $json.snippet.topLevelComment.id }}, author_name ={{ $json.snippet.topLevelComment.snippet.authorDisplayName }}, published_at ={{ $json.snippet.topLevelComment.snippet.publishedAt.toString().slice(0, 19).replace('T', ' ') }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials for Upsert Comment Rows.
Step 5: Configure Status Updates and Error Path
Update the source sheet with success or error status after each video is processed.
- In Update Sheet Status, set Operation to
updateand map status tofinish. - Set row_number to
{{ $('Retrieve Video URL List').item.json.row_number }}and last_fetched_time to{{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials for Update Sheet Status. - In Mark Status Error, set Operation to
updateand map status toerror. - Set row_number to
{{ $('Retrieve Video URL List').item.json.row_number }}and last_fetched_time to{{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}. - Credential Required: Connect your
googleSheetsOAuth2Apicredentials for Mark Status Error.
Step 6: Test and Activate Your Workflow
Run a manual test, verify data in Google Sheets, then activate the workflow.
- Click Execute Workflow from Manual Execution Start to run a test.
- Confirm that Upsert Comment Rows adds or updates rows in the
Resultssheet. - Check the
Video URLssheet to see status updated tofinishand last_fetched_time populated, orerrorif failures occurred. - Once confirmed, toggle the workflow to Active for production use.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the Credentials section in n8n and confirm the Google account has access to the Sheet 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.
- YouTube API requests can fail quietly when quota limits or missing scopes are involved. If “Verify Response Success” routes to the error path, check your Google Cloud Console API quota and make sure the YouTube Data API is enabled for the same project.
Frequently Asked Questions
About 30 minutes if your Google Cloud and Sheet are ready.
No. You’ll mostly copy configuration details and connect credentials. The only “technical” part is pasting the YouTube API request into the HTTP Request node.
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 YouTube Data API usage, which is typically free for small pulls but limited by quota.
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, but you’ll swap the manual trigger for a Google Sheets trigger that watches the “Video URLs” tab. Keep the same Ready/Finished status field so you still control what gets processed. Many teams also add a “Channel” or “Campaign” column and map it into the rows written to the Results tab.
Usually it’s expired Google credentials or the wrong account connected in n8n. Reconnect Google Sheets, then confirm the Sheet is shared with that Google user and the nodes point to the correct tabs (“Video URLs” vs “Results”). If the YouTube API call succeeds but inserts fail, it can also be a permissions scope issue in Google Cloud Console.
It depends on your YouTube API quota and how many executions your n8n plan allows, but processing dozens of videos in a run is normal.
Often, yes, because pulling YouTube comments usually needs looping, branching, and error handling that gets pricey or awkward in simple “zap” style tools. n8n makes it easier to batch through a sheet of URLs, validate API responses, and route failures to an error status without you babysitting it. Self-hosting is a big deal too if you plan to run this frequently. Zapier or Make can still be fine for tiny workflows, like logging a single event from one app to another. If you’re unsure, Talk to an automation expert and get a quick recommendation based on volume.
Once your comment data lands in Google Sheets cleanly, the real work gets easier: sorting, tagging, summarizing, and spotting patterns you can act on. Set it up once, then reuse it whenever a new batch of videos needs answers.
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.