How to Auto-Post WordPress Articles to LinkedIn & X Using n8n (Free JSON Template)

Promoting blog posts across social media channels like LinkedIn and X (formerly Twitter) can easily devour hours of manual work every week. By using n8n, you can build an automated content distribution pipeline that instantly shares your new WordPress articles the moment they go live.

In this guide, you will learn how to trigger an n8n workflow using WordPress RSS feeds or Webhooks, format post summaries using AI, and automatically publish updates to LinkedIn and X—complete with a free downloadable JSON template.


Prefer watching? Check out this social media automation tutorial from Hostinger Academy, or follow our detailed step-by-step guide below.


Prerequisites

To follow this guide, you will need:

  • An active WordPress website (with RSS feed enabled or REST API access).
  • A running n8n instance (Self-hosted via Docker or Cloud).
  • Developer access / API credentials for LinkedIn and X (Twitter).

Workflow Architecture Overview

The automated pipeline operates in four main stages:

  1. Trigger (RSS Feed Trigger): Polls your WordPress RSS feed (e.g., https://yourdomain.com/feed/) every 15 minutes for new posts.
  2. Formatter (Code Node / OpenAI): Extracts the article title, permalink, and generates an engaging short social caption with hashtags.
  3. LinkedIn Node: Posts the updates directly to your personal LinkedIn profile or Organization Page via OAuth2.
  4. X (Twitter) Node: Sends a tweet containing the article title and URL using the official X API.

Step 1: Setting Up the WordPress RSS Trigger in n8n

Instead of setting up complex webhooks inside WordPress, the simplest method is using n8n's native RSS Read node:

  1. Add an RSS Read node to your canvas.
  2. Set the URL parameter to your WordPress feed URL: https://yourdomain.com/feed/.
  3. Set the poll interval to check every 15 minutes.
// Example output parameters from RSS Node
{
  "title": "How to Install n8n Locally with Docker Desktop",
  "link": "https://promptlogic.com/2026/10/how-to-install-n8n-locally-docker-desktop.html",
  "contentSnippet": "Self-hosting n8n locally using Docker Desktop is the fastest way..."
}

Step 2: Connecting LinkedIn & X API Nodes

LinkedIn Setup

Connect your LinkedIn OAuth2 credential in n8n. Select the Create a Post action, set the Person/Organization context, and map the text payload to incorporate your RSS title and link variables.

X (Twitter) Setup

Add the X Node with OAuth 1.0a or OAuth 2.0 user credentials. Set the action to Create Tweet and pass the formatted string limited to 280 characters.


Step 3: Download the Free n8n JSON Template

Skip manual node creation by importing our pre-configured workflow JSON file directly into your n8n canvas:

Copy the JSON snippet above and paste it into your n8n editor using Ctrl + V (or Cmd + V).


Troubleshooting & Tips

  • Duplicate Post Prevention: Enable the "Only Keep Unique" toggle inside the RSS node to prevent republishing existing articles.
  • Rate Limits: Ensure your X API account tier allows automated posting frequency (Free Tier supports basic automated tweet creation).

Related Guides

Post a Comment for "How to Auto-Post WordPress Articles to LinkedIn & X Using n8n (Free JSON Template)"