Content Repurposing Engine for Social Media and Email using GPT - n8n Workflow

Use this powerful n8n workflow to automate content repurposing. Transform blog posts or YouTube videos using GPT-5.1 into social media posts, email newsletters, and structured Google Docs output.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content Marketing Teams: Seeking to maximize reach from existing content assets (blogs, videos) without manual rewriting.

  • Social Media Managers: Needing rapid generation of platform-specific copy (LinkedIn, X/Twitter, Video scripts).

  • SEO Specialists: Looking for robust n8n templates to streamline content production pipelines.

  • Automation Enthusiasts: Anyone interested in seeing how complex logic and AI integrate within a single n8n workflow.

Overview

Generating content for multiple platforms is time-consuming. This comprehensive n8n workflow solves this by creating a highly effective AI-powered content repurposing engine. By simply providing a URL or pasting text, the automation handles everything: fetching the source content (including scraping blog HTML or pulling YouTube metadata/transcripts), sending the unified text to an advanced GPT model for strategic rewriting, and delivering all finalized, platform-optimized outputs (including three LinkedIn posts, a seven-tweet thread, email drafts, and a 60-second video script) directly into a formatted Google Doc.

This setup leverages the flexibility of the n8n node structure to manage complex conditional branching (Blog, YouTube, or Raw Text pathing) and robust integration with the OpenAI API, making it one of the most powerful n8n templates available for digital marketing automation.

How it Works

The entire process is initiated by an n8n trigger, the Form Trigger, which collects the source content URL/text and user instructions. The n8n workflow then executes these steps:


  1. Trigger & Branching: The Content Input Form n8n trigger receives the input. Two subsequent If nodes (Is Blog URL? and Is YouTube URL?) direct the flow based on the content type selected by the user.

  2. Content Extraction (Conditional Paths):

Blog Path: The Fetch Blog Page n8n node retrieves the HTML. A subsequent Code n8n node (Extract Blog Content) performs heavy-duty scraping, isolating the main article content and cleaning it of navigational elements and ads.
YouTube Path: The workflow extracts the video ID, fetches video metadata using the YouTube API, scrapes the page for caption information, and the Process YouTube Data n8n node compiles a rich description/summary for the AI.
* Raw Text Path: The input text is simply packaged by the Process Raw Text n8n node.

  1. AI Generation: The consolidated, cleaned content converges at the AI Content Generator n8n node (using OpenAI/GPT-5.1). This critical step uses detailed system instructions to force the AI to produce seven distinct content variations in a strict JSON format.

  2. Formatting: The Format Document Content Code n8n node receives the AI's structured JSON output and formats it into a highly readable, human-friendly Markdown document, organizing all social media copy, subject lines, and scripts clearly.

  3. Google Docs Output: The Google Docs n8n node first Create Google Doc with the title provided by the workflow, then the Write Content n8n node inserts the full, formatted content.

  4. Completion: The final nodes prepare a clean response back to the user, providing the direct URL to the newly created Google Doc, successfully completing the n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the n8n Template: Copy the provided JSON data and import it directly into your n8n instance via the 'Workflows' section (Import from JSON).

  2. OpenAI Credential Setup: Locate the AI Content Generator n8n node. Click on the credential selector and connect your OpenAI API key. This n8n node requires access to a strong large language model (like GPT-4o or GPT-4).

  3. Google Docs Credential Setup: Locate the Create Google Doc n8n node and the Write Content n8n node. Set up or select an OAuth2 credential for Google Docs, granting it permissions to create and edit documents in your Google Drive.

  4. YouTube Credential (Optional): The Get YouTube Metadata n8n node is optional but highly recommended for richer video context. Set up a YouTube API key credential if desired.

  5. Activate: Save and activate the n8n workflow. You can then access the Content Input Form n8n trigger via its generated URL to begin repurposing content immediately.

Node Details


  • Content Input Form (n8n trigger): The entry point of the n8n workflow. It is a Form Trigger node that collects the source type (Blog URL, YouTube URL, Raw Text), the input content, and optional instructions for the AI.

  • Is Blog URL? / Is YouTube URL? (If nodes): Core logic n8n node pair used for routing the execution path based on the user's selected content type, ensuring the correct extraction mechanism is used.

  • Fetch Blog Page (HTTP Request n8n node): Retrieves the raw HTML content for blog URLs before processing.

  • Extract Blog Content (Code n8n node): This custom n8n node contains JavaScript logic to strip common HTML elements (navigation, footers, sidebars) and extract the cleaned, core article text and metadata (title, author, description).

  • Extract Video ID (Code n8n node): Parses the raw YouTube URL to isolate the necessary video ID for API calls.

  • AI Content Generator (OpenAI n8n node): The brain of this n8n workflow. It uses GPT-5.1 (or similar) with a complex system prompt and user input to generate seven distinct, platform-optimized content variations in a standardized JSON format.

  • Format Document Content (Code n8n node): Transforms the structured JSON output from the AI into a beautifully formatted, ready-to-use text document, complete with section headings and summaries.

  • Create Google Doc / Write Content (Google Docs n8n nodes): These sequential n8n node actions handle the final delivery, creating a new Google Doc and inserting the full repurposed content, completing the primary goal of the n8n workflow.

Related n8n Workflows

Free

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

🚀 Automate. Scale. Win. Are you still manually following up with leads or relying on staff to answer every call? I help agencies and business owners deploy AI voice agents and chatbots that book appointments 24/7, qualify leads instantly, and eliminate 90% of repetitive tasks—without writing a single line of code.

Featured*