Back to blog

n8n YouTube transcript not working: each error and its fix

What each n8n YouTube transcript error means, why the youtube-transcript package can hand you Arabic for an English video, and what works on n8n Cloud. Tested on n8n 2.47.5.

TL;DR: Most n8n YouTube transcript workflows run the youtube-transcript npm package, either in a Code node or inside a community node. On n8n Cloud neither route is open. On a self-hosted install the Code node refuses the package until you allow it, and the package then has three traps of its own: it picks the first caption track instead of English, it wants the exact language code, and it reports Transcript is disabled for videos where that is not the problem.

We installed n8n 2.47.5 and youtube-transcript 1.3.1 on Node 24 and ran them against real videos on 2026-11-12. We ran from a home connection, so YouTube did not block us, and we say below where that limits what we saw.

Troubleshooting

What each error means

The error saysWhat it meansWhat to do
Module 'youtube-transcript' is disallowed [line 1]The Code node is not allowed to load external packagesAllow it on self-hosted, below. Not possible on Cloud
Cannot read properties of undefined (reading 'slice')An old youtube-transcript (we saw it on 1.2.1)Update the package
No transcripts are available in en-US this videoThe language code does not match a track exactlyCopy a code from the list in the error
Transcript is disabled on this videoYouTube returned no caption tracks, for any reasonCheck the video by hand, below
YouTube is receiving too many requests from this IPYouTube showed a captcha page to your serverSlow down or change the address
The transcript comes back in the wrong languageNo language was set, so the first track was usedSet the language
Guide

On n8n Cloud

Two rules from n8n's own docs decide this. The Code node page says: "If you use n8n Cloud, you can't import external npm modules." The community nodes page says: "Unverified community nodes aren't available on n8n cloud and require self-hosting n8n."

So on Cloud a Code node cannot load youtube-transcript, and the unverified transcript nodes on npm cannot be installed. What is left is an HTTP Request node pointed at a transcript API, or a verified community node from the nodes panel.

Guide

The Code node says the module is disallowed

On a default self-hosted n8n 2.47.5, this Code node:

javascript
const { YoutubeTranscript } = require('youtube-transcript');
const r = await YoutubeTranscript.fetchTranscript('aircAruvnKk', { lang: 'en' });
return [{ json: { segments: r.length, first: r[0].text } }];

failed with Module 'youtube-transcript' is disallowed [line 1].

Two things fix it, and you need both. Install the package where n8n can find it. We installed it with npm in the same folder as n8n. For Docker, the route people on the n8n forum report working is a custom image built from n8nio/n8n with the package installed globally. Then start n8n with:

bash
NODE_FUNCTION_ALLOW_EXTERNAL=youtube-transcript

With that set, the module loaded on our install and the code ran as far as its request to YouTube. Our test machine sends traffic through a proxy, and the Code node's runner did not use it, even with Node's proxy flags set, so that request failed with fetch failed. If your n8n sits behind a corporate proxy, you may see the same. We ran the rest of the tests in plain Node 24 with the same package version.

Troubleshooting

An old package version fails on every video

youtube-transcript 1.2.1 failed on 3 of 3 videos with TypeError: Cannot read properties of undefined (reading 'slice'). Version 1.3.1 returned all three.

This matters for community nodes. n8n-nodes-youtube-transcript-api 2.4.3 depends on youtube-transcript ^1.2.1. A fresh install today resolves to 1.3.1, but an install from early 2025 may still hold the old one. Reinstall the node to pick up the new version.

Guide

The transcript comes back in the wrong language

With no language set, the package takes the first caption track YouTube lists. That is not always the spoken language.

VideoSpoken languageReturned with no language set
3Blue1Brown, neural networks (aircAruvnKk)EnglishArabic, 216 segments
Steve Jobs at Stanford (UF8uR6Z6KLc)EnglishArabic, 161 segments
Rick Astley (dQw4w9WgXcQ)EnglishEnglish
Me at the zoo (jNQXAC9IVRw)EnglishEnglish

Two of the English videos we tried came back in Arabic. The package's code takes the first track in YouTube's list, and for those two videos the first track was Arabic. With { lang: 'en' } both returned English (286 and 341 segments).

The n8n-nodes-youtube-transcript-api node has a Language field, and it is empty by default. Fill it in.

Guide

The language code has to match exactly

The package compares your code with each track's code and does no fallback. On the Rick Astley video:

  • en worked.
  • en-US failed: No transcripts are available in en-US this video (dQw4w9WgXcQ). Available languages: en, en, de-DE, ja, pt-BR, es-419
  • de failed with the same message, although de-DE is in the list.

The error prints the codes the video has. Copy one from there.

Guide

"Transcript is disabled" does not always mean that

The package throws [YoutubeTranscript] 🚨 Transcript is disabled on this video whenever YouTube's answer holds no caption tracks. We got it for three different cases:

  • a live stream (jfKfPfyJRdk)
  • a video ID that does not exist (xxxxxxxxxxx)
  • a second made-up ID (aaaaaaaaaaa)

None of those is a video whose owner turned captions off. So before you trust the message, open the video in a browser and look for the captions button. If the video has captions there and your workflow still says disabled, the answer YouTube gave your server was different from the one it gave your browser. We could not reproduce that case from a home connection, so we cannot tell you what a blocked server sees. Our RequestBlocked guide covers how YouTube treats server addresses for the Python library.

Guide

What the output looks like

On 1.3.1 each segment is { text, duration, offset, lang }, with offset and duration in milliseconds. Text keeps the line breaks from the caption file, so join segments with a space and replace \n if you want one paragraph. We found no HTML entities such as ' in the seven videos that returned.

Guide

The older community nodes

PackageWhat it runsState on npm
n8n-nodes-youtube-transcriptA headless browser (Puppeteer) that clicks Show transcriptDeprecated, last changed December 2024
@catalinbozianu/n8n-nodes-youtube-transcriptPuppeteer as wellLast changed March 2025
n8n-nodes-youtube-transcript-apiThe youtube-transcript packageLast changed March 2025

The Puppeteer nodes need a Chromium that the n8n container can launch. The first node's author said on the n8n forum that the browser route is resource heavy and unreliable at scale. We did not run the Puppeteer nodes.

Guide

Skip the package with a transcript API

The other way out is to stop fetching from your n8n server. A transcript API does the fetch on its own network, and n8n only makes one HTTPS call.

TranscriptFetch has one, which is our product, so weigh this section with that in mind. The TranscriptFetch n8n node is a verified community node, so it installs from the nodes panel on n8n Cloud and on self-hosted: open a workflow, click +, search for TranscriptFetch, click Install. Add a TranscriptFetch API credential with a key from your dashboard, and n8n checks the key when you save.

The node gets one transcript, a batch of up to 50, a channel's or playlist's videos, and search results, for YouTube, TikTok and Instagram. A trigger starts a workflow when a channel posts a new video. Videos with no captions can go to AI transcription, which answers the real Transcript is disabled case. There is a ready workflow to fetch one transcript you can import.

You start with 50 free credits with no card, a caption transcript costs 1 credit, and failed requests are free. We did not run the node for this post, because the test had no API key. The steps above are from its docs.

FAQ

The Code node blocks external npm packages by default. On a self-hosted install, add the package to the n8n image and set NODE_FUNCTION_ALLOW_EXTERNAL=youtube-transcript. On n8n Cloud external packages cannot be imported at all.

n8n YouTube Transcript Not Working? Errors and Fixes