Auto-Share New WordPress Posts to Your LinkedIn Company Page
Every time you publish a new post on WordPress, this workflow automatically shares it to your LinkedIn Company Page with the post title and link. No more manual copy-pasting — your content reaches LinkedIn the moment it goes live.
- 1
Trigger: Poll your WordPress RSS feed
Add an
RSS Feed Triggernode. Set theFeed URLfield to your WordPress RSS feed, typicallyhttps://yourdomain.com/feed. SetPoll Timesto every 15 minutes. This node fires whenever a new post appears in the feed. - 2
Extract the post details you need
Add a
Setnode connected to the RSS trigger. Create two fields:postTitlemapped to{{ $json.title }}andpostLinkmapped to{{ $json.link }}. This cleans up the data before sending it to LinkedIn. - 3
Post to LinkedIn Company Page
Add an
HTTP Requestnode connected to the Set node. SetMethodto POST andURLtohttps://api.linkedin.com/v2/ugcPosts. UnderAuthenticationchooseHeader Authand add a headerAuthorizationwith valueBearer YOUR_LINKEDIN_ACCESS_TOKEN. SetBody Content Typeto JSON and paste the body:{ "author": "urn:li:organization:YOUR_ORG_ID", "lifecycleState": "PUBLISHED", "specificContent": { "com.linkedin.ugc.ShareContent": { "shareCommentary": { "text": "New post: {{ $json.postTitle }} {{ $json.postLink }}" }, "shareMediaCategory": "NONE" } }, "visibility": { "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC" } }. ReplaceYOUR_ORG_IDwith your LinkedIn Company numeric ID andYOUR_LINKEDIN_ACCESS_TOKENwith a valid token from the LinkedIn Developer portal.
Frequently asked questions
How do I find my LinkedIn Company Page Organization ID?
Log into LinkedIn, go to your Company Page, then click Admin tools > Edit page. Look at the URL — it will contain a number like `/company/12345678/`. That number is your Organization ID to use in `urn:li:organization:12345678`.
How do I get a LinkedIn Access Token?
Go to https://www.linkedin.com/developers, create an app, request the `w_member_social` and `r_organization_social` permissions, then use the OAuth 2.0 flow to generate an access token. Tokens expire, so consider using n8n's built-in LinkedIn OAuth2 credential if available in your version.
Will this post old WordPress articles that already exist?
No. The RSS Feed Trigger node only fires for items that appear after the workflow is activated. Existing posts that were already in the feed when you first turn it on will not be reposted.