Generate LinkedIn carousels from articles with OpenAI GPT-4o-mini

Go to Workflow
0 views
Built by Juan Carlos Gonzalez Juan Carlos Gonzalez
Created on July 23, 2026

Description

Quick overview
Send article text or a URL to generate a validated LinkedIn carousel with an exact slide count, caption, hashtags, alt text, and Canva-ready copy. The workflow only prepares content; it does not publish to LinkedIn.

How it works
Receives a POST request containing article text or a URL, plus optional language, audience, and slide count.
Normalizes the input, validates that a source is present, and constrains the requested slide count to 5–10.
If a URL is provided, fetches the page and extracts readable text from the returned HTML.
Sends the source content and formatting requirements to OpenAI to generate structured carousel JSON.
Parses the response, keeps exactly the requested number of slides, normalizes the language and audience, and creates Canva-ready copy.
Validates the final carousel and returns the structured result through the webhook response.

Setup
Create an OpenAI API credential in n8n and select it in the OpenAI node.
Activate the workflow and copy the production webhook URL. Send a POST request containing text or articleText/content, or url/articleUrl.
Optionally provide language, audience, and slideCount. slideCount must be between 5 and 10; the default language is Spanish and the default audience is B2B content creators and consultants.

Requirements
An OpenAI API credential with permission to make chat completion requests.
A client or automation capable of sending POST requests to an n8n webhook.
For URL inputs, the article must be publicly reachable and return readable HTML.

Customization
language: output language code, such as es or en.
audience: target audience for the carousel.
slideCount: exact number of slides, from 5 to 10.
Source mode: provide either article text or a publicly accessible URL.

Additional info
The workflow does not publish to LinkedIn or create Canva designs. It returns structured JSON and a formatted copy block for manual use in Canva or another design tool. Pages requiring authentication, heavy client-side rendering, or anti-bot verification may not return usable article text. Review AI-generated claims before publication.

Nodes Used (3)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
OpenAI
@n8n/n8n-nodes-langchain.openAi