Home / Integrations / n8n / YouTube transcripts as clean text and RAG chunks

Updated

YouTube transcripts as clean text and RAG chunks in n8n

Run YouTube Transcript for AI: RAG Chunks, Chapters, SRT from n8n for summarising videos, building a RAG index from a channel or quoting what was said. The tool runs on Apify as plainprobe/youtube-transcript-ai, returns one JSON item per transcript and costs $0.002 per transcript; failed items are not charged.

Download the n8n workflow (JSON)

Apify Store page

Steps

  1. Import the workflow. Download the ready workflow for this tool and import it in n8n (workflow menu, Import from File). It contains a manual trigger and an HTTP Request node that sends POST https://api.apify.com/v2/acts/plainprobe~youtube-transcript-ai/run-sync-get-dataset-items.
  2. Add your Apify token. Create a Header Auth credential with name Authorization and value Bearer YOUR_APIFY_TOKEN (token from Apify Console, Settings, API & Integrations) and select it in the HTTP Request node.
  3. Set the input. Edit the JSON body of the HTTP Request node: put your own values in videos. Click Test workflow; each result comes back as one n8n item.
  4. Send results to an OpenAI or AI Agent step. Add an If node (status equals ok) and then a an OpenAI or AI Agent step node, and map the fields listed in the table below.
  5. Schedule it. Replace the manual trigger with a Schedule Trigger node and activate the workflow.

Alternative: if you installed the Apify community node, use its operation Run an Actor and get dataset with the Actor plainprobe/youtube-transcript-ai and the same input.

Input to paste

The input is a JSON object; replace the example values with your own.

{
  "videos": [
    "https://www.youtube.com/watch?v=jNQXAC9IVRw",
    "https://youtu.be/T-D1OfcDW1M"
  ],
  "preferredLanguages": [
    "en"
  ]
}

Which output fields to map to an OpenAI or AI Agent step

Each result contains these fields (shortened example below). A useful mapping to an OpenAI or AI Agent step, with Notion as another common destination:

Result fieldWhere it goes
titlepage title
channelNamechannel property
textprompt sent to the AI step
chunkspieces for a vector store (RAG)
languagelanguage property
{
  "videoId": "T-D1OfcDW1M",
  "status": "ok",
  "title": "What is Retrieval-Augmented Generation (RAG)?",
  "channelName": "IBM Technology",
  "publishDate": "2023-08-23T04:00:32-07:00",
  "durationSeconds": 395,
  "language": "en",
  "captionType": "manual",
  "wordCount": 1062,
  "text": "Large language models. They are everywhere. ...",
  "chunks": [
    {
      "index": 0,
      "start": 0.06,
      "end": 85.26,
      "chapter": null,
      "charCount": 1417,
      "url": "https://www.youtube.com/watch?v=T-D1OfcDW1M&t=0s"
    }
  ],
  "error": null
}

A scheduled workflow you can copy

Every day, take the videos you saved to a list, fetch their transcripts, ask an AI step for a summary and key points from the text field, and save title, channel and summary to Notion.

What it costs

$0.002 per transcript (one video whose transcript was returned), billed by Apify per successful result, with no subscription. 1,000 transcripts cost $2. Videos without captions, private, removed or blocked videos are free. Apify subscribers get 10 to 30 % off.

Full details, benchmark and pricing table: YouTube Transcript for AI: RAG Chunks, Chapters, SRT.

Questions about youtube transcripts as clean text and rag chunks in n8n

How much does youtube transcripts as clean text and rag chunks cost when run from n8n?

$0.002 per transcript (one video whose transcript was returned), charged by Apify to your Apify account; n8n only counts its own executions or operations. Failed items are not charged.

Can I send several items in one n8n run?

Yes. Put all of them in the videos list of the input; one Actor run returns one result per transcript, and n8n handles them as separate items.

Do I need the Apify community node?

No. The template uses n8n's built-in HTTP Request node. The Apify node (Run an Actor and get dataset) works too if you have installed it.

Same tool in other platforms: Make · Zapier · all n8n workflows