Back to Blog
YouTube AutomationHOT

N8N Script Generator: AI-Powered YouTube Video Scripts

Generate full YouTube video scripts with outlines, hooks, and b-roll suggestions using AI. This N8N workflow exports directly to Google Docs.

YouTubeNiches Team
March 11, 2026
8 min
N8N Script Generator: AI-Powered YouTube Video Scripts

N8N Script Generator: AI-Powered YouTube Video Scripts

Create professional video scripts in minutes. This workflow uses AI to generate complete scripts with hooks, structure, and b-roll suggestions, then saves them to Google Docs.

What This Workflow Does

  • Webhook Input: Receives topic, duration, and style
  • Outline Generation: AI creates a structured outline
  • Full Script: Expands outline into complete script
  • Google Docs Export: Creates and shares the document
  • Response: Returns the document URL

Script Components Generated

  • Hook: Attention-grabbing first 30 seconds
  • Introduction: Topic overview and channel mention
  • Main Content: Structured sections with transitions
  • B-Roll Notes: Visual suggestions for each section
  • Call to Action: Subscribe/like/comment prompts
  • Outro: Channel branding and next video teaser

Prerequisites

  • N8N instance
  • OpenAI API key
  • Google Docs API connected

Step-by-Step Setup

Step 1: Create Webhook

  • Add "Webhook" node
  • Path: /generate-script
  • Method: POST
  • Expected body:
json

{

"topic": "10 AI Tools for YouTubers",

"duration": "10",

"style": "educational"

}

Step 2: Generate Outline

  • Add "OpenAI" node
  • Prompt:

Create a YouTube video script outline for:

Topic: {{ $json.body.topic }}

Target Length: {{ $json.body.duration }} minutes

Style: {{ $json.body.style }}

Include:

  • Hook (first 30 seconds)
  • 5-7 main points with timestamps
  • Suggested B-roll for each section
  • Call to action placement

Step 3: Expand to Full Script

  • Add another "OpenAI" node
  • Prompt:

Expand this outline into a full YouTube script with natural speech patterns.

Include [B-ROLL: description] notes where visuals should change.

Make it conversational and engaging.

Outline:

{{ $json.choices[0].message.content }}

  • Set max_tokens to 4000

Step 4: Create Google Doc

  • Add "Google Docs" node
  • Operation: Create
  • Title: Script - {{ $json.body.topic }} - {{ DateTime.now().toFormat('yyyy-MM-dd') }}
  • Content: The generated script

Step 5: Return Response

  • Add "Respond to Webhook" node
  • Return:
json

{

"script": "{{ $json.choices[0].message.content }}",

"documentUrl": "{{ $json.documentUrl }}",

"success": true

}

Sample Output

[HOOK - 0:00]
"What if I told you that you could double your YouTube productivity using just five AI tools? Today, I'm revealing the exact tools I use..."

>

[B-ROLL: Quick montage of AI interfaces]

>

[INTRO - 0:30]
"Hey everyone, welcome back to the channel..."

Pro Tips

  • Customize for Your Voice: Edit the output to match your speaking style
  • Add Personal Stories: Insert your own experiences
  • Timing Markers: Use the timestamps while filming
  • B-Roll Library: Build a library based on suggestions

Download the Workflow

Get this workflow from our N8N Workflows page.

Tags

n8nscript writingaigoogle docscontent creation

Share this article