Generating and publishing LinkedIn content automatically with n8n and AI
Published 21 July 2026 · 5 min read
LinkedIn rewards consistency far more than a single great post: the algorithm favors accounts that publish often, and the real constraint for a technical freelancer or a small team is rarely a lack of ideas — it is the time between "I have an angle worth sharing" and "the post is live." Automating part of that gap with n8n and an LLM is tempting, but the trap is well known: a pipeline that publishes on its own eventually produces generic content, with no voice or point of view, and that shows within seconds of scrolling. This guide builds a pipeline that speeds up drafting without ever publishing without human sign-off — the only choice that keeps this kind of automation sustainable.
Why automate part of your LinkedIn presence (and where to stop)
Three concrete problems justify automating the draft, not the publish step:
- Consistency collapses during busy weeks. The weeks you need visibility most are exactly the weeks you have the least time to write — a weekly post generated from a pre-prepared topic list smooths that out.
- The gap between idea and draft is the real bottleneck. Many posts never get written not for lack of an idea, but because putting it into words takes twenty minutes nobody ever finds.
- Fully automated content shows. A pipeline that publishes without human review eventually produces generic phrasing, a misread piece of news, or a tone that doesn't sound like the person who supposedly wrote it — a credibility risk that regularity alone doesn't offset.
The goal isn't to put LinkedIn on autopilot, but to let AI handle the repetitive part — the first draft — while a human stays the sole decision-maker on what actually goes live.
The pipeline in four steps
1. A weekly trigger and a topic list
A Schedule Trigger (every Monday at 8am, for instance) kicks off the workflow. The topic source can be as simple as a pre-filled table in Airtable or Google Sheets, or fed automatically by an industry news feed aggregated with an RSS Feed Read node — the same pattern covered in our article on automated competitive monitoring with AI. Either way, the workflow picks one untreated topic for the week's iteration.
2. Drafting the post with an AI Agent node
An AI Agent node receives the selected topic (or news excerpt) along with a system prompt that explicitly defines the brand voice: tone, target length, hook structure, a handful of past posts as few-shot examples, and a blacklist of phrases to avoid ("In today's ever-changing world..."). The output stays a text draft, deliberately not yet publish-ready.
This is the stage where AI's time savings actually show up. An experimental study by Noy and Zhang, published in 2023 in the journal Science, compared college-educated professionals on writing tasks, half of them with access to ChatGPT: completion time dropped by 40% and perceived output quality rose by 18% on average, with the effect strongest among initially lower-performing writers (Noy & Zhang, 2023, Science). Two nuances matter for how we use this here: the measured gain applies to a first draft, not to publish-ready copy, and the study observed professionals who stayed in charge and reworked the model's output — exactly the role the next step preserves, not an automation that publishes unsupervised.
3. Mandatory human review before publishing
The draft never goes straight to LinkedIn. It gets routed to Slack (or email) for review, reusing the human-in-the-loop pattern detailed in our article on human approval with the Wait node and Slack buttons: a Wait node in On Webhook Call mode pauses the workflow, a Slack message presents the draft with "Publish" / "Edit" / "Reject" buttons, and only an explicit action resumes the workflow through that execution's resumeUrl. This step, more than any prompt tweak, is what determines whether the automation stays sustainable over time — it leaves room to fix a phrase, add a personal anecdote, or simply say no.
4. Publishing through the LinkedIn API
There is no complete native node for organic publishing on LinkedIn in n8n — the API's scope and its versioning headers move too fast for a generic node to cover fully. An HTTP Request node with a POST to https://api.linkedin.com/rest/posts does the job:
POST https://api.linkedin.com/rest/posts
Headers:
Authorization: Bearer <access_token>
LinkedIn-Version: 202601
X-Restli-Protocol-Version: 2.0.0
Content-Type: application/json
Body (JSON):
{
"author": "urn:li:person:{{ $json.personUrn }}",
"commentary": "{{ $json.approvedPost }}",
"visibility": "PUBLIC",
"distribution": { "feedDistribution": "MAIN_FEED" },
"lifecycleState": "PUBLISHED"
}
For the credential, use a generic OAuth2 setup (n8n's Generic Credential Type → OAuth2 API) configured with LinkedIn's authorization and token URLs, and the w_member_social scope. LinkedIn access tokens typically expire after 60 days: if your app has been issued a refresh token, n8n renews it automatically on the next expired call; if not, set up a scheduled reminder to re-authenticate manually before the deadline, rather than finding out on a Monday morning.
Useful variations
- Generating an accompanying image: an image-generation node (for example the OpenAI node's Image resource, or any equivalent) produces a visual from a summary of the post, then uploads it through LinkedIn's
/rest/imagesendpoint before referencing it in the post body. - Turning a blog post into a LinkedIn summary: instead of starting from a raw topic, the AI Agent receives the full content of an already-published article and generates a punchy 3-4 sentence summary with a link — a simple way to give an existing piece a second life without starting from scratch.
Keep AI as an accelerator, not an autopilot
Once the pipeline is running, the temptation is to drop the review step to save even more time. That is exactly when the risk of generic content becomes real again: an unchecked LLM reproduces phrasing that shows up identically across dozens of profiles, and nothing stops it from misreading a piece of technical news. Human review isn't a temporary friction point until the prompt gets good enough — it's the piece that keeps what goes live sounding like the person whose name is on it.
Wrapping up
The pipeline comes down to four key nodes: Schedule Trigger for cadence, AI Agent for the first draft, Wait plus Slack for sign-off, and HTTP Request for publishing through the LinkedIn API. The time savings are real and measured — but they apply to the draft, not the editorial judgment, which stays human at every iteration.
FAQ
Frequently asked questions
Is there a native LinkedIn node in n8n for publishing posts?
n8n ships a LinkedIn node, but its coverage of organic publishing is limited and it does not expose every option of the current API (visibility, distribution, attachments). For full control over the request body, an HTTP Request node against the LinkedIn REST API remains the more reliable, better-documented approach.
What is the risk of publishing 100% AI-generated content without review?
The content becomes recognizably generic within seconds of scrolling: boilerplate phrasing, no real point of view, and occasionally a factual slip on a technical topic. On LinkedIn, where personal credibility is the main asset, that risk far outweighs the time saved if no human review sits before publication.
How do I handle LinkedIn OAuth2 token refresh in n8n?
LinkedIn access tokens typically expire after 60 days. If your app has been issued a refresh token, n8n's generic OAuth2 credential renews it automatically once the token expires. If your API product does not issue one, set up a scheduled reminder (a monthly Schedule Trigger sending a notification) to re-authenticate manually before expiry, rather than discovering the block right when you need to publish.
Can I post to a company page instead of a personal profile?
Yes, the mechanics are identical but the URN changes: instead of urn:li:person:{id}, the post's author becomes urn:li:organization:{id}, and the authorization must include the w_organization_social scope along with page admin rights. The rest of the pipeline (generation, review, API call) stays the same.
How much time does AI actually save on writing a post?
A 2023 experimental study on comparable professional writing tasks measured a 40% reduction in completion time when workers had access to an LLM, with the effect strongest among initially lower performers. The gain applies to the first draft, not to a publish-ready piece — which is exactly why the review step stays in the pipeline.
Bundle FlowKit Complet
€269