AI-Powered Social Media Content Syndication from WordPress - n8n Workflow

Use this comprehensive n8n workflow to automate publishing WordPress content to X, LinkedIn, Facebook, and Instagram. It uses an n8n node AI chain to generate platform-optimized captions and images.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content managers and marketing teams who need to syndicate WordPress content efficiently.

  • Automation specialists looking for advanced n8n templates integrating LangChain/LLMs with social platforms.

  • Businesses seeking to optimize social engagement with platform-specific AI content generation.

  • Users needing a robust n8n workflow solution for cross-platform publishing and tracking.

Overview

Managing content syndication across X, LinkedIn, Facebook, and Instagram is time-consuming. This sophisticated n8n workflow solves this by fully automating the process, ensuring brand consistency while adhering to platform-specific best practices. Instead of manually drafting unique captions for each channel, this n8n template uses a specialized LangChain setup powered by OpenRouter and OpenAI to ingest a WordPress article and output four distinct, highly optimized captions, alongside two custom-sized images (one for Instagram, one for Facebook/LinkedIn).

This specific n8n workflow not only generates the content but handles the entire publishing sequence via dedicated n8n node connections and uses Google Sheets to manage and track which posts have been successfully published on which platform, making it a complete, end-to-end automation solution.

How it Works

The automation begins with the execution of the n8n trigger, which initiates the flow, typically when clicking ‘Test workflow’ or when scheduled.


  1. Input Retrieval: The initial n8n node is Google Sheets, which looks up a specific row in the 'Social Media post' sheet. This row must contain the WordPress Post ID that needs processing.

  2. Content Fetching: The WordPress n8n node uses the retrieved Post ID to fetch the title and full content of the article.

  3. AI Generation Chain: The data flows into the core of the n8n workflow: the 'Social Media Manager' chain. This chain uses the OpenRouter Chat Model (e.g., Gemini) and is governed by the 'Structured Output Parser' n8n node, which forces the AI to produce platform-specific content (Twitter/X, Facebook, LinkedIn, Instagram) in a precise JSON structure.

  4. Image Creation: The workflow branches to two separate OpenAI n8n nodes to generate custom images based on the generated captions, ensuring optimal sizing for Instagram (1024x1024) and Facebook/LinkedIn (1792x1024).

  5. Parallel Publishing: The workflow simultaneously publishes content across all four channels using dedicated n8n node connections:

X (Twitter) publishes the short, concise text.
LinkedIn and Facebook publish their respective captions along with the larger generated image.
* Instagram uses an HTTP Request n8n node (utilizing the Facebook Graph API) to create a media container using the square image URL and the Instagram-optimized caption.

  1. Status Tracking: Upon successful publication by each social media n8n node (X, Facebook, LinkedIn, Instagram), a corresponding Google Sheets n8n node updates the originating row, marking that platform as successfully posted ('x'). This tracking mechanism ensures the integrity of the n8n workflow.

Installation Guide

To implement this n8n workflow template, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'Import Workflow' function.

  2. Set up Credentials: You will need to configure credentials for the following services (as indicated in the specific n8n node settings):

Google Sheets OAuth2 API (for reading the post ID and updating status).
WordPress API (to access your blog content).
OpenRouter API and OpenAI API (for the generative AI steps).
X (Twitter) OAuth2 API, LinkedIn OAuth2 API, and Facebook Graph API (for publishing).

  1. Configure Google Sheet: Clone the linked Google Sheet (referenced in the Sticky Note3) and update the 'Google Sheets' n8n node to point to your new document ID. Ensure you populate the 'POST ID' column with the WordPress ID you wish to process.

  2. Review AI Chains: The 'Social Media Manager' n8n node contains detailed system instructions. Review and adjust these instructions if your specific brand tone or platform requirements differ.

  3. Test: Execute the n8n trigger manually to ensure all connections and publishing nodes function correctly.

Node Details

Manual Trigger (n8n trigger): Starts the n8n workflow execution.
Google Sheets (n8n node): Initially retrieves the row containing the WordPress post ID and its row number. It is used repeatedly later to mark completion statuses (X OK, Facebook Ok, etc.).
Get Post (WordPress n8n node): Fetches the full title and content from the specified WordPress post, providing the raw material for the AI.
Social Media Manager (LangChain n8n node): The core intelligence. This n8n node takes the WordPress content and uses sophisticated prompts to generate four distinct social media captions tailored for X, Facebook, LinkedIn, and Instagram, leveraging the connected OpenRouter Chat Model.
Structured Output Parser (LangChain n8n node): Ensures the AI output from the preceding n8n node strictly conforms to a JSON schema, separating the captions for each platform.
OpenAi (Image Generation n8n node): Two instances are used to generate visual content: one optimized for Instagram (square) and one for Facebook/LinkedIn (horizontal), based on the generated captions.
Publish on X (Twitter n8n node): Publishes the short, impactful caption to Twitter/X.
Publish on Facebook (Facebook Graph API n8n node): Posts the generated image, caption, and link to the Facebook page.


  • Publish on Instagram (HTTP Request n8n node): Used to interface with the Instagram Content Publishing API (part of the Facebook Graph) to schedule or publish the generated image and caption.

Related n8n Workflows

Free

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

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza

Featured*