Automatic AI Social Media Posting for WordPress - n8n Workflow

Automate WordPress content distribution using this powerful n8n workflow. Leverage Gemini AI to create platform-specific posts for Twitter, LinkedIn, and Facebook via the Blotato n8n node.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content managers and bloggers who need to automate content amplification.

  • Marketing teams seeking efficient n8n templates for social distribution.

  • Users interested in integrating advanced AI (Gemini) with traditional CMS platforms.

  • Automation enthusiasts looking for complex social media n8n workflow examples.

Overview

Manually drafting social media updates for every new blog post is time-consuming and often leads to non-optimized content. This sophisticated n8n workflow solves this problem by creating an automated publishing pipeline. Utilizing a scheduled n8n trigger, the system monitors WordPress for new articles. If a new post is detected, the workflow leverages the power of the Google Gemini LLM via a specialized n8n node to generate unique, platform-specific copy for Twitter, LinkedIn, and Facebook. Finally, it uses the Blotato service to reliably queue and publish the optimized content. This robust n8n workflow ensures consistent content distribution, saves significant time, and guarantees that every new article gets maximum exposure using tailor-made social posts.

How it Works

This automation operates on a recurrent schedule, initiating a sequence of checks and creative processes:


  1. Scheduled n8n Trigger: The workflow begins every 30 minutes via the Schedule n8n trigger, ensuring timely checks for new content.

  2. WordPress Check: The WordPress n8n node retrieves all recent posts from the configured site.

  3. Post Filtering: An IF n8n node checks if the total number of items retrieved is greater than zero, allowing the workflow to proceed only when new posts are available.

  4. Item Splitting: The Split Out n8n node ensures that each new WordPress post is processed individually.

  5. AI Content Generation: The LangChain Agent n8n node, powered by the Google Gemini Chat Model, is executed. It takes the full content of the blog post and follows a prompt to return a single, structured JSON object containing tailored posts for Twitter, LinkedIn, and Facebook. This is the core intelligence of the n8n workflow.

  6. Data Parsing: A Code n8n node carefully parses the AI's JSON output, handling any potential markdown formatting issues and mapping the platform-specific text (e.g., {{$json.twitter}}) to easily accessible fields.

  7. Social Publishing: Three subsequent Blotato n8n nodes receive the parsed data and publish the unique content to Twitter, LinkedIn, and Facebook, completing the automated social media posting cycle established by this n8n template.

Installation Guide

To set up this powerful n8n workflow using the provided n8n templates, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it directly into your n8n instance.

  2. WordPress Credentials: Configure the 'Check New Posts' WordPress n8n node with your WordPress site URL, username, and Application Password.

  3. Google Gemini Setup: Configure the 'Google Gemini Chat Model' n8n node with your API key. This is essential for the 'AI Social Content Creator' n8n node to function.

  4. Blotato Credentials: Set up your Blotato API credentials within n8n. These credentials will be used by the three social posting n8n nodes ('Create post Twitter', 'Create post LinkedIn', 'Create post Facebook').

  5. Platform Mapping: In each Blotato n8n node, select the specific social account ID that corresponds to the target platform (Twitter, LinkedIn, Facebook).

  6. Activate: Save the n8n workflow and toggle the main n8n trigger to 'Active'.

Node Details

This n8n workflow relies on several core and community n8n node integrations:

Every 30 Minutes (Schedule n8n Trigger):
Function: Serves as the primary n8n trigger, initiating the content check on a fixed, recurring basis.
Key Configuration: Set to run every 30 minutes.
Check New Posts (WordPress n8n Node):
Function: Connects to the WordPress API to retrieve the latest posts for analysis by the n8n workflow.
Key Configuration: Operation set to getAll to fetch content.
AI Social Content Creator (LangChain Agent n8n Node):
Function: Orchestrates the AI request, defining the persona (social media manager) and the required output structure (strict JSON).
Key Configuration: System Message demanding strict JSON output optimized for Twitter, LinkedIn, and Facebook.
Google Gemini Chat Model (LLM n8n Node):
Function: Provides the language generation capabilities used by the LangChain Agent n8n node.
Parse Social Content (Code n8n Node):
Function: Critical transformation step. It parses the raw JSON output from the AI, stripping markdown formatting (```json), and restructuring the data items for downstream publishing n8n nodes.
Key Configuration: Custom JavaScript code handles parsing and fallback content generation if the AI fails to produce perfect JSON.
Create post [Platform] (Blotato n8n Node):
Function: Handles the final API calls to Blotato, queueing or instantly publishing the AI-generated, platform-optimized social content.
* Key Configuration: postContentText dynamically mapped using expressions like ={{$json.twitter}} and configured for the specific platform (LinkedIn, Facebook, Twitter).

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
David Olusola
David Olusola

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - [email protected]

Featured*