Back to Templates

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

Created by

Created by: Gtaras || tarasidis

Gtaras

Last update

Last update 5 hours 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.

What it does

This workflow goes beyond simple automation by including enterprise-grade logic and security:

  • 🛡️ Gatekeeper: Watches your Gmail and filters irrelevant emails before spending money on AI tokens.
  • 🧠 AI Brain: Uses OpenAI (GPT-5-mini) to extract structured data from unstructured email bodies and PDF attachments.
  • ⚖️ Business Logic: Automatically routes tasks to different teams based on urgency, room count, and VIP status.
  • 🔒 Security: Catches PII (like credit card numbers) and scrubs them before they hit your database.
  • 🚨 Safety Net: If anything breaks, a dedicated error handling path logs the issue immediately so no booking is lost.
  • 📈 ROI Tracking: Calculates the time saved per booking to prove the value of automation.

How to set up

  1. Create your Google Sheet: Create a new sheet and rename the tabs to: Cases, Team Assignments, Error Logs, Success Metrics.
  2. Add Credentials: Go to n8n Settings → Credentials and add your Gmail (OAuth2), Google Sheets, and OpenAI API keys.
  3. Configure User Settings: Open the "Configuration: User Settings" node at the start of the workflow. Paste your specific Google Sheet ID and Admin Email there.
  4. Adjust Business Rules: Open the "Apply Business Rules" node (Code node) to adjust the logic for team assignment (e.g., defining what counts as a "VIP" booking).
  5. Customize Templates: Modify the email templates in the Gmail nodes to match your hotel's branding.
  6. Test: Send a sample booking email to yourself to verify the filters and data extraction.

Setup requirements

  • Gmail account (OAuth2 connected)
  • Google Sheets (with the 4 tabs listed below)
  • OpenAI API key (GPT-5-mini recommended)
  • n8n Cloud or self-hosted instance

How to customize

  • Filter Booking Emails: Update the trigger node keywords to match your specific email subjects (e.g., "Reservation", "Booking Request").
  • Apply Business Rules: Edit the Javascript in the Code node to fit your company’s internal logic (e.g., changing priority thresholds).
  • New Metrics: Add new columns in the Google Sheet (e.g., “Revenue Metrics”) and map them in the "Update Sheet" node.
  • AI Model: Switch to GPT-5 if you need higher reasoning capabilities for complex PDF layouts.

Google Sheets Structure Description

This workflow uses a Google Sheets document with four main tabs to track and manage hotel booking requests.

1. Cases

This is the main data log for all incoming booking requests.

  • case_id: Unique identifier generated by the workflow.
  • processed_date: Timestamp when the workflow processed the booking.
  • travel_agency / contact_details: Extracted from the email.
  • number_of_rooms / check_in_date: Booking details parsed by the AI.
  • special_requests: Optional notes (e.g., airport transfer).
  • assigned_team / priority: Automatically set based on business rules.
  • days_until_checkin: Dynamic field showing urgency.

2. Team Assignments

Stores internal routing and assignment details.

  • timestamp: When the case was routed.
  • case_id: Link to the corresponding record in the Cases tab.
  • assigned_team / team_email: Which department handles this request.
  • priority: Auto-set based on room count or urgency.

3. Error Log

A critical audit trail that captures details about any failed processing steps.

  • error_type: Categorization of the failure (e.g., MISSING_REQUIRED_FIELDS).
  • error_message: Detailed technical explanation for debugging.
  • original_sender / snippet: Context to help you manually process the request if needed.

4. Success Metrics

Tracks the results of your automation to prove its value.

  • processing_time_seconds: The time savings achieved by the automation (run time vs. human time).
  • record_updated: Confirmation that the database was updated.

🙋 Support

If you encounter any issues during setup or have questions about customization, please reach out to our dedicated support email: [email protected]