Hi everyone,
I’m trying to set up automated LinkedIn posting via n8n using the LinkedIn Community Management API, but I’m running into issues and most tutorials online seem outdated.
Current situation:
Using n8n Cloud
Created a LinkedIn app with Community Management API access
OAuth setup is partially working, but I’m hitting issues with:
redirect_uri mismatch errors
API version errors (inactive versions)
confusion around correct organization URN format
What I’m trying to achieve:
Fully automated LinkedIn posts (text now, media later)
Triggered from my n8n workflows
Questions:
What is the current correct setup for LinkedIn OAuth in n8n?
What redirect URL should I use exactly for n8n Cloud?
Is the built-in LinkedIn node still working, or should I switch to HTTP requests?
Are there any up-to-date tutorials or working examples for this setup?
From what I’ve seen, a lot of tutorials are outdated due to API/version changes, and even the n8n LinkedIn node seems to run into version issues
Would really appreciate if someone who recently got this working could share their setup ![]()
Thanks!
Hey! I ran into the exact same headaches recently—LinkedIn’s API changes have made most older tutorials pretty unreliable.
Here’s what’s currently working for me:
OAuth + Redirect URL (n8n Cloud)
-
The correct redirect URL format is:
https://<your-subdomain>.n8n.cloud/rest/oauth2-credential/callback -
Make sure this exact URL is added in your LinkedIn app settings (no trailing slashes, must match exactly).
-
Also double-check you’re using the correct OAuth scopes (
w_member_socialfor posting on personal profile,w_organization_socialfor company pages).
redirect_uri mismatch
-
This usually happens if:
-
You copied the callback URL slightly wrong
-
You’re switching between HTTP/HTTPS
-
You have multiple credentials in n8n and the wrong one is being used
-
API version issues
-
LinkedIn deprecated a bunch of older versions, so avoid anything referencing
v2in older docs without context. -
Use the current endpoints like:
https://api.linkedin.com/rest/posts -
And include headers:
-
LinkedIn-Version: 202401(or latest supported) -
X-Restli-Protocol-Version: 2.0.0
-
URN format confusion
-
For personal posts:
urn:li:person:{personId} -
For organization posts:
urn:li:organization:{orgId} -
You can fetch these via
/meor organization lookup endpoints
n8n LinkedIn node
-
Honestly, it’s hit or miss right now due to version mismatches.
-
I recommend switching to the HTTP Request node—much more reliable and future-proof.
Working approach
-
Use OAuth2 credential in n8n (generic)
-
Use HTTP Request node:
-
Method: POST
-
URL:
https://api.linkedin.com/rest/posts -
Auth: OAuth2
-
Headers: as mentioned above
-
Body: JSON with author + commentary + visibility
-
If you want, I can share a ready-to-import n8n workflow for text posting ![]()
@lucmvandervliet-svg skip the built-in LinkedIn node, it’s been flaky with the newer API versions. just hit the rest api directly with an HTTP Request node, way more reliable and you control the version header yourself.
swap YOUR_ORG_ID with your actual org id, set up an OAuth2 generic credential with your linkedin app client id/secret, and make sure the scopes include w_organization_social. the LinkedIn-Version header is what fixes those inactive version errors — linkedin rejects anything without it now.