This is a submission for the AI Agents Challenge powered by n8n and Bright Data
What I Built
I created an AI-powered Travel Planner using n8n and Bright Data to streamline the process of finding flights and accommodations. This agent takes user input via a form, fetches real-time flight data from Google Flights, scrapes accommodation listings from Airbnb, Booking.com, and Agoda, and uses Google Gemini AI to generate personalized travel recommendations. The recommendations are delivered as professional, mobile-friendly HTML emails, making it easy for users to review and book their ideal travel options.
The agent solves the problem of time-consuming travel planning by automating data collection, analysis, and recommendation generation, ensuring users receive tailored flight and hotel suggestions based on their preferences, such as budget, location, and special requirements (e.g., pet-friendly accommodations).
Preview Workflow
Demo
n8n Workflow
Gist Github : link
Technical Implementation
- System Instructions: The agent is designed to act as a professional travel advisor. It processes user form submissions, transforms data for API compatibility, fetches flight and accommodation data, and generates HTML emails with curated recommendations. Instructions are embedded in Google Gemini nodes to ensure precise data transformation and recommendation logic.
-
Model Choice: The workflow uses Google Gemini (
models/gemini-2.0-flash
for form data transformation andmodels/gemini-2.5-flash
for recommendation generation) due to its ability to handle structured JSON transformations and generate professional HTML content. - Memory: The workflow maintains context through n8n’s node-based data flow, passing JSON objects between nodes. No external memory storage is used, as n8n’s internal data handling suffices.
-
Tools Used:
- n8n Form Trigger: Captures user input (e.g., origin, destination, dates, traveler counts).
- SerpApi: Queries Google Flights for flight data.
- Bright Data Verified Node: Scrapes accommodation data from Airbnb, Booking.com, and Agoda.
- Google Gemini: Transforms form data and generates recommendation emails.
- Gmail: Sends HTML emails with flight and hotel recommendations.
-
n8n Nodes:
Code
,If
,Merge
,Loop
,Wait
,Edit
, andAggregate
nodes for data processing, conditional logic, and workflow control.
Bright Data Verified Node
The Bright Data Verified Node is integral to the accommodation search process. It is used in three nodes to scrape data from major platforms:
-
Airbnb Properties Information: Sends a POST request to Bright Data’s API (
https://api.brightdata.com/datasets/v3/trigger
) with parameters like location, check-in/check-out dates, and number of travelers/pets to discover pet-friendly homestays. - Booking Hotel Listings with Pricing: Queries Booking.com with similar parameters, focusing on hotel listings with pricing details.
- Agoda Properties Listings with Pricing: Queries Agoda for additional accommodation options.
The node outputs a snapshot_id
for each platform, which is monitored by the Check the status snapshot
node until the status is ready
. The Download the snapshot content
node then retrieves the scraped data, which is analyzed by Google Gemini to select the best hotel match. Bright Data’s ability to handle real-time web scraping ensures up-to-date and accurate accommodation data, critical for reliable recommendations.
Journey
Building this travel planner was an exciting challenge. My goal was to create a tool that simplifies the overwhelming process of planning a trip, especially for families with specific needs like pet-friendly accommodations.
Process
- Planning: I started by mapping out the user journey: submitting a form, fetching data, analyzing options, and delivering recommendations. I chose n8n for its flexibility and Bright Data for its robust web scraping capabilities.
- Form Design: I designed a comprehensive form to capture essential travel details, ensuring fields like "Pets" and "Travel Preferences" allowed for nuanced preferences.
- Data Integration: Integrating SerpApi for flights and Bright Data for accommodations was straightforward, but transforming form data into API-compatible formats required careful configuration of the Google Gemini node.
- Recommendation Logic: I leveraged Google Gemini’s AI to analyze flight and hotel data, scoring options based on user preferences (e.g., proximity to public transport, pet-friendliness).
- Email Design: Crafting mobile-friendly, professional HTML emails was critical. I used inline CSS and tested the output to ensure compatibility with Gmail.
What I Learned
- n8n’s Power: n8n’s node-based architecture is incredibly versatile for orchestrating complex workflows involving multiple APIs.
- Bright Data’s Capabilities: The Bright Data Verified Node simplified web scraping, allowing me to focus on data analysis rather than scraping mechanics.
- AI Prompt Engineering: Writing precise prompts for Google Gemini was key to achieving accurate data transformations and high-quality recommendations.
- User-Centric Design: Designing the form and email outputs with the user in mind (e.g., mobile-friendly emails, clear booking links) significantly improved the workflow’s usability.
Conclusion
This AI-powered Travel Planner demonstrates how n8n and Bright Data can transform a complex task like travel planning into a seamless, automated experience. By integrating real-time data scraping, AI analysis, and email delivery, the agent delivers personalized travel recommendations that save time and meet user needs. I’m excited to share this project with the DEV community and hope it inspires others to explore the possibilities of automation in travel and beyond!
Team Submission: This is a solo project, I’d like to thank the n8n and Bright Data communities for their excellent documentation and support.
Top comments (0)