Submit your carousel topic, brand name, target audience, tone, and number of content slides via a simple form and the workflow generates a complete LinkedIn carousel PDF automatically. GPT-4o-mini returns a structured JSON array of slides — title slide, content slides with 3 bullet points each, and a CTA slide — which are assembled into a full branded HTML document with dark gradient backgrounds, slide number badges, and a swipe prompt, then converted into a square-format PDF at 1080×1080px per slide. The PDF is uploaded to Google Drive, logged to Google Sheets with the Drive link, and emailed to you with step-by-step LinkedIn posting instructions. Built for LinkedIn creators who want a fully formatted, ready-to-upload carousel PDF in minutes without designing slides manually.
linkedin-carousel-seo-mistakes-2025-05-18.pdf⚠️ This workflow requires a self-hosted n8n instance. The PDF generation step uses
html-pdf-node, an npm package that must be installed on your n8n server. This cannot be done on n8n Cloud. If you use n8n Cloud, the PDF step will fail.
Estimated Setup Time: 25–30 minutes
Install html-pdf-node on your n8n server — This is required before anything else. Run this command on your server:
npm install html-pdf-nodedocker exec -it n8n npm install html-pdf-nodeImport the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import
Connect OpenAI — Open node OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection
Get your Google Drive folder ID — Open your target Google Drive folder in a browser → the folder ID is the string at the end of the URL after /folders/
Connect Google Drive — Open node 6. Google Drive — Upload PDF → click the credential dropdown → add Google Drive OAuth2 → authorize access → replace YOUR_GDRIVE_FOLDER_ID in the folder field with your actual folder ID
Create your Google Sheet tab — Open your Google Sheet → add a tab named exactly Carousel Log → add these 9 column headers in row 1: Date, Topic, Brand Name, Slide Count, File Name, Drive Link, Drive File ID, PDF Size (bytes), Generated On
Get your Google Sheet ID — Open your Google Sheet in a browser → copy the string between /d/ and /edit in the URL
Connect Google Sheets — Open node 7. Google Sheets — Log Carousel → replace YOUR_GOOGLE_SHEET_ID with your actual Sheet ID → click the credential dropdown → add Google Sheets OAuth2 → authorize access
Set your email address — Open node 8. Gmail — Email PDF to You → replace YOUR_EMAIL_ADDRESS in the Send To field with your actual email address
Connect Gmail — Open the same node 8. Gmail — Email PDF to You → click the credential dropdown → add Gmail OAuth2 → complete the Google authorization flow
Customize your brand color (optional) — Open node 4. Code — Build HTML Slides → find the BRAND SETTINGS section near the top of the code → replace #0A66C2 in BRAND_COLOR with your own hex color code
Activate the workflow — Toggle the workflow to Active → copy the Form URL from node 1. Form — Carousel Topic + Details → open it in a browser to submit your first carousel
Step 1 — Form: Carousel Topic + Details
You open the form URL and fill in five fields: the carousel topic (e.g. "5 SEO mistakes beginners make"), your name or brand, the target audience, the tone (e.g. Professional, Motivational, Educational), and the number of content slides you want (recommended: 4 to 7). Submitting the form starts the full pipeline.
Step 2 — AI Agent: Generate Slide Content
GPT-4o-mini receives the topic, audience, tone, and slide count. The system prompt instructs it to return ONLY a valid JSON array — no text before or after, no markdown backticks. The array contains one title slide object, the requested number of content slide objects (each with a headline, one emoji, an empty subtitle, and exactly 3 bullet points), and one CTA slide object with a follow prompt and a comment-baiting question. Each slide has a type field set to "title", "content", or "cta".
Step 3 — Code: Parse Slides JSON
The AI output is cleaned of any accidental markdown code fences and parsed as a JSON array. If parsing fails, the step throws a clear error showing the first 300 characters of the output for debugging. If the array is empty or missing, another error is thrown. The topic, brand name, audience, and tone from the form are also extracted and packaged alongside the slides array.
Step 4 — Code: Build HTML Slides
Each slide in the array is converted to a full-height HTML div at 1080×1080px with a dark gradient background using your brand color. Content slides get a numbered badge in the top-right corner. The title slide gets a "Swipe →" label at the bottom-right. All slides get a brand name label at the bottom-left. Content slides render the 3 bullet points as a list with circular checkmark icons. All styles are inline so the HTML is fully self-contained. A complete HTML document wrapping all slide divs is returned alongside a structured filename built from the topic and today's date.
Step 5 — Code: Generate PDF
The html-pdf-node npm package is called with the full HTML string. The PDF is generated at 1080×1080px per page with no margins and printing backgrounds enabled. The resulting PDF buffer is converted to base64 and returned as binary data alongside the filename, slide count, topic, brand name, and PDF file size in bytes.
Step 6 — Google Drive: Upload PDF
The PDF binary is uploaded to your specified Google Drive folder using the structured filename from step 4. Google Drive returns the file's ID and other metadata.
Step 7 — Google Sheets: Log Carousel
One row is appended to your Carousel Log tab with all 9 columns. The Drive Link is constructed directly from the file ID as https://drive.google.com/file/d/FILE_ID/view so every row has a clickable link immediately.
Step 8 — Gmail: Email PDF to You
A styled HTML email is sent to your address with the carousel topic, slide count, filename, and a clickable "Open in Google Drive" link. A blue callout box at the bottom of the email shows the 4-step LinkedIn posting process: download the PDF from Drive, go to LinkedIn, create a post, add the PDF as a document, add your caption, and post.
✅ Pure JSON output from GPT — GPT is instructed to return only a JSON array — making the output directly parseable without regex extraction and producing consistent slide structures every time
✅ Slide count badge auto-numbered — Content slides automatically get a numbered circle badge in the top-right corner showing which slide number it is — no manual numbering needed
✅ Swipe prompt on title slide — The first slide automatically gets a "Swipe →" label so LinkedIn viewers know to scroll through — this is a standard carousel best practice
✅ Brand color applied globally — Change one value in the code and the entire PDF reflects your brand color across all backgrounds and gradients
✅ Filename includes topic and date — Files are named linkedin-carousel-[topic]-[date].pdf so your Drive folder stays organized and searchable
✅ PDF size logged in bytes — The sheet log records the exact file size so you can monitor output consistency and catch any generation issues
✅ LinkedIn posting instructions in every email — The delivery email includes a 4-step posting guide so anyone on your team can upload the carousel without knowing how LinkedIn document posts work
Change the brand color — In node 4. Code — Build HTML Slides, find const BRAND_COLOR = '#0A66C2' in the BRAND SETTINGS section at the top and replace the hex code with your own brand color — the change applies to all slide backgrounds and gradients.
Change the slide layout font — In the same BRAND SETTINGS section of node 4. Code — Build HTML Slides, change const FONT = 'Arial, sans-serif' to any web-safe font — for example 'Georgia, serif' for a more editorial look or 'Verdana, sans-serif' for a cleaner style.
Add your topic to the topic emoji map — In node 10. Code — Build HTML Email (note: this is in the News Digest workflow — for the carousel, the emoji is generated by GPT per slide) — if you want to control which emoji appears on each slide type, add instructions to the GPT system prompt in node 2. AI Agent — Generate Slide Content.
Send to a Slack channel when a carousel is ready — After node 8. Gmail — Email PDF to You, add a Slack step that posts the carousel topic, slide count, and a direct Drive link to a #content-team channel so your team is notified without checking email.
Increase the slide bullet point count — In the system prompt of node 2. AI Agent — Generate Slide Content, change Exactly 3 bullet points per content slide to a different number — for example 4 or 5 — and update the bullet point rendering in node 4. Code — Build HTML Slides accordingly.
PDF generation failing with a module not found error:
html-pdf-node was installed on the same n8n server instance running this workflow — run npm install html-pdf-node again if unsuredocker exec -it n8n npm install html-pdf-node and restart the container — the package must be installed inside the container, not on the host machineGPT returning a JSON parse error:
Form submission not starting the workflow:
Google Drive upload failing:
YOUR_GDRIVE_FOLDER_ID is replaced with just the folder ID from the URL — not the full Drive URLGoogle Sheets not logging or Gmail not sending:
YOUR_GOOGLE_SHEET_ID in node 7. Google Sheets — Log Carousel is replaced with your actual Sheet ID and the tab is named Carousel Log exactlyYOUR_EMAIL_ADDRESS in node 8. Gmail — Email PDF to You is replaced with a valid email address and the Gmail OAuth2 credential is connectedNeed help setting this up or want a custom version built for your team or agency?
📧 Email: [email protected]
🌐 Website: https://www.incrementors.com/