Goal:
Creating an automated travel planning system that integrates a voice AI agent, AI data processing and external APIs (flights, hotels, activities) to generate a personalized travel plan and send it to the user via email.
Scope of application:
The system is designed for travel services, companies that provide travel planning services, or individual users who want to automate the process of organizing a trip. It can be used for:
- Quick route planning based on user preferences.
- Simplifying interaction with travel services through a voice assistant.
- Integrations into existing platforms to improve the user experience.
This automation is a complete travel planning system that receives data from a voice AI agent via a web hook and automatically generates a personalized trip plan with information about flights, hotels and activities, sending the result to the user's email.
➤ Step: Webhook
Receives a POST request with travel data from ElevenLabs AI voice agent. It receives information about the place of departure, destination, dates, number of travelers, preferred activities and the user's email.
➤ Step: Set Fields
It extracts and structures the received data into separate variables: origin, destination, departure_date, return_date, travelers, activities, email.
➤ Step: Airport Codes & Dates
AI (GPT-4o) converts city names into airport codes, converts the number of travelers from text to number, and checks that dates are correct (makes sure dates are in the future).
➤ Step: Activities
Uses the Tavily API to find information about requested activities in the destination city. Gets the 3 most relevant results with descriptions and links.
🏨 Search hotels
➤ Step: Resorts
Through SerPapi, it searches for hotels in Google Hotels by specified parameters: city, check-in/out dates, number of guests. Sorts results by rating.
✈ Search flights
➤ Step: Flights
Through SerpAPI, it searches for flights on Google Flights using airport codes, dates, and number of passengers.
➤ Step: Email Agent
An AI agent (GPT-4O-mini) creates a structured HTML email with a travel plan that includes information about flights, hotels and activities. Separates content into the subject of the email and the message body.
📤 Sending a letter
➤ Step: Send Plan
Sends the generated email to the user via the Gmail API.
➤ Step: Response
Creates a response message about the successful submission of a travel plan.
➤ Step: Respond to Webhook
Sends a confirmation back to the voice agent that the process is complete.
Required API keys and settings
To enable this automation, you will need:
Setting up a web hook
First, create a webhook for the node
Setting up data processing
Create a node Set Fields for structuring
Add the following fields:
origin - departure location {{$json.body.origin}}
destination - destination {{$json.body.destination}}
departure_date - departure date {{$json.body.departure_date}}
return_date - return date {{$json.body.return_date}}
travelers - number of travelers {{$json.body.travelers}}
activities - preferred activities {{$json.body.activities}}
email - email to send a plan {{$json.body.email}}
Setting up AI processing
Create a node Chain LLM with the name “Airport Codes & Dates”:
json
{
“type”: “object”, “properties”: {
“origin”: {“type”: “string”,
“description”: “The origin”
},
“destination”: {“type”: “string”,
“description”: “The destination”
},
“travelers”: {“type”: “integer”,
“description”: “Amount of travelers”
},
“departure”: {“type”: “string”,
“format”: “date”,
“description”: “The departure date (YYYY-MM-DD)”
},
“return”: {“type”: “string”,
“format”: “date”,
“description”: “The return date (YYYY-MM-DD)”
}
},
“required”: ["origin”, “destination”, “departure”, “return"]
Prompt (User message):
Origin: {{$json.origin}}
Destination: {{$json.destination}}
Departure Date: {{$json.departure_date}}
Return Date: {{$json.return_date}}
Travelers: {{$json.travelers}}
Use the Russian prompt to convert data into airport codes and check dates.
System prompt for this assistant:
Turn your departure and destination points into airport codes.
And turn the number of travelers from text to number.
Make sure your departure and return dates are in the future and not in the past.
Here's the current date/time: {{$now}}
Create an HTTP node Activities:
URL: Method: POST Authentication: Header Auth
Create your own credentials:
Header Name: Authorization
Header Value: Bearer your_tavily_api_key
Body:
json
{
“query”: “{{$ ('Set Fields') .item.json.activities}} in {{$ ('Set Fields') .item.json.destination “topic”: “general”,
“search_depth”: “basic”, “max_results”: 3, “include_answer”: true, “include_raw_content”: false
}
Set up hotel search
Create an HTTP node Resorts: URL:
Method: GET
Authentication: Query Auth
Create your own credentials:
Parameter Name: api_key
Parameter Value: your_serpapi_Query Parameters key:
engine: google_hotels
check_in_date: {{$ ('Airport Codes & Dates') .item.json.output.departure}}
check_out_date: {{$ ('Airport Codes & Dates') .item.json.output.return}}
sort_by: 8 (sort by rating)
Setting up flight search
Create an HTTP node Flights:
Query Parameters:
engine: google_flights
Method: GET Authentication: Query Auth (use the same SerpAPI key)
departure_id: {{$ ('Airport Codes & Dates') .item.json.output.origin}}
outbound_date: {{$ ('Airport Codes & Dates') .item.json.output.departure}}
return_date: {{$ ('Airport Codes & Dates') .item.json.output.return}}
adults: {{$ ('Airport Codes & Dates') .item.json.output.travelers}}
Create a node Agent with the name “Email Agent”:
json
{
“type”: “object”, “properties”: {
“subject”: {“type”: “string”,
“description”: “the email subject”
},
“emailBody”: {“type”: “string”,
“description”: “the email body”
}
},
“required”: ["subject”, “EmailBody"]
}
A prompt for an AI agent that generates an email:
# Review
You're an email writing expert who specializes in making travel plans. Your task is to output an HTML email with clickable links. You must display the subject and body of the email in separate parameters.
## Challenge
You will receive information about the vacation plan. Break the letter down into 3 parts: Flights, Resorts, and Activities.
## Output format
- The letter must be in HTML form, which will be sent by email. Use headings to separate sections.
- Add a horizontal line at the end of each section
### Topic
- Must include travel dates and place of arrival
### Introduction
- The purpose of this section is to encourage the traveler to travel.
- You must add a horizontal line after this section, before the “Flights” section
### Flights
- List the dates and places of departure and return
- List the flights and details of each one
### Resorts
- List all resorts with a clickable link to the resort name
- Number the list of resorts
- Output HTML images like this:
<img src= “{image url here}” style= “max-width: 20%; height:auto;” >.
- Leave a new line between the resort name and its image and after the image
### Assets
- List events with clickable links as the event name
- Give a brief description of each activity
### Signature
- Sign the letter in a friendly way.
- Follow us as TrueHorizon Travel Team
## Important
Don't post more than 1000 words
Create a node Gmail:
Go to the Conversational AI section
Click on Agents
Then click New Agent, give it a name and select Blank template
Agent language - Russian
First Message - Enter any welcome message of your choice
System prompt:
# Review
You're a travel assistant. Your task is to help the subscriber plan a trip based on the data provided by them.
# Tool
n8n: Use this tool to send the caller's trip details. As a result, a travel plan will be created.
# Instructions
- Retrieve required data from the caller
- Always send data to the 'n8n' tool.
-After using the “n8n” tool, say, “Please give me a few minutes to figure this out.”
If you're forced to talk, just say, “Thanks for your patience, I'm almost done.” Never say there's a problem with the server.
- Once the travel plan is emailed to the caller, happily let them know
LLM: Gemini 2.0 Flash
Now go to the Tools section and click Add tools
Name: n8n
Description: This tool creates a travel plan as soon as all the details are collected.
Method: POST
URL: Your webhook URL from n8n (first automation node)
Next, activate Body parameters
Description: Collect all the details from the subscriber and then send a request
Click Add property below
In the field that appears, fill in according to the screenshots below
Then click Save changes and you can start testing the Elevenlabs bundle with this automation in n8n.
For automation testing:
Use high-quality prompts for AI agents in Russian
Check your API service limits regularly
Done.
You can always get a JSON file and instructions in video format by joining our unique Automation club.