Auto-Generate AI Travel Itineraries from n8n Form to Google Doc
User submits departure, destination, dates, and travelers via n8n form → parallel scraping of Booking.com hotels, Google Flights, and OpenAI recommendations → merged into a formatted Google Doc with returned link
- Who
- Travel agencies, freelance travel planners, or anyone automating personalized trip planning
- You get
- Submit a form and automatically receive a Google Doc link with flights, hotels, restaurants, attractions, and a day-by-day itinerary
- You need
- n8n · apify · google-docs
Constraints
Prerequisites: n8n instance; Apify account and API token (configure as both "Apify API" and "HTTP Query Auth" credentials, parameter name: token); OpenAI API key; Google account with OAuth2 for Google Docs/Drive. Costs: Apify billed per Actor run, OpenAI billed per token; check each platform for current pricing. Known limitations: Booking.com and Google Flights data depend on Apify Actor availability; Google Doc output requires a preset folderId; not tested by this site.
What they did
Author teomastro published an n8n official template: after a user submits travel requirements via an n8n form, the system calls Apify in parallel to scrape Booking.com hotels (top 5 by rating) and Google Flights, while running a travel-expert prompt on gpt-4o-mini to generate restaurant, attraction, local tip, and day-by-day itinerary recommendations. Merge and Code nodes then combine and format the three data streams, ultimately creating a Google Doc and returning its link through a form completion page.
How it went
Source report (author_report): Published on n8n.io with 20 nodes, covering form trigger, variable setting, parallel scraping, AI generation, and document output. No specific run count or ROI data provided.
Worth knowing
1. Core dependency on Apify Actor availability; if Actors are deprecated or parameters change, hotel/flight scraping will fail. 2. Google Flights data has no direct booking link, only search reference. 3. AI recommendations are based on general knowledge, not real-time prices or availability; manual verification of restaurant and attraction info is advised. 4. The form completion page says "Top 3 recommended hotels" while the workflow actually fetches and displays top 5, a minor inconsistency. 5. This site has not tested the workflow; reproduction=not_tested. Validate each node's output with test data after setup.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Booking.com Scraper node: connect apifyApi credentials.
- HTTP Request Hotels node: connect httpQueryAuth credentials.
- Google Flights Scraper node: connect apifyApi credentials.
- HTTP Request Flights node: connect httpQueryAuth credentials.
- OpenAI Recommendations Model node: connect OpenAI API credentials.
- Create Document node: connect googleDocsOAuth2Api credentials.
- Update Document node: connect googleDocsOAuth2Api credentials.
Configuration to replace
- Source template is n8n public workflow #13921 (~20 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-24
Steps
Trigger and normalize input
Deploy the Travel Form node in n8n to collect departure airport IATA code, destination city, destination airport IATA code, check-in date, check-out date, and number of travelers. Then use the Set Variables node to normalize form fields into departureAirport, destination, destinationAirport, checkinDate, checkoutDate, and travelers for downstream use.
Fetch three data streams in parallel
From Set Variables, split into three parallel branches: 1. **Booking.com hotel scraping**: Apify node calls Actor `oeiQgfg5fsmIJB7Cn` (Booking Scraper), passing destination, checkinDate, checkoutDate, and travelers, with maxItems=5 and sortBy=bayesian_review_score. Then an HTTP Request node reads results from `https://api.apify.com/v2/datasets/{{ $json.defaultDatasetId }}/items` using HTTP Query Auth (parameter name: token). 2. **Google Flights scraping**: Apify node calls Actor `1dYHRKkEBHBPd0JM7` (Google Flights Scraper), passing departureAirport, destinationAirport, checkinDate, checkoutDate, and travelers. Then an HTTP Request node reads flight results from `{{ $json.output.flightResults }}` with the same HTTP Query Auth. 3. **OpenAI travel recommendations**: Basic LLM Chain node (AI Recommendations) connected to OpenAI Chat Model node (gpt-4o-mini) runs the travel-expert prompt to generate restaurants, attractions, local tips, and a day-by-day itinerary.
Execution prompt · Source text。AI Recommendations node (Basic LLM Chain) text/prompt field
=You are a travel expert. Please provide comprehensive travel recommendations for {{ $('Set Variables').item.json.destination }}. Travel dates: {{ $('Set Variables').item.json.checkinDate }} to {{ $('Set Variables').item.json.checkoutDate }} Number of travelers: {{ $('Set Variables').item.json.travelers }} Please provide: 1. **TOP 10 RESTAURANTS** - Include a mix of local cuisine, fine dining, and casual options. For each restaurant provide: - Name - Type of cuisine - Price range ($, $$, $$$, $$$$) - Brief description - Must-try dish 2. **TOP 10 MONUMENTS & HISTORICAL SITES** - Include famous landmarks and hidden gems. For each provide: - Name - Brief history/description - Best time to visit - Estimated visit duration - Entry fee (if any) 3. **TOP 10 PLACES TO VISIT** - Include parks, neighborhoods, markets, viewpoints, etc. For each provide: - Name - Description - Best time to visit - Tips for visitors 4. **LOCAL TIPS** - Provide: - Best transportation options - Local customs to be aware of - Safety tips - Best neighborhoods to stay in - Common scams to avoid 5. **SUGGESTED ITINERARY** - Create a day-by-day suggested itinerary based on the travel dates. Format your response in a clear, organized manner with proper sections and bullet points.Merge and structure data
The Merge All Data node (3 inputs) combines hotel, flight, and AI recommendation streams into a single item. The Process All Data node (Code, JavaScript) cleans and structures: extracts top 5 hotels from HTTP Request Hotels (name, rating, price, address, URL); extracts top 5 flights from HTTP Request Flights (airline, price, duration, departure/arrival times); extracts recommendation text from AI Recommendations; outputs a standardized object with tripDetails, hotels, flights, recommendations, and generatedAt.
Generate Google Doc and return link
The Create Document node creates a new doc in the specified Google Drive folderId, with a dynamic title: "Travel Plan - {departureAirport} to {destinationAirport} for {travelers} people". The Prepare Document Content node (Code) formats the structured data into plain text with dividers and emoji. The Update Document node inserts the content. The Prepare Form Ending node extracts the documentUrl, and the final Form Ending node shows a completion page to the user with the doc link and content summary.
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant: confirm inputs and permissions first, then import or build manually
This block is the prompt. Ads are never placed here.
You are assisting with reproducing the n8n template "Plan AI-powered travel itineraries with Apify, OpenAI, and Google Docs". First confirm you have the following credentials and permissions: 1. Apify account and API token (create both "Apify API" and "HTTP Query Auth" credentials, with parameter name: token) 2. OpenAI API key (OpenAI credential) 3. Google account with OAuth2 authorization (Google Docs credential), plus a Drive folder ID 4. n8n instance (1.0+ recommended) Once confirmed, import workflow.json or build manually per the node instructions, paying special attention to Set Variables field mapping, Apify Actor IDs, and the Create Document folderId. Test each parallel branch with sample data before the first full run.
To change output channel, replace Google Docs with email/Slack/Notion; to focus on budget or luxury travel, adjust the style description in the AI Recommendations prompt.
Source
Plan AI-powered travel itineraries with Apify, OpenAI, and Google Docs · teomastro · n8n.io · 2026-03-06
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.