Generate and publish LinkedIn posts with OpenAI, Gmail, and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Google Sheets, Gmail and LinkedIn.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Configuration (Edit Fields (Set)): sets 10 fields: niche, audience, num_ideas…
- Extract Reply Number & Correlation ID (Edit Fields (Set)): sets 3 fields: correlationId, selectedNumber, replierEmail
- Generate LinkedIn Post Ideas (AI Agent): runs an AI agent, with model: OpenAI Chat Model; output parser: Ideas Output Parser
- Get Row by Correlation ID (Google Sheets): uses Google Sheets
- Prepare Ideas Email & Log Data (Edit Fields (Set)): sets 12 fields: correlationId, niche, audience…
- Route by Approval Stage (Switch): routes items into 2 branches
- Log Idea Batch to Tracking Sheet (Google Sheets): append
- Prepare Draft Request (Edit Fields (Set)): sets 9 fields: correlationId, niche, audience…
- Select Final Draft to Publish (Edit Fields (Set)): sets 6 fields: correlationId, selectedTopic, finalPost…
- Email Ideas for Approval (Gmail): uses Gmail
…plus 7 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - Gmail Trigger
n8n-nodes-base.gmailTrigger - Switch
n8n-nodes-base.switch - LinkedIn
n8n-nodes-base.linkedIn - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Quick overview This workflow generates LinkedIn post ideas and drafts with OpenAI, routes approvals through Gmail replies, tracks each content cycle in Google Sheets, and publishes the selected draft to LinkedIn as a person or organization. How it works 1.…