Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Web Scraping & Research

Web Scraping & Research

Extract YouTube Video Statistics into Google Sheets

When you run it, it reads video URLs from Google Sheets, fetches views, likes and comments from the YouTube API, and writes the statistics back.

What it does

## [Agent Circle's N8N Workflow] YouTube Video Statistics Crawler - Try It Out! This N8N template makes it easy to extract key YouTube video data - including title, view count, like count, comment count, and many more - and save it directly into a connected Google Sheet. Use cases are many: Whether you're YouTubers, content strategists, growth marketers, and automation engineers, this tool gives you fast, structured access to video-level insights in seconds. ## How It Works - The workflow begins when you click Execute Workflow or Test Workflow manually in N8N. - It reads the list of video URLs in the connected Google Sheet. Only the URLs marked with the Ready status will be processed. - The tool loops through each video and prepares the necessary data for the YouTube API call later. - For each available URL, the tool extracts the video ID and sends a request to the YouTube API to fetch key metrics. - The response is checked: - If successful: the video’s statistics are written back to the corresponding row in the Google Sheet and the row's status is marked as Finished. - If unsuccessful: the row's status is updated to Error for later review. ## How To Use - Download the workflow package. - Import the workflow package into your N8N interface. - Duplicate the YouTube - Get Video Statistics Google Sheet template into your Google Sheets account. - Set up Google Cloud Console credentials in the following nodes in N8N, ensuring enabled access and suitable rights to Google Sheets and YouTube services: + For Google Sheets access, ensure each node is properly connected to the correct tab in your connected Google Sheet template: Node Google Sheets - Get Video URLs → connected to Tab Video URLs; Node Google Sheets - Update Data → connected to Tab Video URLs; Node Google Sheets - Update Data - Error → connected to Tab Video URLs. + For YouTube access, set up a GET method to connect to YouTube API in the following node: Node HTTP - Find Video Data. - In your connected Google Sheet, enter the video URLs that you want to crawl and set the rows' status to Ready. - Run the workflow by clicking Execute Workflow or Test Workflow in N8N. - View the results in your connected Google Sheet: Successful fetches will update the rows' status in Column A in the Video URLs tab to Finished and the video metrics will populate. If the call fails, the rows' status in Co

The steps

  1. When clicking ‘Test workflow’
  2. If - Check Success Response
  3. Google Sheets - Update Data
  4. Google Sheets - Update Data - Error
  5. HTTP - Find Video Data
  6. Google Sheets - Get Video URLs
  7. Loop Over Items

Similar automations