Personalized AI Trip Itinerary Generator using Telegram Bot - n8n Workflow

Use this advanced n8n workflow to create custom city trip itineraries instantly via a Telegram bot. Leverages GPT-4o for tailored, multi-day travel plans based on user presets.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Travel agencies or bloggers looking to offer instant, customized travel advice.
Technical users wanting a sophisticated example of AI routing and prompt engineering within an n8n workflow.
Developers building conversational bots who need robust n8n templates for integration with Telegram.
Anyone interested in using the n8n node ecosystem to build powerful, user-facing AI tools.

Overview

This powerful n8n workflow transforms a standard Telegram bot into a sophisticated AI travel assistant. Instead of relying on a single, static prompt, this n8n template uses a routing system to select the perfect prompt based on the user's request (e.g., Budget, Luxury, Family).

When a user sends a message to the bot (e.g., /cozy London 4 days), the system identifies the travel style and applies a highly specialized system instruction to the AI model (GPT-4o). This ensures that the generated itinerary is perfectly tailored to the user's unique need, providing relevant sights, dining tips, and travel hacks, all formatted beautifully for the Telegram chat window. This sophisticated n8n automation showcases how custom logic can dramatically improve AI output quality.

How it Works

This n8n workflow operates on a simple but highly effective event-driven logic:


  1. Trigger Event: The process begins with the Telegram Trigger n8n node, waiting for an incoming message from a user in Telegram. This is the fundamental n8n trigger.

  2. Acknowledge Input: Immediately, the workflow uses a Telegram n8n node to send a 'typing...' indicator, improving the user experience by providing instant feedback.

  3. Route Analysis: The Route by Input Type Switch n8n node analyzes the starting text of the incoming message. It checks for specific preset commands like /cozy, /extreme, or /nightlife.

  4. Prompt Selection: Based on the Switch result, the n8n workflow is routed to one of ten specialized Set n8n nodes. Each Set node contains a unique, detailed AI prompt (a custom persona and style instruction) corresponding to the selected travel preset. If no preset is detected, the flow defaults to the general any other promt node.

  5. AI Generation: All paths converge into the Generate personalised answer (AI/ML Api) n8n node. This node uses the selected preset prompt combined with the user's raw message (city, days) and feeds it to the openai/gpt-4o model.

  6. Deliver Result: Finally, the generated, formatted itinerary is captured and sent back to the user's chat ID using the Send message to Telegram n8n node, completing the automation cycle.

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and paste it directly into your n8n instance using the 'Import from JSON' function.

  2. Telegram Setup: You must have a Telegram Bot Token. Configure the credentials for the Start: Receive Message on Telegram n8n trigger and the two other Telegram n8n nodes (Show Typing Indicator and Send message to Telegram) using your API token.

  3. AI/ML Credentials: Set up the credentials for the AI/ML Api n8n node. This specific n8n node is configured to use GPT-4o, so you will need a valid OpenAI API key.

  4. Activate: Once credentials are set up for all relevant n8n nodes, save the n8n workflow and toggle the 'Active' switch in the top menu to enable the Telegram trigger listener.

Node Details

Start: Receive Message on Telegram (Telegram Trigger): The starting n8n trigger for the entire flow. It monitors for new messages (updates: ["message"]) sent to the configured Telegram bot.
Show Typing Indicator (Telegram Node): Sends the sendChatAction operation to display 'typing...' in the Telegram chat, simulating real-time response.
Route by Input Type (Switch Node): A critical n8n node that defines the core logic. It uses startsWith conditions to check the input message text against commands like /cozy, /budget, or /nightlife to select the appropriate prompt path.
[Preset] Prompts (Set Nodes, e.g., cozy promt): A series of Set n8n nodes, each holding a specialized JSON payload containing a detailed, tailored AI system prompt. This allows the n8n workflow to dynamically adjust the AI's persona and instructions.
Generate personalised answer (AI/ML Api Node): This central n8n node calls the openai/gpt-4o model. The prompt is constructed by merging the preset system prompt ({{ $json.prompt }}) with the user's message text, ensuring highly contextual itinerary generation.
Send message to Telegram (Telegram Node): The final action. It uses the chatId from the initial n8n trigger and sends the generated AI content back to the user.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all

Featured*