Build a trip itinerary from Gmail booking emails with Gemini and Google Sheets

Go to Workflow
0 views
Built by Oka Hironobu Oka Hironobu
Created on July 23, 2026

Description

Quick Overview
This workflow polls Gmail for unread travel confirmation emails, uses Google Gemini to detect real bookings and extract structured trip details, then upserts each booking into a Google Sheets itinerary and sends a tailored confirmation email before marking the message as read.

How it works
Runs every hour and searches Gmail for unread emails with subjects matching confirmation/booking/reservation/itinerary.
Sends each email’s sender, subject, and body to Google Gemini to determine whether it is a genuine booking and to extract key fields like type, provider, reference number, dates/times, location/address, details, and total cost.
Normalizes the extracted data, generates a fallback reference when missing, and filters out non-booking messages.
Appends or updates the booking in a Google Sheets “Itinerary” tab using the confirmation number to prevent duplicates.
Marks the processed email as read in Gmail.
Emails you a confirmation message via Gmail with content tailored for flights, hotels, or other booking types.

Setup
Connect your Gmail account (for reading messages, marking them as read, and sending notifications).
Add a Google Gemini (PaLM) API credential for the extraction step.
Connect Google Sheets and select the target spreadsheet and the “Itinerary” sheet/tab in the Google Sheets node.
Set your notification email address in the “Set Your Email” step.
Review and adjust the Gmail search query to match how your booking providers format email subjects.

Nodes Used (6)

Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
Google Sheets
n8n-nodes-base.googleSheets
Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured