Plan Telegram trip itineraries with Google Gemini and SerpAPI
Needs changesNeeds changes. This template uses 2 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes), SerpApi (Google Search). 2 breaking item(s) found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 14 nodes and runs on Telegram events (message). Along the way it connects Telegram, Google Gemini Chat Model and SerpApi (Google Search).
How it runs
Trigger: On Telegram events (message).
- Extract Message Details (Code): runs custom JavaScript code
- Trip Request AI Agent (AI Agent): runs an AI agent, with model: Initial Gemini Chat Model; output parser: Parse User Request
- Calculate Budget Details (Code): runs custom JavaScript code
- Check Trip Info Completeness (If): checks a condition and branches into true / false
- Trip Planning Agent (AI Agent): runs an AI agent, with model: Secondary Gemini Model; 1 tool (Discover Destinations); output parser: Parse Trip Details
- Request Additional Info (Telegram): uses Telegram
- Create Itinerary Format (Code): runs custom JavaScript code
- Send Itinerary via Telegram (Telegram): uses Telegram
Services it uses
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- AI Agent v1 (old agent modes) in Trip Request AI Agent (v1.7), Trip Planning Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- SerpApi (Google Search) in Discover Destinations: no direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Trip Request AI Agent (v1.7), Trip Planning Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| SerpApi (Google Search) Discover Destinations | No direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node |
Nodes used (8)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - SerpApi (Google Search)
@n8n/n8n-nodes-langchain.toolSerpApi
From the author
Quick overview This workflow polls Telegram every minute for new user messages, uses Google Gemini to extract trip details, calculates a budget split, and then generates and sends a grounded day-by-day itinerary using SerpAPI search results back to the same…