Back to Templates

Automate Hotel Booking Requests from Gmail to Google Sheets with GPT-4o-mini

Created by

Created by: Gtaras || tarasidis

Gtaras

Last update

Last update 2 days ago

Share


Who’s it for

This workflow is for hotel managers, travel agencies, and hospitality teams who receive booking requests via email. It eliminates the need for manual data entry by automatically parsing emails and attachments, assigning booking cases to the right teams, and tracking performance metrics.

How it works

  1. Watches your Gmail inbox for incoming booking emails.
  2. Filters only messages that match booking-related keywords.
  3. Extracts structured data from the email body or attached PDFs using OpenAI GPT-4o-mini.
  4. Validates extracted data for missing or invalid fields.
  5. Applies business rules to:
    • Assign cases based on room count, urgency, and VIP status.
    • Log each booking in Google Sheets.
    • Send confirmation emails to clients.
  6. Logs errors and success metrics for full transparency.

Setup requirements

  • Gmail account (OAuth2 connected)
  • Google Sheets with 4 tabs: Cases, Team Assignments, Error Logs, Success Metrics
  • OpenAI API key (GPT-4o-mini recommended)
  • n8n Cloud or self-hosted instance

How to set up

  1. Create your Google Sheet and rename tabs accordingly.
  2. Add Gmail, Google Sheets, and OpenAI credentials in n8n Settings → Credentials.
  3. Open the "Configuration: User Settings" node at the start of the workflow and paste your Google Sheet ID and Admin Email there.
  4. Adjust your team assignment logic in the Apply Business Rules Code node.
  5. Modify email templates (confirmation/error) with your own branding.
  6. Test with a few sample booking emails and tweak filters if needed.

How to customize

  • Update the Filter Booking Emails node to change keyword triggers.
  • Edit the Apply Business Rules node to fit your company’s internal logic.
  • Add new tabs in Google Sheets (e.g., “VIP Tracking” or “Revenue Metrics”).
  • Adjust AI temperature or model depending on desired consistency.

🧾 Google Sheets Structure Description

This workflow uses a Google Sheets document with four main tabs to track and manage hotel booking requests.
Each tab serves a specific purpose to keep data organized, transparent, and easy to audit.

1️⃣ Cases

This is the main data log for all incoming booking requests.
Each row represents a unique case extracted from an email or attachment.

Columns include:

  • case_id → Unique case identifier generated by the workflow

  • processed_date → Timestamp when the workflow processed the booking

  • travel_agency, contact_person, contact_email, contact_phone → Contact details extracted from the email

  • number_of_rooms, check_in_date, check_out_date, total_nights, total_guests → Booking details parsed by the AI

  • special_requests → Optional notes or preferences (e.g., airport transfer, room type)

  • assigned_team, team_email, priority, status → Automatically set based on business rules

  • days_until_checkin → Dynamic field showing urgency (calculated in workflow)

  • original_sender, original_subject → Email metadata for traceability

🟢 Purpose: Acts as the central database for all bookings, allowing the team to filter, report, and follow up directly from Google Sheets.

2️⃣ Team Assignments

Stores internal routing and assignment details for each booking case.
It ensures bookings are sent to the correct handling team based on predefined logic.

Columns include:

  • timestamp → When the case was routed

  • case_id → Link to the corresponding record in the Cases tab

  • assigned_team, team_email → Which department or team handles this request

  • priority → Auto-set based on room count or urgency (High, Medium, Normal)

  • number_of_rooms, travel_agency, check_in_date → Key booking fields for quick review

🟢 Purpose: Helps hotel managers visualize team load, response rates, and distribution of cases.

3️⃣ Error Log 🚫

This sheet is a critical audit trail that captures details about any failed processing steps or instances where the input data was incomplete or malformed.
It acts as a safety net to ensure no booking request is permanently lost due to a technical error or missing information.

Key columns include:

  • timestamp → The exact moment the error occurred during the workflow run.

  • error_type → A categorization of the failure (e.g., MISSING_REQUIRED_FIELDS).

  • error_message → A detailed technical explanation of why the process failed (e.g., "Missing required fields: check_in_date, check_out_date"). This is essential for debugging!

  • original_subject → The subject line of the original email, helping you trace the error back to the source.

  • original_sender → The email address that sent the request.

  • email_snippet → A short excerpt of the email body (or the first few lines) for immediate context.

🟢 Purpose: Ensures data integrity and non-loss of requests. It provides developers (like you!) with the necessary information to quickly identify, debug, and fix issues, allowing you to manually process the affected booking if needed.

4️⃣ Success Metrics 📈

This sheet is where the results of your automation are tracked to prove its value and monitor its performance over time.
It transforms raw process data into key performance indicators (KPIs).

Key columns include:

  • timestamp → When the successful action was recorded.

  • case_id → Link to the corresponding booking in the Cases tab.

  • processing_time_seconds → The time savings achieved by the automation, measured in how long the workflow took to run versus how long a human would typically take. I think this is a super important metric for showing the value of automation!

  • assigned_team → The team that eventually handled the successfully processed booking.

  • priority → The priority level of the case.

  • number_of_rooms, email_sent, record_updated → Flags or values indicating successful actions within the workflow (e.g., YES under record_updated means the main Cases sheet was successfully updated).

🟢 Purpose: Acts as the reporting backbone for the workflow. It allows the business to measure the efficiency, speed, and accuracy of the automated process, providing clear data on the Return on Investment (ROI) of your work.

🙋 Support & Assistance

If you encounter any issues during setup, have questions about customization, or want to discuss integration with other systems (like ServiceNow!), please reach out to our dedicated support email: [email protected]