Automate travel planning by instantly searching flights and hotels, then email personalized itineraries via Gmail—all triggered by a single request.
This powerful workflow automates the entire travel planning process by accepting travel requests through a webhook, searching for flights and hotels simultaneously, and delivering personalized itinerary combinations directly to your inbox. Once triggered, the agent intelligently combines flight and hotel options, generates multiple travel scenarios, formats them into a professional HTML email, and sends everything to your specified recipient—all within seconds.
Key benefits and time savings:
Target use cases:
This workflow is ideal for organizations that process frequent travel requests and want to eliminate repetitive manual work. It's perfect for:
No coding experience is required—the workflow handles all technical complexity while you focus on strategic travel decisions.
Why it's needed: Gmail serves as your communication hub, delivering formatted travel itineraries directly to travelers' inboxes. This ensures recipients receive professional, branded emails with all flight and hotel options clearly organized and ready for review.
Setup steps:
How to obtain API keys/credentials: Gmail uses OAuth 2.0 authentication. The app password method (above) is the most reliable for automation. Alternatively, you can use full OAuth authentication by:
Configuration in TaskAGI: Once authenticated, your Gmail connection appears in the Send Email via Gmail node. The workflow automatically populates:
[[nodes.5972.recipient]] (dynamically set from parsed input)[[nodes.5972.subject]] (generated from itinerary data)[[nodes.5972.htmlBody]] (formatted HTML from the email formatting node)This documentation node requires no configuration. It serves as your workflow reference point and appears in execution logs for clarity.
This node receives incoming travel requests and initiates the entire workflow.
Configuration:
{
"travelerName": "John Smith",
"email": "john.smith@company.com",
"departureCity": "New York",
"destinationCity": "Los Angeles",
"departureDate": "2024-03-15",
"returnDate": "2024-03-20",
"budget": 3000
}
Testing the webhook: Use a tool like Postman or cURL to send test data:
curl -X POST [YOUR_WEBHOOK_URL] \
-H "Content-Type: application/json" \
-d '{"travelerName":"Test User","email":"test@example.com","departureCity":"NYC","destinationCity":"LAX","departureDate":"2024-03-15","returnDate":"2024-03-20","budget":3000}'
This node extracts and validates data from the webhook payload.
Configuration:
Map incoming fields to standardized variables:
traveler_name ← travelerName
traveler_email ← email
origin_city ← departureCity
destination_city ← destinationCity
start_date ← departureDate
end_date ← returnDate
max_budget ← budget
Add validation rules:
Set error handling to reject invalid requests with clear messages
This node queries flight data from Skyscanner's API.
Configuration:
Obtain Skyscanner API key:
Configure the HTTP request:
GET
https://skyscanner-api.p.rapidapi.com/v3/flights/search
x-rapidapi-key: [Your Skyscanner API Key]x-rapidapi-host: skyscanner-api.p.rapidapi.com
originEntityId: [[nodes.5968.origin_city]]
destinationEntityId: [[nodes.5968.destination_city]]
outboundDate: [[nodes.5968.start_date]]
returnDate: [[nodes.5968.end_date]]
adults: 1
sortBy: price
Response mapping: Extract flight options, prices, airlines, and times
This node queries hotel availability and pricing.
Configuration:
Obtain Booking.com API credentials:
Configure the HTTP request:
GET
https://booking-com.p.rapidapi.com/v1/hotels/search
x-rapidapi-key: [Your Booking.com API Key]x-rapidapi-host: booking-com.p.rapidapi.com
query: [[nodes.5968.destination_city]]
checkin_date: [[nodes.5968.start_date]]
checkout_date: [[nodes.5968.end_date]]
adults_number: 1
order_by: price
Response mapping: Extract hotel names, prices, ratings, and amenities
This node combines flight and hotel results into a unified dataset.
Configuration:
{
"flights": [[nodes.5969.results]],
"hotels": [[nodes.5970.results]],
"traveler_info": [[nodes.5968.traveler_data]],
"budget": [[nodes.5968.max_budget]]
}
This custom function creates multiple travel scenarios.
Configuration:
This function creates a professional, visually appealing email template.
Configuration:
htmlBody variableThis node delivers the formatted itinerary to the traveler.
Configuration:
[[nodes.5968.traveler_email]]
Your Personalized Travel Itinerary: [Destination] - [Dates]
[[nodes.5973.htmlBody]]
This node confirms successful execution to the calling system.
Configuration:
{
"success": true,
"message": "Travel itinerary email sent successfully",
"recipient": "[[nodes.5968.traveler_email]]",
"timestamp": "[[system.timestamp]]"
}
1. Prepare test data: Create a test JSON payload with realistic travel information:
{
"travelerName": "Sarah Johnson",
"email": "sarah.johnson@testcompany.com",
"departureCity": "San Francisco",
"destinationCity": "Miami",
"departureDate": "2024-04-10",
"returnDate": "2024-04-15",
"budget": 2500
}
2. Send test request:
3. Verify at each step:
| Node | What to Check | Expected Result |
|---|---|---|
| Parse & Validate | Data extraction accuracy | All fields correctly mapped, no validation errors |
| Search Flights | API response status | 200 OK, flight results returned |
| Search Hotels | API response status | 200 OK, hotel results returned |
| Merge Data | Combined structure | Single object with flights, hotels, and traveler info |
| Generate Combinations | Itinerary count | 3-5 valid combinations generated |
| Format Email | HTML validity | Professional formatting, all data visible |
| Send Email | Gmail delivery | Email arrives in recipient inbox within 2 minutes |
| Webhook Response | Response status | 200 OK with success message |
4. Check your email:
5. Success indicators:
✅ Webhook returns {"success": true} status
✅ Email arrives within 2 minutes
✅ All flight and hotel data displays correctly
✅ HTML formatting renders properly
✅ Total costs are accurate and within budget
✅ No errors appear in execution logs
Troubleshooting common issues:
Your travel automation agent is now ready to streamline your travel planning process!