Generate a custom n8n auto-posting workflow for any industry
1
Industry & Content
2
Content Sources
3
AI Provider
How to get your API key
4
LinkedIn Setup
How to get your LinkedIn token & Person ID
Go to linkedin.com/developers → Create App → under Products request "Share on LinkedIn" (auto-approved)
Under the Auth tab → add redirect URL: http://localhost:3000
Open this URL in your browser (replace CLIENT_ID with yours from the Auth tab): https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=CLIENT_ID&redirect_uri=http://localhost:3000&scope=w_member_social%20openid%20profile
After authorizing, your browser redirects to http://localhost:3000/?code=ABC123... — copy that full URL
Run this in your terminal to get the token (replace placeholders): curl -X POST https://www.linkedin.com/oauth/v2/accessToken --data-urlencode "grant_type=authorization_code" --data-urlencode "code=PASTE_CODE" --data-urlencode "redirect_uri=http://localhost:3000" --data-urlencode "client_id=YOUR_CLIENT_ID" --data-urlencode "client_secret=YOUR_SECRET"
Copy the access_token value from the response — paste it above
Get your Person ID by running: curl -H "Authorization: Bearer YOUR_TOKEN" https://api.linkedin.com/v2/userinfo
Copy the sub field value — paste it as Person ID above
Note: Token expires in 60 days — repeat steps 3–6 to refresh it
5
Posting Schedule
📥 How to import into n8n
Open n8n and go to Workflows
Click Add Workflow (or open an existing one)
Click the 3-dot menu (top right) → Import from file
Select the downloaded JSON file
Click Save, then toggle the workflow Active
The workflow will now run automatically at your chosen schedule