Overview
An n8n workflow that watches a Gmail label for booking confirmations, reads the email and any PDF, extracts each booking with an AI Agent node, and adds approved events to a separate travel calendar.
Problem or Objective
- Which agents run multi-step workflows across your apps?
- Which agents read and update your calendar on request?
More in Workflow Automation
AI Agents and Models
Tools and Integrations
- Tools
- n8n · Gmail · Google Calendar
- Prerequisites
- An n8n instance (cloud or self-hosted), Google credentials for Gmail and Google Calendar, and a chat model API key.
How It Works
In Gmail, create a label for confirmations and a filter that applies it to mail from your airlines, hotels and rail or car hire firms. In n8n, start with a Gmail Trigger on Message Received, limited to that label. If the message has a PDF, fetch the attachment (check how your Gmail node version downloads attachments) and turn it into text with Extract From File using Extract From PDF. Give the email text and PDF text to an AI Agent node with a chat model and ask it for each booking it finds: type, provider, confirmation number, start and end, the local time zone of each, and the address. Use the Google Calendar node's Get Many on your travel calendar to skip any booking whose confirmation number is already there. Then send yourself the proposed events through an approval step (n8n offers human-in-the-loop approvals; check the channel you choose works in your setup), and only after you approve does the Google Calendar node Create the events in the travel calendar.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up n8n.
- Connect the toolsConnect the tools this workflow relies on: n8n, Gmail, Google Calendar.
- Check the prerequisitesAn n8n instance (cloud or self-hosted), Google credentials for Gmail and Google Calendar, and a chat model API key.
- Gather your detailsCollect what the prompt asks for: Email body, Text from the PDF, Your home time zone.
- Run the starter promptPaste the starter prompt below into n8n and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at docs.n8n.io before you rely on it.
Practical Starter Prompt: Extract bookings from a confirmation
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Below is a booking confirmation email and, if present, the text of its PDF. Email: [Email body]. PDF text: [Text from the PDF]. List every booking you find as JSON with these fields: type, provider, confirmation_number, start (local date and time), start_time_zone, end (local date and time), end_time_zone, address, notes. Use the traveller's home time zone [Your home time zone] only when the email gives none, and say so in notes. Do not guess missing values; leave them empty. These events go to me for approval before anything is added to the calendar.The workflow sends you the proposed events first. Only after you approve them does the Google Calendar node create them in the travel calendar; anything you reject is dropped.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. n8n's docs describe a Gmail Trigger that polls for new messages and can be limited to labels, an Extract From File node that reads PDFs, an AI Agent node that connects a chat model to tools, and a Google Calendar node that can create and list events. n8n's site mentions human-in-the-loop approvals. How accurately a model reads a given booking format is not covered.
Limitations and Considerations
Check each proposed event against the original email before approving, especially dates that cross midnight and flights between time zones, because the model can misread them. Use a separate calendar so mistakes are easy to delete. The Gmail and Google Calendar credentials give n8n access to your mail and calendar, so limit the trigger to the label and store credentials in n8n. Run it on a few old confirmations first. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Official Website
The official site of the main tool or project in this use case.
Related Videos
About n8n-io/n8n
Give Your Agent Tools (n8n Agents Course 5/7) (opens in a new tab)
Walkthrough of n8n by n8n: it is on the project’s own channel.
Watch on YouTube (opens in a new tab)About n8n-io/n8n
n8n AI Nodes: Connect OpenAI, Claude, and Local Models (opens in a new tab)
Walkthrough of n8n by AI Daily Lab: its description links the GitHub repository.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Gmail Trigger | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 00:17 UTC
What this source supports
- Message Received: the node triggers for new messages at the selected Poll Time.
- Label Names or IDs: only trigger on messages with the selected labels added to them.
- Extract From File | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 04:17 UTC
What this source supports
- The Extract From File node extracts data from a binary format file and converts it to JSON.
- Operations include Extract From PDF: extract fields from Portable Document Format files.
- AI Agent | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- The AI Agent node lets you build an AI agent in n8n: connect a chat model and one or more tools, and the agent decides which tools to call to complete a task.
- Google Calendar | Nodes | n8n Docs (opens in a new tab)
Project documentation · docs.n8n.io · Undated · Source checked 27 Nov 2026, 07:01 UTC
What this source supports
- Event operations include Create (add an event to calendar), Get Many (retrieve all events from a calendar) and Update.
- AI Workflow Automation Platform - n8n (opens in a new tab)
Project documentation · n8n.io · Undated · Source checked 25 Nov 2026, 11:59 UTC
What this source supports
- Use structured inputs and outputs for AI actions. Add human-in-the-loop approvals and rule-based automation.

