YouTube Transcript Processing and Pinecone Vector Upsert for RAG - n8n Workflow

Use this powerful n8n workflow to automatically scrape YouTube transcripts via Apify, process the text, and upsert the data into Pinecone using OpenAI embeddings for RAG applications.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content creators looking to build a knowledge base from their YouTube channel.
Data scientists implementing RAG systems based on video content.
Developers needing robust n8n templates for Apify, OpenAI, and vector database integration.
Automation specialists who manage data pipelines using complex n8n node sequences.

Overview

This advanced n8n workflow solves the complex challenge of turning unstructured video content (YouTube transcripts) into a structured knowledge base suitable for AI querying. The automation starts by fetching a list of videos from Airtable. It then uses an HTTP Request n8n node to trigger an external Apify service to scrape the transcript data. Crucially, the n8n workflow incorporates a 'Wait' n8n node to handle asynchronous job completion before retrieving the results. The extracted transcripts are then segmented and vectorized using the OpenAI Embeddings n8n node and finally upserted into a Pinecone vector store. This provides a complete, scalable solution for building a powerful RAG application backend using the robust capabilities of n8n.

How it Works

The execution of this n8n workflow follows two distinct logical paths:


  1. Data Acquisition and Formatting (Top Path):

The primary process begins by retrieving target video records using the initial Airtable n8n node.
The Loop Over Items n8n node ensures each video is processed individually.
The Apify NinjaPost n8n node makes an API call to initiate the transcript scraping job.
The Wait n8n node pauses the n8n workflow until Apify signals job completion via its webhook. This is a crucial n8n trigger mechanism.
The Get JSON TS n8n node fetches the raw transcript data.
The data is cleaned and standardized using the JSON Stringifier code n8n node and the Edit Fields n8n node.
Finally, the Airtable1 n8n node updates the original record, marking the transcript as acquired.


  1. Vectorization and Upsert (RAG Path):

This path is initiated via the When clicking ‘Test workflow’ n8n trigger (or a dedicated secondary n8n trigger in production).
The Airtable2 n8n node fetches the acquired transcript text.
The Transcript Processor code n8n node performs final clean-up.
The data flows through the LangChain integration nodes: Default Data Loader and the Recursive Character Text Splitter1 n8n node, which ensures text chunks are optimally sized for vector storage.
The Embeddings OpenAI n8n node generates high-quality vector representations.
* The Pinecone Vector Store n8n node performs the final upsert operation, injecting the video knowledge base into Pinecone, completing the automated n8n workflow.

Installation Guide


  1. Import: Copy the provided n8n workflow JSON and import it into your n8n instance.

  2. Credentials: Set up the required credentials for this n8n workflow:

Airtable: Configure credentials for the three Airtable n8n node instances (API key, Base ID, Table Name).
HTTP Request: Update the Apify NinjaPost and Get JSON TS n8n node parameters with your Apify API key and actor ID. This ensures the external service can be triggered.
OpenAI: Ensure the Embeddings OpenAI n8n node is connected to your OpenAI API key credentials.
Pinecone: Connect the Pinecone Vector Store n8n node to your Pinecone API key, environment, and index name.

  1. Code Nodes: Review the logic within the JSON Stringifier and Transcript Processor n8n node blocks to ensure the field mapping accurately matches your incoming Apify data structure. These custom scripting steps are vital for the n8n templates to function.

  2. Activation: Activate the n8n workflow, or manually run the When clicking ‘Test workflow’ n8n trigger to test the RAG path.

Node Details

Airtable (3 instances): Used to read the initial list of videos to process and update the status of the records after transcription acquisition. A core n8n node for data management.
Loop Over Items n8n node: Essential n8n logic flow control, ensuring sequential, individual processing of records fetched from the initial Airtable n8n node.
Apify NinjaPost (HTTP Request n8n node): Initiates the external scraping job. Key configuration involves setting the correct URL and body for the Apify API job start endpoint.
Wait n8n node: An essential asynchronous handler in the n8n workflow. It uses a webhook to pause execution until a successful callback is received from the Apify service, completing a crucial part of the n8n workflow.
Recursive Character Text Splitter1 n8n node: A critical LangChain component. It handles the preparation of large transcripts by splitting them into smaller, semantically meaningful chunks required for effective vectorization by the embeddings n8n node.
Embeddings OpenAI n8n node: Generates numerical vector representations (embeddings) of the text chunks using the OpenAI API. This preparation is mandatory for the final upsert operation performed by the n8n workflow.


  • Pinecone Vector Store n8n node: The destination n8n node for the RAG data. Configured to perform the upsert operation, injecting the vectorized text and associated metadata into the Pinecone database. This is the final step in this advanced n8n template.

Related n8n Workflows

Free

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

I’m an automation enthusiast transforming complex processes into streamlined workflows with tools like n8n, Airtable, Apify, and Pinecone. I design integrations that extract insights and simplify tasks, empowering businesses and individuals to work smarter. Passionate about innovation and creative problem-solving, I actively share my expertise with a vibrant community.

Featured*