Rebook disrupted flights and notify passengers with Claude, Google Sheets, and Twilio
Quick overview This workflow runs on a schedule to check flight status against active bookings in Google Sheets, logs an IROPS audit trail, and for severe delays or cancellations uses Anthropic Claude to choose the best alternate flight from inventory and sends passengers an SMS via Twilio.
How it works Runs every few minutes on a scheduled trigger. Pulls the latest FlightStatus and active Bookings data from Google Sheets via the Google Sheets API. Matches each active booking to its flight status, calculates an impact level (On Time, Minor Delay, Severe Delay, or Cancelled), and splits the results into one item per passenger. Appends a timestamped status record for every booking to the OpsLog tab in Google Sheets. For bookings marked Cancelled or Severe Delay, fetches alternate flight inventory from Google Sheets and filters to same-route, seats-available options that match the passenger’s cabin class. Sends the candidate flights and passenger context to Anthropic Claude to select the best alternative and generate a short SMS message (with a safe fallback if parsing fails). Writes the rebooking decision to the Rebookings tab in Google Sheets and sends the notification SMS to the passenger using Twilio.
Setup Create an Anthropic API credential in n8n and select it for the Anthropic Claude model used to generate rebooking decisions. Add Google OAuth2 credentials (or update the HTTP Request authentication) and replace YOUR_SHEET_ID in all Google Sheets API requests. Prepare a Google Sheet with tabs and headers for FlightStatus, Bookings (with an “Active” status column), Inventory, OpsLog, and Rebookings. Add Twilio credentials (Account SID and auth, plus a Twilio phone number) and replace YOUR_TWILIO_ACCOUNT_SID, YOUR_TWILIO_PHONE_NUMBER, and the Authorization header value in the Twilio request. Adjust the schedule interval and (if needed) the delay thresholds used to classify Minor vs Severe delay before activating the workflow.
Related Templates
Track OpenAI Token Usage and AI Agent Metrics with Google Sheets Dashboard
What it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation ...
Summarize SERPBear data with AI (via Openrouter) and save it to Baserow
Who's this for? If you own a website and need to analyze your keyword rankings If you need to create a keyword report on...
Send Daily Weather Forecasts from OpenWeatherMap to Telegram with Smart Formatting
🌤️ Daily Weather Forecast Bot A comprehensive n8n workflow that fetches detailed weather forecasts from OpenWeatherMap...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments