Sync YouTube Video Data to Google Sheets - n8n Workflow

Use this powerful n8n workflow to automatically fetch YouTube video URLs and metadata from specific channels and sync them instantly to Google Sheets for analysis.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Content creators needing to track competitor video releases.
• Market researchers collecting data from specific YouTube channels.
• Data analysts looking for reliable n8n templates for external API synchronization.
• Users who require a robust, scheduled n8n workflow for data ingestion.

Overview

This is a highly functional data synchronization n8n workflow designed to maintain an up-to-date catalog of videos from chosen YouTube channels directly within Google Sheets. The automation solves the problem of manual data extraction by programmatically interfacing with the YouTube Data API. It begins by reading configuration data (Channel IDs) from a source Google Sheet, then executes API calls using an n8n node, and finally cleans and structures the video data (Title, URL, Publish Date). This n8n workflow is particularly valuable as a foundational step for secondary analysis, such as running sentiment analysis on comments, demonstrating the versatility of n8n templates in complex data pipelines.

How it Works

The n8n workflow is initiated using a Manual n8n Trigger (easily convertible to a scheduled trigger). First, a Google Sheets n8n node reads the list of target YouTube Channel IDs from a designated source sheet (Sheet3). Next, the powerful HTTP Request n8n node queries the YouTube Data API's search endpoint. This request is configured with pagination to handle large channel outputs, ensuring all recent videos (up to 50 per call, ordered by date) are fetched for each channel ID. The resulting API response is then passed to a Split Out n8n node, which breaks the array of video objects into individual items for sequential processing. A Set n8n node formats this raw data, constructing the full, actionable videourls link using the video ID. The final step uses another Google Sheets n8n node set to the 'Append or Update' operation. It inserts the newly formatted video data into the target sheet (Sheet2), using the videourls column as a unique identifier to prevent duplication, ensuring a clean and consistent data set.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Google Sheets Credentials: You will need a Service Account credential configured for Google Sheets. Ensure this account has read access to the sheet containing Channel IDs and write access to the target sheet.

  3. YouTube API Key Setup: Configure the 'Query Auth account 3' credential (Generic Credential Type > HTTP Query Auth). You must use your YouTube Data API Key as the query parameter value (the parameter name must be 'key'). This key is essential for the HTTP Request n8n node to function.

  4. Spreadsheet Configuration: Verify the Document IDs and Sheet Names in both Google Sheets n8n nodes match your actual setup. The first node expects Channel IDs, and the second expects to write the video data.

  5. Execution: Save and activate the n8n workflow. Run it using the n8n trigger for testing.

Node Details

Manual Trigger

Function: Acts as the starting point, allowing manual execution or easy conversion to a time-based n8n trigger for scheduled synchronization.
Key Configuration: None (Standard manual execution).

Get Youtube Channel Ids from Google Sheet (Google Sheets)

Function: Reads the input list of Channel IDs required for the API requests.
Key Configuration: Operation: Read data. Uses Service Account Authentication. Targets the sheet containing the channel identifiers (referred to as Sheet3 in the original template).

Get Youtube Video Urls form specific channel (HTTP Request)

Function: Interacts with the YouTube Data API (/search) to retrieve recent videos for the channel ID passed from the previous n8n node.
Key Configuration: URL: https://www.googleapis.com/youtube/v3/search. Authentication: HTTP Query Auth (for the API key). Pagination is enabled to fetch all results, checking for nextPageToken.

Split Out

Function: Essential n8n node for iteration. It splits the array of video results received from the paginated API call into separate items, ensuring each video is processed individually.
Key Configuration: Field to Split Out: items.

Format fields as required to save in google sheet (Set)

Function: Transforms the complex API response structure into clear, flattened fields required for the Google Sheet.
Key Configuration: Defines Title, publishedat, and constructs the full videourls using an expression: =https://www.youtube.com/watch?v={{ $json.id.videoId }}.

Insert & Update Youtube Urls in Google Sheet (Google Sheets)

Function: Writes the structured video data to the final Google Sheet. This crucial n8n node prevents data duplication.
Key Configuration: Operation: Append or Update. Matching Columns: video_urls, guaranteeing idempotence for this specific n8n workflow.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
Aayushman Sharma
Aayushman Sharma

Featured*