Generate & schedule social posts with Gemini/OpenAI for X and LinkedIn
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs when someone submits an n8n form (“post”) (plus 1 other trigger). Along the way it connects Google Gemini Chat Model, X (Formerly Twitter), LinkedIn and Google Sheets and 1 more. It also calls api.apify.com over HTTP.
How it runs
Trigger: When someone submits an n8n form (“post”) (plus 1 other trigger).
- Generate AI Content (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; output parser: Format AI Output
- Fetch LinkedIn Posts (HTTP Request): calls api.apify.com
- Post to X (X (Formerly Twitter)): uses X (Formerly Twitter)
- Post to LinkedIn (LinkedIn): uses LinkedIn
- Filter High Engagement Posts (Function): runs custom JavaScript (legacy Function node)
- Append Linkedin And X Publishing Responses (Merge): merges the data from its input branches
- Generate Post Ideas (OpenAI) (OpenAI): uses OpenAI
- Show Confirmation (n8n Form): shows the next form page
- Save Drafts to Google Sheets (Google Sheets): append
- Notify Reviewer (Slack) (Slack): uses Slack
Services it uses
HTTP calls to: api.apify.com
Before you upgrade to n8n 3.0
3 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- AI Agent v1 (old agent modes) in Generate AI Content (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Function (legacy) in Filter High Engagement Posts: replace with Code node, mode 'Run Once for All Items'.
- OpenAI (legacy) in Generate Post Ideas (OpenAI): replace with OpenAI node (AI section).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Generate AI Content (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| Function (legacy) Filter High Engagement Posts | Code node, mode 'Run Once for All Items' |
| OpenAI (legacy) Generate Post Ideas (OpenAI) | OpenAI node (AI section) |
Nodes used (14)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - n8n Form Trigger
n8n-nodes-base.formTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - X (Formerly Twitter)
n8n-nodes-base.twitter - LinkedIn
n8n-nodes-base.linkedIn - Merge
n8n-nodes-base.merge - n8n Form
n8n-nodes-base.form - Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Function
n8n-nodes-base.function - OpenAI
n8n-nodes-base.openAi - Google Sheets
n8n-nodes-base.googleSheets - Slack
n8n-nodes-base.slack
From the author
💼 LinkedIn Content Machine – AI-Powered Post Generator & Scheduler for X and LinkedIn How it works: This end-to-end workflow automates your personal or brand content strategy by: - 🧠 Using Google Gemini or OpenAI to generate engaging LinkedIn/X content from…