Use this powerful n8n workflow to automatically extract, clean, and format transcripts from your YouTube videos using the Data API. Ideal for content repurposing and AI processing. Easily import this n8n template.
Download this n8n workflow template and start using it instantly.
Content creators who need clean, structured transcripts for repurposing.
Data analysts performing sentiment analysis or keyword extraction on video content.
Users seeking robust n8n templates for integrating video data into AI pipelines.
Developers building custom tools that require high-quality video captions.
Raw captions downloaded directly from the YouTube API (VTT format) are often cluttered with timestamps, headers, and noise (like [Música]). This makes them unusable for direct AI processing or article generation. This specialized n8n workflow solves this by providing a complete, automated cleaning pipeline.
This n8n template uses the YouTube Data API to locate and download captions, prioritizing a specified language. The core value of this n8n workflow lies in the custom Code nodes, which expertly strip out metadata, resulting in a plain, readable text transcript ready for downstream applications. This n8n solution is crucial for anyone needing clean data from their video library, making it one of the most practical n8n templates for content automation.
Important Limitation: Due to YouTube API restrictions, this n8n workflow can only successfully extract captions from videos belonging to the authenticated YouTube channel.
This n8n workflow operates as a highly efficient sub-process, triggered externally to handle transcript requests.
When Executed by Another Workflow n8n trigger, receiving the youtubeVideoId and an optional preferredLanguage (e.g., 'es'). These variables are immediately stored by the Set Variables n8n node.List Captions n8n node (HTTP Request) queries the YouTube Data API to retrieve a list of all available caption tracks for the given video ID.IF Has Captions? n8n node checks if any captions exist (items.length > 0).Caption Language Selector n8n node (Code) implements custom logic. It searches for a caption matching the preferredLanguage. If not found, it defaults to the first available caption ID.Download VTT n8n node uses the selected caption ID to download the VTT file content (VTT stands for Web Video Text Tracks).Caption File Conversion n8n node extracts the VTT data into a text buffer.Clean Transcript n8n node (Code) sanitizes the VTT text. It iterates through the content, filtering out VTT headers, timestamps (like 00:01:23.456,00:01:25.789), and bracketed sound effects (like [Música]), finally consolidating the resulting text into a clean, single-string transcript along with useful metadata (word/char count).No Captions Fallback n8n node generates a structured error response, and the Stop and Error n8n node terminates the workflow gracefully, preventing downstream failures.To deploy this powerful n8n template, follow these steps:
List Captions and Download VTT n8n nodes. In the 'Authentication' section, update the 'Credential' field to use your personal YouTube OAuth2 account.youtube.captions.read scope.Execute Workflow Trigger, you must run it from another parent n8n workflow or use the 'Test Workflow' feature with a JSON payload, such as: {"youtubeVideoId": "YOURVIDEOID", "preferredLanguage": "en"}. Remember, the video ID must belong to your authenticated channel. When Executed by Another Workflow (n8n Trigger): Serves as the starting n8n trigger point for this reusable module. It accepts the youtubeVideoId and preferredLanguage parameters.
List Captions (HTTP Request n8n node): Performs the initial call to the YouTube Data API (captions?part=snippet). It uses your YouTube OAuth2 credentials to list all available caption tracks for the video.
IF Has Captions? (n8n node): A core flow control mechanism. It checks the API response length to determine if the video has captions, directing the n8n workflow down the appropriate path.
Caption Language Selector (Code n8n node): This crucial custom scripting n8n node contains JavaScript logic to prioritize the requested language. It stores the determined captionId for the download step.
Download VTT (HTTP Request n8n node): Downloads the raw VTT file content using the selected captionId. This file contains all the timestamps and metadata.
Caption File Conversion (Extract From File n8n node): Converts the binary VTT file data received from the previous HTTP request into usable raw text content, preparing it for cleaning.
Use this powerful n8n workflow to automatically extract source references from Google's AI Overview using the DataForSEO n8n node and save them directly to Google Sheets for tracking and analysis.

Automate lead sourcing from Reddit using this advanced n8n workflow. Search subreddits, filter content with GPT-4.1-mini, summarize opportunities, and save actionable insights to Google Sheets.

Automate robust lead extraction from Google Maps using the Dumpling AI API integration and instantly log all business details—including contact info and ratings—directly into Google Sheets. This powerful n8n workflow saves hours of manual effort.

Create a robust web scraping solution using this n8n workflow template. Features anti-bot fallback via Scrape.do, content cleanup, and dynamic output modes for AI agents.

Automate secure extraction of clinical data, including ICD-10 and CPT codes, from medical documents using a specialized n8n workflow. Includes HIPAA-compliant validation and PHI de-identification.








































