Guides

How to Automate your YouTube Scriptwriting in CogniAgent

date-icon
Feb 03, 2026
clock-icon
4 min read

Part 2: Adding a YouTube Scriptwriter to Your Workflow

In the previous guide, we built a social media automation agent capable of generating posts around a defined topic, following specific rules, and publishing them automatically to selected social platforms.

In Part 2, we’ll extend that same workflow by adding a YouTube scriptwriter – without rebuilding anything from scratch. In just a few additional steps, you’ll transform your existing social media content into ready-to-record YouTube scripts.

By the end of this guide, you’ll have:

  • One unified workflow 
  • Auto-generated social media posts 
  • Auto-generated YouTube scripts based on those posts
    All created in under 5 minutes. 

If you haven’t built the workflow from Part 1 yet, we recommend starting there first. This guide assumes you already have a functioning social media generation and publishing flow.

Why Does This Matter?

Content teams rarely struggle with ideas — they struggle with reuse.

Social posts, threads, and captions already contain:

  • Clear opinions 
  • Structured thoughts 
  • Strong hooks 

Turning those into YouTube scripts manually is repetitive and time-consuming. By automating this step, you:

  • Eliminate duplicate work 
  • Maintain message consistency across platforms 
  • Move faster from idea → recording → publishing 

This approach allows you to publish once and appear everywhere, using one source of truth.

Workflow Overview

You will add three simple steps to your existing workflow:

  1. Merge all relevant outputs into a single path 
  2. Add an LLM node to generate the YouTube script 
  3. Reveal and store the output using an Action in App node


This is an example of what you can receive: a one-click YouTube script, ready to record.

To get the best results, enrich it with details specific to your business.

How? Let’s learn!

Step 1: Continue with the Merge Node

Connect All Relevant Nodes into One Flow

At this stage, your workflow already generates social media posts. These posts may come from:

  • An LLM node 
  • A loop node 
  • A publishing branch 

To reuse this content for YouTube, you first need to merge the outputs into a single node.

What to do:

  • Add a Merge node
  • Connect all branches that produce final post content into this node 

Why this matters:
The Merge node creates a single, clean input for the next AI step, ensuring the YouTube script is generated from the finalized social media copy — not drafts or partial outputs.

Step 2: Add the LLM Node

Instruct the AI to Write a YouTube Script

Now that all content flows into one place, it’s time to tell the AI what to do next.

Add a new LLM node after the Merge.

In the prompt, clearly define:

  • The role of the AI (e.g., “You are a YouTube scriptwriter”)
  • The input source (the generated social media posts)
  • The expected output structure 

Example instruction logic (conceptual):

  • Turn the post into a spoken YouTube script
  • Add a hook, main explanation, and closing
  • Keep the tone natural and conversational
  • Optimize for recording, not reading 

This step converts short-form or written content into long-form, voice-ready scripts.

Step 3: Reveal the Output

Add an Action in App Node

To make the generated scripts usable, you need to surface them somewhere for review or recording.

Add an Action in App node after the LLM node.

Typical use cases:

  • Send the script to a document
  • Display it in the app interface
  • Store it for later publishing or approval 

What to configure:

  • Select the correct action (e.g., “Insert text”)
  • Map the LLM output variables into the text field 

This step ensures your YouTube scripts are:

  • Visible
  • Reviewable
  • Ready to record immediately 

Final Result

With just three additional nodes, your workflow now:

  • Generates social media posts
  • Publishes them automatically
  • Converts them into YouTube scripts in parallel 

No copy-paste. No manual rewriting. One workflow, multiple content formats.

What’s Next?

Explore the control nodes to enrich your workflow with further details.

Build complete workflows with CogniAgent in under 5 minutes.

Follow us on our social channels and subscribe so you don’t miss upcoming guides and updates!