Templates / Predict airport queue wait times and email alerts with OpenAI and SendGrid

Predict airport queue wait times and email alerts with OpenAI and SendGrid

Needs changes

by Oneclick AI Squad ✓ · 36 views · created 2026-06-08 · Miscellaneous, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI - Generate Traveler Alert Message (v1.6)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (8)

AI AgentOpenAI Chat Model

What it does

Quick Overview This workflow accepts traveler flight details via webhook or runs every 5 minutes, predicts airport queue wait times with a custom JavaScript model, generates an alert message using OpenAI, emails the traveler via SendGrid, and logs the prediction to Google Sheets. How it works 1. Receives a POST request to a webhook with traveler/flight details or runs on a 5-minute schedule. 2. Normalizes the incoming data into a consistent context (flight, airport/terminal, traveler contact details, and live queue inputs). 3. Waits briefly to throttle processing, then calculates predicted security, immigration, and boarding wait times plus risk flags and an optimal arrival time. 4. Sends the prediction to OpenAI to generate a short, traveler-friendly alert message. 5. Formats the final alert payload (alert level, email subject/body) and prepares a row for tracking. 6. Sends the alert email through the SendGrid Mail Send API and appends the prediction record to a Google Sheets tab. Setup 1. Configure the webhook URL in the system that submits traveler requests (POST to /airport-queue-check) or enable the schedule trigger for proactive runs. 2. Add OpenAI credentials and select the chat model used to generate the traveler message. 3. Add Google Sheets OAuth2 credentials and replace YOURSHEETID and the target range (for example, Predictions!A1:append) in the Google Sheets request URL. 4. Add your SendGrid API key by replacing YOURSENDGRIDAPIKEY in the Authorization header, and update the sender/recipient fields (including ensuring travelerEmail is provided by the trigger payload).

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.