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

⚡ 199 views · 📱 Social Media & Email Marketing

💡 Pro Tip — If you’re pulling LinkedIn data through HTTP requests or dealing with API restrictions, there’s a community node called ScraperNode that handles this natively. It has dedicated scrapers for profiles, companies, jobs, and people search — you just pass a URL and get structured data back.

View All Scrapers

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:


🧠 Workflow Overview

This workflow automatically:

  1. Reads content ideas from Google Sheets
  2. Generates LinkedIn posts using OpenAI
  3. Optionally creates AI-generated images
  4. Uploads images to public URLs
  5. Sends content for manual approval
  6. Publishes approved posts to LinkedIn
  7. Updates Google Sheets with status + post URL

1️⃣ Schedule Trigger

Purpose

Automatically starts the workflow at scheduled intervals.

What it does


2️⃣ Get Data from Sheets

Purpose

Fetches post ideas and instructions from Google Sheets.

What it does

Columns Used


3️⃣ OpenAI Chat Model

Purpose

Provides the AI model connection.

What it does


4️⃣ Generate Post Content

Purpose

Creates scroll-stopping LinkedIn posts.

What it does


5️⃣ Switch

Purpose

Checks whether image generation is required.

Logic

Reads: Generate Image (Yes/No)

Outputs


6️⃣ Generate Post Image

Purpose

Creates AI-generated LinkedIn images using Google Gemini.

What it does


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

Powered By

🔗 UploadToURL

UploadToURL makes file hosting extremely simple inside n8n workflows.

Benefits


8️⃣ Send Content Confirmation

Purpose

Sends generated content for human approval.

What it sends

Approval Options

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


9️⃣ Content Confirmation Logic

Purpose

Processes approval responses.

Logic

Checks: approved = true/false

Outputs


🔟 Is Image Required?

Purpose

Determines which LinkedIn posting path to use.

Why this matters

LinkedIn handles:

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


1️⃣2️⃣ Post With Image

Purpose

Publishes approved LinkedIn posts with images.

What it posts


1️⃣3️⃣ Post Without Image

Purpose

Publishes text-only LinkedIn posts.

What it posts


1️⃣4️⃣ Update Google Sheet

Purpose

Updates workflow status after successful posting.

What gets updated


1️⃣5️⃣ Update Status to Canceled

Purpose

Updates rejected content status.

What gets updated

🔗 Nodes Used

Google Sheets, Gmail, LinkedIn, Schedule Trigger, Basic LLM Chain, OpenAI Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup