Templates / Render LinkedIn carousel slides with Google Gemini and Google Drive

Render LinkedIn carousel slides with Google Gemini and Google Drive

Ready for 3.0

by Prakhyat ✓ · 4 views · created 2026-09-07 · Content Creation, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (6)

Google Drive

What it does

Quick overview This sub-workflow is executed by a parent workflow to generate a single slide image with Google Gemini, optionally save a preview to Google Drive, upload the image to LinkedIn via the Images API, and return only the resulting image URN and metadata to the parent. How it works 1. Receives slide configuration from a parent workflow execution, including the image prompt, slide index, LinkedIn owner URN, and rendering options. 2. Validates that all required inputs are present and stops with a clear error if any fields are missing. 3. Calls the Google Gemini image generation API to render the slide using the provided aspect ratio and image size. 4. Extracts the generated image from the response, converts it to binary, and retries the generation up to three times if no usable image is returned or if the image exceeds LinkedIn’s size limit. 5. Optionally uploads the generated image to Google Drive to create a preview link. 6. Initializes an image upload with the LinkedIn Images API, uploads the image bytes to the returned upload URL, and returns only the LinkedIn image URN, slide index, alt text, and optional Drive preview URL to the parent. Setup 1. Configure Google Gemini (PaLM) API credentials and ensure the workflow can call the Gemini image generation endpoint. 2. Configure LinkedIn OAuth2 credentials with permission to initialize and upload images, and provide the correct LinkedIn-Version value via the parent workflow input. 3. (Optional) Configure Google Drive OAuth2 credentials and choose the target Drive/folder if you want preview images saved to Google Drive. 4. In the parent workflow, pass the required fields to this sub-workflow: imageprompt, authorurn, linkedinversion, imageaspect, imagesize, and slideindex (and optionally alttext). Requirements - Need to have a parent workflow. Additional info This is a sub workflow which means, it will need a parent workflow. This workflow is used to prevent N8N's execution timeout errors by outsourcing image rendering and generation to a sub-worflow instead of doing it all in the parent workflow.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.