Templates / Generate LinkedIn posts from Gmail topics with Google Sheets and Gemini

Generate LinkedIn posts from Gmail topics with Google Sheets and Gemini

Needs changes

by Huzaifa Jamil · 49 views · created 2026-07-30 · Social Media, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 25 nodes and runs on Gmail events (plus 1 other trigger). Along the way it connects LinkedIn, Google Gemini Chat Model, Google Sheets and Gmail.

How it runs

Trigger: On Gmail events (plus 1 other trigger).

  1. Extract Email Topics (Code): runs custom JavaScript code
  2. Read All Sheet Rows (Google Sheets): uses Google Sheets
  3. Mark Email as Read (Gmail): mark as read
  4. Detect Invalid Sheet Rows (Code): runs custom JavaScript code
  5. Fetch Rows from Sheet (Google Sheets): uses Google Sheets
  6. Check Rows for Deletion (If): checks a condition and branches into true / false
  7. Find Available Rows in Sheet (Code): runs custom JavaScript code
  8. Remove Invalid Sheet Rows (Google Sheets): delete
  9. Filter Unrefined Rows (Code): runs custom JavaScript code
  10. Insert Topic in Blank Row (Google Sheets): update

…plus 12 more steps. See the full node list below.

Services it uses

LinkedInGoogle Gemini Chat ModelGoogle SheetsGmail

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Content Creator Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
  • Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Content Creator Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (10)

From the author

Quick overview This workflow captures LinkedIn post topics from incoming Gmail messages into Google Sheets, then runs daily cleanup and AI generation with Google Gemini to publish a post to a LinkedIn organization page, updating the sheet and sending Gmail…

Excerpt from Huzaifa Jamil's description on n8n.io.

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.