Generate article-based posts for LinkedIn, Twitter (X), and Reddit with OpenAI

Overview AI-powered workflow that transforms any article URL into platform-optimized social media posts for LinkedIn, Twitter (X), and Reddit. Uses Mozilla Readability for content extraction, multi-agent AI with RAG from viral LinkedIn post database, and interactive review forms for content refinement before auto-publishing.

Key Capabilities: Extracts article content: title, author, text, images, metadata Generates LinkedIn posts using 3-agent system with viral pattern matching Creates Twitter threads under 280 characters with article links Auto-posts to Reddit with AI-selected flairs Interactive review/regeneration workflow with feedback loops Auto-publishes with images or links to all platforms

How It Works

Stage 1: Article Content Extraction Form Submission: User enters article URL (with basic auth protection) URL Validation: Checks if valid URL format Article Scraping: HTTP request fetches HTML content Readability Parsing: Mozilla Readability extracts: Clean article text (removes ads, navigation, etc.) Title, author, excerpt Word count, site name Featured image (from og:image, twitter:image, or first img tag) Error Handling: Returns user-friendly error if scraping fails

Stage 2: LinkedIn Post Generation (3-Agent System)

Agent 1: LinkedIn Post Strategist Input**: Extracted article content (title, text, author, excerpt) RAG Process**: Queries Supabase vector database for similar viral LinkedIn posts Analysis**: Identifies patterns, hooks, formatting, engagement triggers Output**: Strategic insights and viral content patterns

Agent 2: LinkedIn Post Generator Input**: Article content + strategist insights Process**: Creates post using viral patterns from database Rule**: Must include article URL in post Output**: Draft LinkedIn post

Agent 3: LinkedIn Post Formatter Input**: Generated post Process**: Removes extraneous content Applies Sans Serif Bold Unicode for emphasis (๐—ฏ๐—ผ๐—น๐—ฑ ๐˜๐—ฒ๐˜…๐˜) Removes markdown/em dashes Ensures clean formatting Output**: Polished, ready-to-post LinkedIn content

Review Loop: User sees formatted post in web form Options: "Regenerate" or "Continue" If regenerate: Provide feedback โ†’ Agent creates new version Second review form with same options After 2 iterations or approval, proceeds to image selection

Stage 3: Image Handling for LinkedIn Image Preview: Shows extracted article image User Choice: "Yes" โ†’ Downloads image, posts with text + image "Continue without Image" โ†’ Posts with text + article link preview Auto-Publish: Posts to LinkedIn with selected format

Stage 4: Twitter (X) Post Generation Parallel process (runs alongside LinkedIn): Twitter Agent: Creates tweet under 280 characters (including spaces) Must include article URL Uses GPT-4.1 or GPT-5 models Tweet Review Form: User reviews generated tweet Regeneration Loop (if requested): User provides feedback Re-generate Tweet Agent creates new version Second review form Auto-Tweet: Posts with article image attachment

Stage 5: Reddit Post Automation Parallel process (runs alongside LinkedIn/Twitter): Subreddit Selection: User picks from dropdown (r/n8n, r/mcp, r/technews) Flair Retrieval: Fetches available flairs for selected subreddit via Reddit API AI Flair Selection: GPT-4o-mini analyzes article title + available flairs Selects most appropriate flair Auto-Post: Submits link post to Reddit with title and selected flair

How To Use

Prerequisites

API Credentials Required OpenAI API: GPT-4.1, GPT-5, GPT-5-mini, GPT-4o-mini access Supabase: Vector database with linkedin_post table (from previous workflow) LinkedIn OAuth2: Developer app with posting permissions Twitter OAuth2: Developer account with tweet permissions Reddit OAuth2: App credentials with submit permissions Basic Auth: For form password protection

Setup Steps

  1. Configure Form Access Open "On Article Submission" node Set up basic auth credentials for form protection Get form URL from webhook settings

  2. Link Vector Database Ensure Supabase vector store has viral LinkedIn posts (use previous workflow to populate) Verify "LinkedIn Post Vector Store" credentials Check "Embedding" node has OpenAI API key

  3. Set Up Social Media APIs

LinkedIn: Configure "Text + Image" and "Text + Link" nodes Update person parameter with your LinkedIn profile ID Add OAuth2 credentials

Twitter: Configure "Tweet" and "Re-generated Tweet" nodes Add Twitter OAuth2 credentials

Reddit: Update subreddit list in "Reddit Form" dropdown (customize to your subreddits) Configure "Get Flair", "Reddit Post" nodes with OAuth2 Update subreddit name in "Reddit Post" query parameters

  1. Configure AI Models Verify all OpenAI credentials in language model nodes Models used: GPT-4.1, GPT-5, GPT-5-mini (adjust based on your access)
0
Downloads
31
Views
8.54
Quality Score
intermediate
Complexity
Author:Bhavy Shekhaliya(View Original โ†’)
Created:2/13/2026
Updated:2/13/2026

๐Ÿ”’ Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments