Hey n8n friends!
I’m Adam, a product-manager moonlighting as an automation tinkerer, and I’ve hit a wall trying to publish LinkedIn posts from n8n. I’ve burned the better part of an evening on this, so I’m laying out the full saga in hopes someone can spot what I’m missing.
Setup
• n8n Cloud v1.90.1
• HTTP Request node v4.2
• LinkedIn OAuth2 credential shows scopes openid, profile, w_member_social
• LinkedIn app has Sign-in with LinkedIn (OIDC) and Share on LinkedIn enabled
• Person URN I’m posting as: urn:li:person:xxxxx
(from /v2/userinfo
)
• Company Page URN I admin: urn:li:organization:123456
• My n8n login email ≠ LinkedIn email, but I authenticate with the correct LI profile during OAuth.
What I tried
- UGC Posts v2 (
/v2/ugcPosts
)
• Body: LinkedIn’s sample with my Person URN.
• Header:LinkedIn-Version: 202504
(also tried older ones).
• Result:422
– “author … does not match urn:li:company|member”.
• Same 422 when I swapped in the org URN.
• Realised UGC wants the old numericurn:li:member:<digits>
ID that the modern API doesn’t expose. - REST Posts (
/rest/posts
)
Body used LinkedIn’s new format:
json
CopyEdit
{
"author": "urn:li:person:xxxx", // also tried org URN
"commentary": "Posting via n8n 🚀",
"lifecycleState": "PUBLISHED",
"visibility": "PUBLIC",
"distribution": { "feedDistribution": "MAIN_FEED" }
}
Tried every header combo I could think of:
– No LinkedIn-Version → 400 VERSION_MISSING
– 202504 → 403 Forbidden
– 202402, 202401, 202310, 202306 → 426 NONEXISTENT_VERSION every time.
Exactly the same results whether the author is a person URN or an organization URN.
3. Sanity checks
• /v2/userinfo
with the same token returns my profile (so token is valid).
• OAuth credential re-connected after adding Share-on-LinkedIn; consent screen shows “post, comment and react on your behalf.”
• Removed any hidden whitespace from header names.
• Tried the same calls with raw cURL outside n8n – identical 400/403/426 chain.
Where I’m stuck
- UGC v2 demands a numeric
member
URN I can’t obtain. - REST refuses every version I give it, but also refuses if I omit the header.
- Both personal and company posts fail, so it feels like a global version or permission mismatch.
What I’m asking for
- Has anyone posted to any LinkedIn feed (personal or company) via
/rest/posts
in 2024/25? - Which
LinkedIn-Version
values are actually accepted right now? - Is there any documented way to fetch the numeric
urn:li:member:<digits>
ID, or is that strictly partner-API territory now? - Is there an n8n node or community package that already handles LinkedIn posting without all this header drama?
Screenshots, working cURL, random theories—everything helps. Thanks a ton in advance!