YouTube Video Transcript Extraction via Google Sheets and Webhook API - n8n Workflow

Use this robust n8n workflow to automate YouTube transcript extraction. Set up an n8n trigger to monitor Google Sheets for new URLs or use a synchronous webhook for instant API results. A powerful n8n template for content analysis.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • SEO Analysts and Researchers who need bulk transcript data for keyword analysis.

  • Content Repurposers looking to convert video content into blog posts or articles automatically.

  • Developers requiring a reliable API endpoint to fetch video transcripts on demand.

  • Automation Specialists seeking powerful n8n templates for data extraction and integration.

Overview

This comprehensive n8n workflow provides a dual approach for high-volume YouTube transcript extraction. It solves the problem of manual transcript retrieval by offering two robust n8n trigger methods:


  1. Automated Google Sheets Monitoring: Ideal for bulk processing. Simply drop a list of YouTube URLs into a Google Sheet, and the n8n workflow handles the extraction in the background, saving the results back to another sheet.

  2. Instant Webhook API: Perfect for on-demand requests or integrating with external applications. Send a POST request to the custom n8n trigger endpoint and receive the full transcript and rich video metadata (title, duration, channel) immediately.

Every step in this n8n node setup is designed for reliability, including custom code to handle complex URL formats (youtube.com, youtu.be, embed) and gracefully manage videos where a transcript is not available.

How it Works

This n8n workflow operates via two distinct, parallel paths:

Path 1: Google Sheets Automation


  1. Monitor Google Sheet for URLs (n8n trigger): The workflow starts by polling a designated Google Sheet, watching for new rows containing YouTube URLs.

  2. Extract YouTube Video ID (n8n node): A custom Code n8n node extracts the canonical video ID from the potentially messy input URL string using regular expressions.

  3. Fetch Video Transcript Data: An HTTP Request n8n node uses the extracted ID to call the external YouTube Transcript API (requiring API key authentication).

  4. Parse Transcript Text (n8n node): A second Code n8n node cleans and structures the API response, joining the segmented transcript into a single, long text string.

  5. Save Transcript to Sheet: The final Google Sheets n8n node appends the resulting video title and full transcript text to a designated results sheet, completing the n8n workflow run.

Path 2: Webhook API Integration


  1. Webhook Trigger (n8n trigger): This path starts when an external service sends a POST request containing the video URL to the specified n8n endpoint.

  2. Extract YouTube Video ID (n8n node): Similar to the first path, a Code n8n node extracts the video ID from the webhook body.

  3. Fetch Video Transcript Data: An HTTP Request n8n node contacts the Transcript API.

  4. Parse Transcript Text (n8n node): This Code n8n node extracts all available metadata (title, channel, date) along with the transcript, adding fallback logic to use the video description if a formal transcript is missing.

  5. Return Transcript Response: The workflow concludes by immediately returning a detailed JSON response back to the caller via the Respond To Webhook n8n node.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


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

  2. Set up YouTube Transcript API Credentials: Create a new credential for the 'YouTube Transcript API' (labeled as 'Dummy YouTube Transcript API' in the template). This credential must contain your valid API key or token.

  3. Configure Google Sheets (Path 1):

Set up a Google Sheets credential (if you don't have one) allowing n8n access to your documents.
In both the 'Monitor Google Sheet for URLs' n8n trigger and the 'Save Transcript to Sheet' n8n node, replace YOURGOOGLESHEET_ID with your actual document ID.
* Ensure the sheet names (urls and transcripts) and required columns are correctly configured as per the notes.

  1. Activate the Webhook (Path 2): Save and activate the n8n workflow. The 'Webhook Trigger' n8n node will provide you with a unique URL to start sending external requests.

Node Details


  • Monitor Google Sheet for URLs (Google Sheets Trigger): The primary n8n trigger for automated extraction. It is configured to run periodically, looking for newly added rows.

  • Webhook Trigger (Webhook Node): The instant n8n trigger, configured to listen for POST requests at the /extract-youtube-transcript path and respond synchronously.

  • Extract YouTube Video ID (Sheets/Webhook) (Code Node): Essential n8n node that uses JavaScript regular expressions to robustly parse the video ID from various YouTube URL formats.

  • Fetch Video Transcript Data (Sheets/Webhook) (HTTP Request Node): Executes the API call to the external YouTube transcript service, utilizing authentication passed securely via n8n credentials.

  • Parse Transcript Text (Sheets/Webhook) (Code Node): This n8n node cleans the raw API output. In the Webhook path, it also extracts comprehensive video metadata (title, channel, duration) and implements critical fallback logic for missing transcripts.

  • Save Transcript to Sheet (Google Sheets Node): The final action n8n node for the automated path, appending the resulting transcript and video title to the specified Google Sheet.

  • Return Transcript Response (Respond To Webhook Node): Sends the structured JSON output (including transcript and metadata) back to the calling application immediately after processing by the n8n workflow.

Related n8n Workflows

Free

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

No-Code Specialist with more than 10 years of experience in Digital Marketing. Currently working with Bubble. Webflow, AI, Agents and N8N.

Featured*