YouTube Channel Data Crawler to Google Sheets - n8n Workflow

Automate the collection of comprehensive YouTube channel stats (subscribers, views, keywords) and save them directly to Google Sheets using this powerful n8n workflow. Perfect for competitive analysis.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

YouTube consultants and channel managers needing bulk data analysis.
Digital marketing agencies performing competitive research.
Data analysts looking for ready-made n8n templates for social media monitoring.
Users who require a reliable n8n workflow to integrate YouTube data with Google Sheets.

Overview

This powerful n8n workflow provides a robust solution for professionals needing to gather large amounts of YouTube channel information programmatically. Instead of manual lookups, this automation utilizes the YouTube Data API to extract critical metrics—including subscriber counts, total views, video count, channel creation date, country, and associated keywords—based on a list of channel URLs provided in a Google Sheet. This specific n8n workflow ensures data cleanliness and tracking by updating the status of each processed row, marking it as 'finished' or 'error'. It is an essential n8n node combination for anyone building a comprehensive content performance dashboard.

How it Works

This specialized n8n workflow is initiated by a manual execution, serving as the primary n8n trigger.


  1. Data Retrieval: The Google Sheets - Get Channel URLs n8n node fetches all rows from the designated spreadsheet tab where the 'status' column is marked 'ready'.

  2. Iterative Processing: The Loop Over Items n8n node processes these URLs one by one.

  3. URL Detection: The Switch - Detect URL Type n8n node intelligently determines if the input is a standard YouTube Channel ID URL or a custom handle (e.g., @handle).

  4. API Execution: Based on the type, the correct HTTP Request n8n node calls the YouTube Data API V3. It extracts key channel data parts, including snippet, statistics, and branding settings.

  5. Validation: The If - Check Success Response n8n node validates the API response, ensuring totalResults is greater than zero.

  6. Data Sync: If successful, the Google Sheets - Update Data n8n node writes all collected metrics (title, view count, subscriber count, keywords, description) back to the corresponding row in the Google Sheet, setting the status to 'finish'.

  7. Error Handling: If the API request fails, the Google Sheets - Update Data - Error n8n node updates the row status to 'error', maintaining accountability within the n8n workflow execution. This powerful n8n template streamlines competitive intelligence gathering.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON code and import it into your n8n instance via the 'Workflows' section using the 'New' -> 'Import from JSON' option.

  2. Google Sheet Setup: Duplicate the required Google Sheet template (as referenced in the workflow notes) into your own Google Drive. Ensure you have columns for all extracted data points and a status column.

  3. Credentials Configuration: Configure the required OAuth2 credentials for both Google Sheets and YouTube Data API across all relevant n8n nodes. Ensure the Google Sheets connection points to the correct document and sheet tab for the "Channel Urls".

  4. Input Data: In your connected Google Sheet, populate the channel URL column and set the status column to "ready" for the rows you wish this n8n workflow to process.

  5. Execution: Run the n8n workflow by clicking the 'Execute Workflow' button or by utilizing the manual n8n trigger.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): The initial n8n trigger, used to manually start the data collection process.
Google Sheets - Get Channel URLs: This n8n node reads input data, specifically filtering for rows where the status column equals 'ready', ensuring the n8n workflow only processes new entries. Key Configuration: Operation set to 'Read' with a filter on the 'status' column.
Loop Over Items (Split In Batches): Manages the iterative nature of this n8n workflow, ensuring each channel URL is processed individually.
Switch - Detect URL Type: A crucial control flow n8n node that uses Regex to determine if the URL is a standard /channel/ link or a custom handle, routing the data to the appropriate API call.
HTTP Request - Get Channel Info By Full URL / Custom URL: These n8n node instances utilize the YouTube Data API V3. Key Configuration: Both use the youtube/v3/channels endpoint and request parts including snippet, statistics, brandingSettings. The data extraction logic uses JavaScript regex to pull either the Channel ID or the custom handle.
If - Check Success Response: This conditional n8n node verifies the success of the API call by checking if results were returned ($json.body.pageInfo.totalResults > 0).
Google Sheets - Update Data: If successful, this n8n node performs an update operation, mapping collected data like title, subscribercount, and keywords back to the Google Sheet row, matched by rownumber, and sets the status to 'finish'.
Google Sheets - Update Data - Error: Handles failure scenarios by setting the row's status to 'error', providing clear feedback within the n8n workflow execution.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Agent Circle - A growing marketplace of AI agents, workflows, and toolkits — built to help teams automate smarter and scale faster

Featured*