youtube-transcription

A custom n8n node for fetching YouTube video transcripts using yt-dlp.

Package Information

Released: 20 mo ago
Downloads: 4 weekly / 112 monthly
Latest Version: 1.0.11
Author: endcycles

Documentation

YouTube Transcript Node for n8n

This is a custom node for n8n that retrieves the transcript of a YouTube video using its video ID or URL. It uses yt-dlp to fetch video information and transcripts.

Features

  • Automatically downloads and manages the yt-dlp binary
  • Fetches the transcript of a YouTube video
  • Supports both video IDs and full URLs
  • Outputs the transcript in a structured JSON format, including timing information
  • Includes video metadata (title, duration, uploader, upload date)
  • Supports error handling with an option to continue on failure

Installation

You can install this node into your n8n instance using npm:

npm install @endcycles/n8n-nodes-youtube-transcription

Or through the n8n Community Nodes interface:

  1. Open your n8n project
  2. Navigate to Settings > Community Nodes
  3. Search for "@endcycles/n8n-nodes-youtube-transcription" and install it
  4. Restart your n8n instance if necessary

The node will automatically download and manage the required yt-dlp binary.

Node Parameters

  • Video ID or URL: The ID or full URL of the YouTube video for which you want to fetch the transcript. Both formats are supported:
    • Video ID: dQw4w9WgXcQ
    • Full URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ

Example Usage

  1. Add the YouTube Transcript node to your n8n workflow
  2. Provide either the Video ID or full YouTube URL
  3. Execute the workflow

Example Output

{
	"youtubeId": "dQw4w9WgXcQ",
	"transcript": [
		{
			"text": "Never gonna give you up",
			"start": 0.0,
			"duration": 4.12
		},
		{
			"text": "Never gonna let you down",
			"start": 4.12,
			"duration": 4.08
		}
	],
	"metadata": {
		"title": "Rick Astley - Never Gonna Give You Up (Official Music Video)",
		"duration": 213,
		"uploader": "Rick Astley",
		"uploadDate": "20091025"
	}
}

Troubleshooting

  • If you encounter any issues with the automatic download of yt-dlp, check your internet connection and ensure your n8n instance has write permissions to the .n8n directory in your home folder.
  • The node will automatically attempt to download yt-dlp if it's not found.

License

This project is licensed under the MIT License. See the LICENSE file for details.


For issues, feature requests, or contributions, please visit the GitHub repository.

Discussion