AI-Powered LinkedIn Post Automation
AI Automation / Social Publishing / n8n
A workflow that automates publishing to a LinkedIn company page end to end. A webhook receives the post type — text, article, image or video — with the required content, and the flow handles everything from input validation through to final posting.
- Year
- 2025
- Role
- Automation engineer
- Source
- Public repository
Technologies
- n8n
- LinkedIn API
- Webhooks
- Validation
- Automation
The problem
Publishing to a company page by hand does not scale, and the LinkedIn API treats every post type differently. Text, article, image and video each need their own payload shape and upload sequence.
The solution
One webhook entry point that branches by post type. Each branch validates the fields that type actually requires, performs any upload the type needs, and then posts — so callers submit content without knowing LinkedIn's rules.
Architecture
How it is put together.
Webhook intake
A request arrives carrying the post type and its content.
Validation
Required fields for that specific post type are checked before anything is sent.
Type routing
The flow branches to the text, article, image or video path.
Media handling
Image and video posts run the required upload and registration sequence.
Publish
The post is published to the company page and the result is returned.
Key features
What it actually does.
- Single endpoint for four different post types
- Per-type validation before any API call
- Media upload handling for image and video posts
- Clear error responses on invalid input
Engineering challenges
The parts that were hard.
Four APIs wearing one name
Each post type has a different contract. The routing layer exists so that complexity does not leak to whoever is calling the webhook.
Failing early
Validating before upload avoids half-published state when a payload is incomplete.
Outcomes
What came out of it.
Qualitative outcomes only — no invented benchmarks or metrics.
Company page publishing reduced to a single API call
Invalid payloads rejected before they reach LinkedIn
All four post types supported through one interface
Next project
Automated WordPress Post Creation
Webhook-driven post creation with payload validation, credential checks and image handling.
Let’s build
Want something like this for your business?
Tell me the problem and I will come back with an architecture, a scope and a timeline.