Generate LinkedIn posts from Gmail topics with Google Sheets and Gemini
Needs changesWhat 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).
- Extract Email Topics (Code): runs custom JavaScript code
- Read All Sheet Rows (Google Sheets): uses Google Sheets
- Mark Email as Read (Gmail): mark as read
- Detect Invalid Sheet Rows (Code): runs custom JavaScript code
- Fetch Rows from Sheet (Google Sheets): uses Google Sheets
- Check Rows for Deletion (If): checks a condition and branches into true / false
- Find Available Rows in Sheet (Code): runs custom JavaScript code
- Remove Invalid Sheet Rows (Google Sheets): delete
- Filter Unrefined Rows (Code): runs custom JavaScript code
- Insert Topic in Blank Row (Google Sheets): update
…plus 12 more steps. See the full node list below.
Services it uses
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.0 | Replace 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)
- AI Agent
@n8n/n8n-nodes-langchain.agent - LinkedIn
n8n-nodes-base.linkedIn - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code - Summarize
n8n-nodes-base.summarize - Schedule Trigger
n8n-nodes-base.scheduleTrigger - If
n8n-nodes-base.if
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…