Every time you publish a blog post on WordPress, this workflow automatically creates unique, platform-optimised captions for Facebook, Instagram, Twitter and LinkedIn — and publishes them all simultaneously without any manual effort.
Built for content creators, digital marketing agencies, SEO agencies, bloggers, and businesses that publish blog content regularly and want to maximise reach across social media without spending hours manually writing different versions for each platform.
Most businesses publish a blog post and then either copy and paste the same text to every social media platform — which performs poorly because each platform has different audience expectations, character limits, tone and algorithm preferences — or they skip social media promotion entirely because writing four different captions for one post takes too much time.
The result is wasted content. Hours of writing a great blog post go unnoticed because the distribution is manual, inconsistent, or nonexistent.
This workflow solves that completely. One WordPress publish triggers everything. The AI writes platform-specific captions that actually match how each platform works. Every post gets promoted everywhere automatically.
Step 1 — WordPress Webhook Trigger
The workflow starts the instant you publish a post on WordPress. This requires a webhook plugin installed on your WordPress site — the recommended free option is WP Webhooks (available on WordPress.org plugin directory). When you publish or update a post to published status, WP Webhooks sends a POST request to your n8n webhook URL with the full post data including title, content, permalink, thumbnail URL, and post type.
No polling. No scheduled checks. The workflow fires in real time the moment your post goes live.
Step 2 — Post Type and Status Filter
Before any processing happens, the workflow checks two conditions:
post (not page, product, or custom post type)publish (not draft, pending, or scheduled)This ensures the workflow only runs for actual published blog posts and ignores everything else — drafts, page updates, WooCommerce products, and any other WordPress content types.
Step 3 — HTML to Markdown Conversion
WordPress post content arrives as raw HTML with tags, shortcodes, and formatting markup. Before sending this to an AI model, the workflow converts the HTML content to clean Markdown text using the built-in Markdown node. This removes HTML tags, cleans up formatting, and gives the AI clean, readable text that produces significantly better caption quality than feeding raw HTML.
Step 4 — Data Normalization
A Set node extracts and organises all the data needed for the rest of the workflow into clean variables:
post_title — the blog post titlepost_content — the cleaned Markdown contentpost_link — the full permalink URL to the published postpost_thumbnail — the featured image URL used for visual posts on Facebook and Instagramfacebook_page_id — your Facebook Page ID for the Graph API callinstagram_id — your Instagram Business Account ID for the Graph API callStep 5 — AI Caption Generator
An AI agent powered by OpenRouter (GPT-4o) reads the post title, link, and the first 800 characters of the post content, then generates four completely different captions — one for each platform — in a single API call.
Each caption is written according to strict platform-specific guidelines:
Twitter/X caption: Maximum 220 characters. One punchy insight or hook from the post. One to two hashtags only. Ends with the post link. Short, direct, and conversational.
Facebook caption: Starts with a bold question or statement. Three to five bullet points of what readers will learn. Ends with the post link. Friendly and conversational tone. Maximum three hashtags.
Instagram caption: Opens with a bold hook in the first 125 characters to survive the truncation. Three to five key takeaways as short bullet points. Ends with "Link in bio to read the full guide." Three to five relevant hashtags. Does not include the URL in the body since Instagram does not make links clickable in captions.
LinkedIn caption: Professional tone throughout. Hook or surprising statement to open. Three to four short paragraphs covering the problem, what the post covers, the key insight, and a call to action with the link. Two to three professional hashtags. Between 800 and 1200 characters total for maximum LinkedIn algorithmic reach.
The output is enforced as strict JSON via a Structured Output Parser — ensuring reliable, parseable data for the downstream publishing nodes every time.
Step 6 — Simultaneous Publishing to All Platforms
After caption generation, the workflow publishes to all four platforms in parallel:
Twitter/X: The Twitter node posts the caption directly using OAuth2 authentication. No additional steps required.
Facebook: An HTTP Request node calls the Facebook Graph API /{page_id}/photos endpoint, sending the Facebook caption as the message and the WordPress featured image URL as the photo. This creates a photo post with the caption on your Facebook Page, which performs significantly better than link-only posts in terms of reach and engagement.
Instagram: Instagram publishing requires two steps as per the official Meta Graph API requirements. First, an HTTP Request node calls /{instagram_id}/media to create a media container with the caption and featured image URL. Second, another HTTP Request node calls /{instagram_id}/media_publish with the container ID returned from the first step. This is the official two-step publishing flow required by Meta.
LinkedIn: The thumbnail image is first downloaded via an HTTP Request node (LinkedIn requires binary image data, not just a URL). Then the LinkedIn node creates a post using the downloaded image binary along with the LinkedIn caption. The post is published to your company organisation page using OAuth2 authentication.
This workflow requires a webhook plugin installed on your WordPress site to send post data to n8n when a post is published.
Recommended: WP Webhooks (Free)
Available at wordpress.org/plugins/wp-webhooks
After installing WP Webhooks on your WordPress site:
The plugin will send a POST request to n8n with the full post data every time you publish a blog post.
Alternative options:
transition_post_status hook if you prefer a code-based approachYour n8n webhook node expects this data structure from WordPress:
{
"post": {
"post_title": "Your Blog Post Title",
"post_content": "<p>Your full HTML post content</p>",
"post_type": "post",
"post_status": "publish"
},
"post_permalink": "https://yoursite.com/your-post-slug/",
"post_thumbnail": "https://yoursite.com/wp-content/uploads/featured-image.jpg"
}
The exact field names depend on which WordPress webhook plugin you use. Adjust the Set node field mappings to match the payload structure sent by your chosen plugin.
facebook_page_id value in the Clean Data node with your actual Facebook Page IDinstagram_id value in the Clean Data node with your actual Instagram Business Account IDBuilt with Meta Graph API v25.0, OpenRouter, Twitter API v2, and LinkedIn API. Compatible with any WordPress site running version 4.7 or above with the WordPress REST API enabled.