Showcase > Content & AI

YouTube Scriptwriter (Standalone)

28-node standalone n8n workflow using OpenAI, Qdrant, and Brave Search for RAG-powered YouTube scriptwriting.

ShowcaseIntermediate5 min read

Note: Source Workflow

This is a simplified variant of the YouTube Scriptwriter workflow. No source JSON is available for independent verification. The details below are reconstructed from the workflow structure.

A streamlined standalone scriptwriting workflow that proves you do not need 200+ nodes to produce professional YouTube scripts. This is the distilled version of our larger scriptwriting systems -- a focused, independently deployable pipeline that takes a topic and reference materials, runs them through a RAG-augmented AI agent, and produces camera-ready scripts with consistent voice and tone. Built for creators who want professional output without enterprise complexity.

Nodes Category Complexity Key Integrations
28 Content Creation / AI Intermediate OpenAI, Qdrant, Brave Search, Google Sheets, Google Drive

Prerequisites

  • OpenAI API key (3 OpenAI nodes plus OpenAI Embeddings for vector storage)
  • Qdrant instance (cloud or self-hosted) for the RAG knowledge base
  • Brave Search API key for real-time web research
  • Google Drive OAuth2 credentials for reference document retrieval and script archiving
  • Google Sheets OAuth2 credentials (4 nodes) for content queue input and script output
  • Reference documents (past scripts, style guides, brand voice docs) uploaded to Google Drive
  • Knowledge level: Intermediate -- requires understanding of RAG concepts, vector databases, and document ingestion workflows

Estimated Setup Time

30-45 minutes including Qdrant setup, initial document ingestion, content queue spreadsheet creation, and credential configuration.

What It Does

This workflow operates in two modes. The first mode is document ingestion: it reads reference materials from Google Drive -- past scripts, style guides, brand voice documents, competitor analyses -- splits them into chunks, generates embeddings, and stores them in a Qdrant vector database. This builds a persistent knowledge base that informs every script the system produces.

The second mode is script generation. Given a topic from Google Sheets, the AI agent retrieves relevant context from the Qdrant knowledge base, performs web research via Brave Search for current information, and generates a full YouTube script. The script follows the structure and voice patterns learned from the ingested reference materials, not generic AI writing patterns.

The "style library" concept is the differentiator. By ingesting your best-performing scripts as reference documents, the RAG pipeline ensures that new scripts mirror the tone, pacing, vocabulary, and structural patterns that your audience already responds to. The AI does not guess at your style -- it references proven examples.

Workflow Diagram

Workflow Diagram

Node Breakdown

Triggers

  • Manual Trigger
  • Schedule Trigger

AI & RAG

  • AI Agent
  • OpenAI x3
  • OpenAI Embeddings
  • Qdrant Vector Store
  • Token Splitter

Research & Tools

  • Brave Search
  • Google Drive

Data & Storage

  • Google Sheets x4
  • Code x2

Step-by-Step Flow

  1. Topic Selection -- The workflow reads the next unprocessed topic from a Google Sheets content queue. Each row contains the video topic, target audience notes, key points to cover, and any specific research directions.

  2. Document Ingestion (First Run) -- On initial setup, Google Drive documents are loaded, split by the Token Splitter into manageable chunks, embedded via OpenAI Embeddings, and stored in Qdrant. This creates the style library that powers all future script generation. New documents can be added at any time.

  3. RAG Context Retrieval -- The topic and key points are converted to embeddings and used to query Qdrant. The vector store returns the most relevant chunks from your reference materials -- past script sections that match the current topic's style, structure, or subject matter.

  4. Web Research -- Brave Search queries are constructed from the topic to gather current information, statistics, expert quotes, and trending perspectives. This ensures the script includes timely, accurate content rather than stale training data.

  5. Script Generation -- The AI Agent receives the topic brief, the RAG context (style examples), and the web research results. It generates a complete YouTube script following the structural patterns from the reference materials: hook, intro, main sections, transitions, call to action, and outro.

  6. Script Formatting -- A Code node formats the raw AI output into a clean script format with section headers, timing estimates, camera direction notes, and B-roll suggestions. The formatting follows conventions established in the reference materials.

  7. Output Storage -- The completed script is written to Google Sheets with metadata including the topic, generation date, word count, estimated video length, and the source references used. A copy is also saved to Google Drive for archive purposes.

What Sets It Apart

RAG-powered style consistency. The Qdrant knowledge base does not just store facts -- it stores your creative style. By ingesting your best-performing scripts, the AI agent learns your voice, pacing, vocabulary, and structural preferences. New scripts sound like you, not like generic AI output.

Brave Search for current content. Scripts about current topics need current information. Brave Search provides real-time data that the AI's training data cannot -- recent statistics, current events, new research findings. This keeps scripts relevant and accurate.

Standalone deployment. Unlike our larger multi-workflow scriptwriting systems, this workflow runs independently. No sub-workflow dependencies, no shared databases to configure, no complex orchestration. Install it, ingest your documents, and start generating scripts.

Cost Considerations

  • OpenAI: 3 model nodes plus embeddings; ~$0.30-1.50 per script depending on length and context volume
  • Qdrant Cloud: Free tier (1GB) sufficient for most style libraries and reference collections
  • Brave Search: Free tier (2,000 requests/month); paid plans from $5/month
  • Google Drive & Sheets: Free with Google account
  • Document ingestion is a one-time cost per reference document (embedding generation)
  • Estimated cost per script: $0.50-2.00 in API costs
  • This is the most cost-effective scriptwriting workflow in the showcase collection due to its streamlined architecture

Ideal For

  • YouTube creators wanting to maintain consistent quality while scaling output
  • Content agencies producing scripts for multiple channels with distinct voices
  • Marketing teams creating video content with brand-consistent messaging
  • Solo creators who want AI assistance without losing their personal style

Tip: Key Techniques

Style Library via RAG -- Ingest your best-performing content as reference documents in a vector store. When the AI generates new content, it retrieves relevant examples of your style rather than relying on generic patterns. This is the most effective technique for maintaining voice consistency in AI-generated content.

Token Splitter for Document Ingestion -- Large documents must be split into appropriately sized chunks before embedding. Too large and retrieval becomes noisy; too small and context is lost. The Token Splitter handles this balance automatically, producing chunks that are meaningful enough for RAG retrieval.

Separation of Ingestion and Generation -- Keep document ingestion (building the knowledge base) and script generation (using the knowledge base) as separate execution paths. This way, you ingest documents once and generate scripts many times without re-processing your entire reference library on every run.

Download

The workflow.json file in this folder can be imported directly into your n8n instance via Settings > Import Workflow.

Want this running in your stack?

I build production n8n and Cloudflare automation for teams — the same engineering behind HarperFlow. Fixed-price, escrow-protected, US-based.