See llms.txt for all machine-readable content.
Every time a post goes live on your WordPress site, this workflow shares it on LinkedIn, X and a Facebook Page. WordPress calls the workflow once per post, so there is no schedule to tune and no table of already-posted IDs to keep.
{"post_id": 123} from WordPress. Header Auth keeps the endpoint private./wp-json/wp/v2/posts/123?_embed=wp:featuredmedia on your site. Published posts are public, so no WordPress credentials are needed.title, summary, url and image_url: it strips the HTML from the excerpt, decodes entities and takes the featured image if there is one.X-Webhook-Token) and copy the production URL.w_member_social scope (LinkedIn Posts API) and connect it on Publish on LinkedIn and Publish Link on LinkedIn. The app needs two products: Share on LinkedIn and Sign In with LinkedIn using OpenID Connect. In the n8n credential, turn off Legacy and Organization Support before you connect, or LinkedIn rejects the scopes they add. Then pick your profile under Person on both LinkedIn nodes. To post as a company page, switch both nodes to Organization, keep Organization Support on and get the Community Management API approved for your app.YOUR_PAGE_ID with your Page ID. It must be the Page token, not your user token: with a user token the node fails with a plain "Forbidden". If me/accounts comes back empty for a Page owned by a business portfolio, read the token from the Page itself with GET /{page-id}?fields=access_token.{"post_id": 123} to the webhook URL when a post is first published. The free Webhook Actions plugin does it without code: new webhook on publish_post, map args.1.ID to post_id, attach the header credential, and add the condition args.2 not equals publish so editing a live post does not share it again. A short PHP snippet that does the same is under Additional info.title and summary.Who is this for. Anyone who publishes on WordPress and wants each new article shared on the three networks without a per-network WordPress plugin. It also fits agencies that run n8n for several client sites: the only per-site value is the URL in the Settings node.
WordPress side without a plugin. Put this in functions.php or a custom plugin. Replace the URL and the token with yours (the token must match the Header Auth credential in n8n):
add_action( 'publish_post', function ( $post_id, $post, $old_status ) {
if ( 'publish' === $old_status ) {
return; // editing an already published post must not share it again
}
$payload = [];
$payload['post_id'] = $post_id;
$args = [];
$args['headers']['Content-Type'] = 'application/json';
$args['headers']['X-Webhook-Token'] = 'YOUR-TOKEN';
$args['body'] = wp_json_encode( $payload );
$args['blocking'] = false; // do not make the editor wait for n8n
wp_remote_post( 'https://YOUR-N8N/webhook/wordpress-post-published', $args );
}, 10, 3 );