Templates / Plan Telegram trip itineraries with Google Gemini and SerpAPI

Plan Telegram trip itineraries with Google Gemini and SerpAPI

Needs changes

by iamvaar ✓ · 8 views · created 2026-08-22 · Miscellaneous, AI Chatbot

Needs 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 to replace before upgrading

Removed in 3.0Replace 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)

TelegramAI AgentGoogle Gemini Chat ModelStructured Output ParserSerpApi (Google Search)

What it does

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 Telegram chat. How it works 1. Runs every minute on a schedule and calls the Telegram Bot API getUpdates endpoint to fetch recent messages. 2. Selects one valid new text message, captures the chat context, and acknowledges updates back to Telegram using an offset so they are not reprocessed. 3. Uses Google Gemini to parse the message into structured trip parameters (destination, days, budget, currency, style, interests, travellers). 4. Computes a per-category budget breakdown and builds a planning prompt, then checks whether required details are present. 5. If details are missing, sends a Telegram message asking the user for the specific missing fields. 6. If details are complete, uses Google Gemini with SerpAPI web search to find real places and generate a structured itinerary with cost estimates and tips. 7. Formats the itinerary into an HTML Telegram message with a budget summary and sends it back to the originating Telegram chat. Setup 1. Create a Telegram bot with BotFather, replace REPLACEWITHBOTTOKEN in both Telegram Bot API request URLs, and add Telegram API credentials for the send-message steps. 2. Add Google Gemini (Google PaLM/Gemini) API credentials and select the desired Gemini chat model for both Gemini model nodes. 3. Add a SerpAPI key for the SerpAPI tool so the planner can search for real hotels, restaurants, and attractions. 4. Start a chat with your bot (or add it to a group) so it can receive messages via polling, then activate the workflow and keep n8n running continuously.

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.