Generate LinkedIn posts with GPT-4o-mini, Gemini images, human approval, and auto-publish

Go to Workflow
0 views
Built by Jitesh Dugar Jitesh Dugar
Created on June 07, 2026

Description

An advanced AI-powered LinkedIn automation workflow built with n8n that generates high-engagement LinkedIn posts using GPT-4o-mini, optionally creates AI-generated visuals with Google Gemini, sends everything for human approval via Gmail, and finally publishes the approved content directly to LinkedIn.

This workflow combines:
AI content generation
AI image generation
Human-in-the-loop approval
Automated LinkedIn publishing
Google Sheets as CMS/database

🧠 Workflow Overview

This workflow automatically:
Reads content ideas from Google Sheets
Generates LinkedIn posts using OpenAI
Optionally creates AI-generated images
Uploads images to public URLs
Sends content for manual approval
Publishes approved posts to LinkedIn
Updates Google Sheets with status + post URL

1️⃣ Schedule Trigger

Purpose
Automatically starts the workflow at scheduled intervals.

What it does
Runs the workflow automatically
Eliminates manual execution

2️⃣ Get Data from Sheets

Purpose
Fetches post ideas and instructions from Google Sheets.

What it does
Reads rows where Status = Ready
Pulls content details
Sends data to AI generation nodes

Columns Used
Post Description
Instructions
Generate Image (Yes/No)
Status

3️⃣ OpenAI Chat Model

Purpose
Provides the AI model connection.

What it does
Connects GPT-4o-mini to the workflow
Powers the LinkedIn content generation process

4️⃣ Generate Post Content

Purpose
Creates scroll-stopping LinkedIn posts.

What it does
Uses advanced prompt engineering
Generates human-style content
Creates engaging hooks
Adds CTA + hashtags
Formats posts for LinkedIn readability

5️⃣ Switch

Purpose
Checks whether image generation is required.

Logic
Reads:
Generate Image (Yes/No)

Outputs
Image Required
Image Not Required

6️⃣ Generate Post Image

Purpose
Creates AI-generated LinkedIn images using Google Gemini.

What it does
Generates visuals from post ideas
Creates engaging graphics
Optimizes image format for LinkedIn

7️⃣ Upload a File

Purpose
Uploads generated images and creates a public URL.

Why this is important
LinkedIn and email approvals require publicly accessible image URLs.

What it does
Uploads binary image files
Generates shareable public links
Makes images accessible instantly

Powered By
🔗 UploadToURL

UploadToURL makes file hosting extremely simple inside n8n workflows.

Benefits
Instant public URLs
Fast uploads
Easy integration with automation workflows
Perfect for AI-generated assets

8️⃣ Send Content Confirmation

Purpose
Sends generated content for human approval.

What it sends
AI-generated LinkedIn post
Image preview URL
Approval buttons

Approval Options
Approve
Reject

This creates a powerful human-in-the-loop workflow.

9️⃣ Content Confirmation Logic

Purpose
Processes approval responses.

Logic
Checks:
approved = true/false

Outputs
Approved
Rejected

🔟 Is Image Required?

Purpose
Determines which LinkedIn posting path to use.

Why this matters
LinkedIn handles:
Text-only posts
Image posts

differently.

1️⃣1️⃣ Download a File

Purpose
Downloads the uploaded image back into binary format.

Why this is needed
LinkedIn image uploads require binary image data.

What it does
Downloads image from public URL
Converts it into binary format
Prepares it for LinkedIn upload

1️⃣2️⃣ Post With Image

Purpose
Publishes approved LinkedIn posts with images.

What it posts
AI-generated text
Attached image

1️⃣3️⃣ Post Without Image

Purpose
Publishes text-only LinkedIn posts.

What it posts
AI-generated content
No image attachment

1️⃣4️⃣ Update Google Sheet

Purpose
Updates workflow status after successful posting.

What gets updated
Status = Completed
Post ID
LinkedIn Post URL

1️⃣5️⃣ Update Status to Canceled

Purpose
Updates rejected content status.

What gets updated
Status = Canceled

Nodes Used (6)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Gmail
n8n-nodes-base.gmail
Google Gemini
@n8n/n8n-nodes-langchain.googleGemini
Google Sheets
n8n-nodes-base.googleSheets
LinkedIn
n8n-nodes-base.linkedIn
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi