Auto-generate and post tweet threads based on Google Trends using Gemini AI
Needs changesWhat this workflow does
This AI workflow has 15 nodes and runs on a schedule (every day). Along the way it connects X (Formerly Twitter), Google Gemini Chat Model, OpenAI Chat Model and Google BigQuery.
How it runs
Trigger: On a schedule (every day).
- Google Trends AUS (Google BigQuery): uses Google BigQuery
- Aggregate: combines items into one
- Trend Selector (AI Agent): runs an AI agent, with model: Google Gemini Chat Model; memory: Simple Memory; output parser: Auto-fixing Output Parser
- Tweet Generator (AI Agent): runs an AI agent, with model: Google Gemini Chat Model
- Code: runs custom JavaScript code
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- X (X (Formerly Twitter)): uses X (Formerly Twitter)
- Wait: pauses before continuing
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 Trend Selector (v1.9), Tweet Generator (v1.9): 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) Trend Selector (v1.9), Tweet Generator (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- X (Formerly Twitter)
n8n-nodes-base.twitter - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Auto-fixing Output Parser
@n8n/n8n-nodes-langchain.outputParserAutofixing - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Aggregate
n8n-nodes-base.aggregate - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Wait
n8n-nodes-base.wait - Google BigQuery
n8n-nodes-base.googleBigQuery - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
AI-Powered Twitter Automation using n8n to Check BigQuery Latest Google Trend and Publish Who is this for? This template is designed for: Content creators Tech influencers Educators and marketers who want to automatically tweet trend-based threads using AI…