Templates / Twitter content automation with Gemini AI for tweets, images, and engagement

Twitter content automation with Gemini AI for tweets, images, and engagement

Needs changes

by Kamran habib · 1,183 views · created 2025-10-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 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”).

  1. Workflow Configuration (Edit Fields (Set)): sets 3 fields: imageGenerationChance, maxTweetLength, imageModelUrl
  2. 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)
  3. Fields - Set Values (Edit Fields (Set)): sets 3 fields: model, width, height
  4. Process AI Response (Code): runs custom JavaScript code
  5. Merge: merges the data from its input branches
  6. AI Agent: runs an AI agent, with model: Google Gemini Chat Model
  7. Create Tweet (X (Formerly Twitter)): uses X (Formerly Twitter)
  8. Code: runs custom JavaScript code
  9. Code: runs custom JavaScript code
  10. Code: runs custom JavaScript code

…plus 1 more step. See the full node list below.

Services it uses

X (Formerly Twitter)Google Gemini Chat Model

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.0Replace 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)

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…

Excerpt from Kamran habib'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.