Publish LinkedIn text, image, or video posts from a webhook

Go to Workflow
0 views
Built by Wolfgang Renner Wolfgang Renner
Created on October 12, 2026

Description

Quick Overview
This workflow receives a webhook request and publishes a LinkedIn post as text-only, with up to 20 images, or with a native video by downloading media from provided URLs and posting via the LinkedIn REST/UGC APIs, then returning the created post URL.

How it works
Receives a POST request on a webhook containing post text plus either an array of image URLs or a single video URL.
Validates and normalizes the input (required text, LinkedIn author ID/person URN, and mutual exclusivity of images vs video).
If a video URL is provided, it registers a LinkedIn video upload, downloads the video file, uploads it to LinkedIn, and creates a public video post via the LinkedIn UGC API.
If one or more image URLs are provided, it registers image uploads with LinkedIn, downloads each image, uploads them to LinkedIn, and builds a single-image or multi-image post payload for the LinkedIn Posts API.
If no media is provided, it builds a text-only payload for the LinkedIn Posts API.
Creates the LinkedIn post, extracts the post URN from the response headers, and responds to the webhook with the public LinkedIn post URL or returns an error message if LinkedIn rejects the request.

Setup
Create a LinkedIn app with the Share on LinkedIn product, then add a LinkedIn OAuth2 credential in n8n with the required permissions (for example, w_member_social) and apply it to the LinkedIn HTTP requests.
Set your LinkedIn person ID in the workflow’s settings step (or provide author_id in the webhook body) so the workflow can build the correct urn:li:person:* author URN.
Expose the webhook URL from n8n and configure your caller to POST JSON such as {"text":"Hello","image_urls":["https://.../a.png"]} or {"text":"Hello","video_url":"https://.../v.mp4"}.
Ensure your image/video URLs are publicly reachable by n8n so the workflow can download the files before uploading them to LinkedIn.
Review and update the configured LinkedIn API version header as needed to match LinkedIn’s supported monthly version.

This workflow was created by Wolfgang Renner and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (2)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest