Twitter content automation with Gemini AI for tweets, images, and engagement
Needs changesWhat this workflow does
This AI workflow has 17 nodes and runs when someone submits an n8n form (“Twitter Content Generator”). Along the way it connects X (Formerly Twitter) and Google Gemini Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Twitter Content Generator”).
- Workflow Configuration (Edit Fields (Set)): sets 3 fields: imageGenerationChance, maxTweetLength, imageModelUrl
- Twitter AI Agent (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; 3 tools (Twitter DM Tool, Twitter Post Tool, Twitter Engagement Tool)
- Fields - Set Values (Edit Fields (Set)): sets 3 fields: model, width, height
- Process AI Response (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
- AI Agent: runs an AI agent, with model: Google Gemini Chat Model
- Create Tweet (X (Formerly Twitter)): uses X (Formerly Twitter)
- Code: runs custom JavaScript code
- Code: runs custom JavaScript code
- Code: runs custom JavaScript code
…plus 1 more step. 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 AI Agent - Create Image From Prompt (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent - Create Image From Prompt (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (9)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - Twitter Tool
n8n-nodes-base.twitterTool - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - X (Formerly Twitter)
n8n-nodes-base.twitter - Merge
n8n-nodes-base.merge
From the author
| N8N Workflow | AI-Powered Twitter Automation with Content Generation and Engagement 🚀 This n8n template automates Twitter (X) activity — from generating tweet content with AI to engaging with posts and even sending DMs — all powered by Google Gemini or…