Skip to main content

Real-time flight tracking with Aviation API, Slack & SendGrid/Twilio alerts

Workflow preview

Workflow preview
100%
Real-time flight tracking with Aviation API, Slack & SendGrid/Twilio alerts preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This automated n8n workflow continuously monitors airline schedule changes by fetching real time flight data, comparing it with stored schedules, and instantly notifying both internal teams and aff...

Best for

  • Miscellaneous automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.postgres, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Oneclick AI Squad.

Original n8n.io source

1.1 Workflow description

Title
Real-time flight tracking with Aviation API, Slack & SendGrid/Twilio alerts
Workflow name
Real-time flight tracking with Aviation API, Slack & SendGrid/Twilio alerts

This automated n8n workflow continuously monitors airline schedule changes by fetching real-time flight data, comparing it with stored schedules, and instantly notifying both internal teams and affected passengers through multiple communication channels. The system ensures stakeholders are immediately informed of any flight delays, cancellations, gate changes, or other critical updates.

Good to Know

  • Flight data accuracy depends on the aviation API provider's update frequency and reliability
  • Critical notifications (cancellations, major delays) trigger immediate passenger alerts via SMS and email
  • Internal Slack notifications keep operations teams informed in real-time
  • Database logging maintains a complete audit trail of all schedule changes
  • The system processes only confirmed schedule changes to avoid false notifications
  • Passenger notifications are sent only to those with confirmed tickets for affected flights

How It Works

  1. Schedule Trigger - Automatically runs every 30 minutes to check for flight schedule updates
  2. Fetch Airline Data - Retrieves current flight information from aviation APIs
  3. Get Current Schedules - Pulls existing schedule data from the internal database
  4. Process Changes - Compares API data with database records to identify schedule changes
  5. Check for Changes - Determines if any updates require processing and notifications
  6. Update Database - Saves schedule changes to the internal flight database
  7. Notify Slack Channel - Sends operational updates to the flight operations team
  8. Check Urgent Notifications - Identifies critical changes requiring immediate passenger alerts
  9. Get Affected Passengers - Retrieves contact information for passengers on changed flights
  10. Send Email Notifications - Dispatches detailed schedule change emails via SendGrid
  11. Send SMS (Critical Only) - Sends urgent text alerts for cancellations and major delays
  12. Update Internal Systems - Syncs changes with other airline systems via webhooks
  13. Log Sync Activity - Records all synchronization activities for audit and monitoring

Data Sources

The workflow integrates with multiple data sources and systems:

  1. Aviation API (Primary Data Source)

    • Real-time flight status and schedule data
    • Departure/arrival times, gates, terminals
    • Flight status (on-time, delayed, cancelled, diverted)
    • Aircraft and route information
  2. Internal Flight Database

    • flight_schedules table - Current schedule data with columns:

      • flight_number (text) - Flight identifier (e.g., "AA123")
      • departure_time (timestamp) - Scheduled departure time
      • arrival_time (timestamp) - Scheduled arrival time
      • status (text) - Flight status (active, delayed, cancelled, diverted)
      • gate (text) - Departure gate number
      • terminal (text) - Terminal identifier
      • airline_code (text) - Airline IATA code
      • origin_airport (text) - Departure airport code
      • destination_airport (text) - Arrival airport code
      • aircraft_type (text) - Aircraft model
      • updated_at (timestamp) - Last update timestamp
      • created_at (timestamp) - Record creation timestamp
    • passengers table - Passenger contact information with columns:

      • passenger_id (integer) - Unique passenger identifier
      • name (text) - Full passenger name
      • email (text) - Email address for notifications
      • phone (text) - Mobile phone number for SMS alerts
      • notification_preferences (json) - Communication preferences
      • created_at (timestamp) - Registration timestamp
      • updated_at (timestamp) - Last profile update
    • tickets table - Booking and ticket status with columns:

      • ticket_id (integer) - Unique ticket identifier
      • passenger_id (integer) - Foreign key to passengers table
      • flight_number (text) - Flight identifier
      • flight_date (date) - Travel date
      • seat_number (text) - Assigned seat
      • ticket_status (text) - Status (confirmed, cancelled, checked-in)
      • booking_reference (text) - Booking confirmation code
      • fare_class (text) - Ticket class (economy, business, first)
      • created_at (timestamp) - Booking timestamp
      • updated_at (timestamp) - Last modification timestamp
    • sync_logs table - Audit trail and system logs with columns:

      • log_id (integer) - Unique log identifier
      • workflow_name (text) - Name of the workflow that created the log
      • total_changes (integer) - Number of schedule changes processed
      • sync_status (text) - Status (completed, failed, partial)
      • sync_timestamp (timestamp) - When the sync occurred
      • details (json) - Detailed log information and changes
      • error_message (text) - Error details if sync failed
      • execution_time_ms (integer) - Processing time in milliseconds
  3. Communication Channels

    • Slack - Internal team notifications
    • SendGrid - Passenger email notifications
    • Twilio - Critical SMS alerts
    • Internal webhooks - System integrations

How to Use

  • Import the workflow into your n8n instance
  • Configure aviation API credentials (AviationStack, FlightAware, or airline-specific APIs)
  • Set up PostgreSQL database connection with required tables
  • Configure Slack bot token for operations team notifications
  • Set up SendGrid API key and email templates for passenger notifications
  • Configure Twilio credentials for SMS alerts (critical notifications only)
  • Test with sample flight data to verify all notification channels
  • Adjust monitoring frequency and severity thresholds based on operational needs
  • Monitor sync logs to ensure reliable data synchronization

Requirements

  1. API Access

    • Aviation data provider (AviationStack, FlightAware, etc.)
    • SendGrid account for email delivery
    • Twilio account for SMS notifications
    • Slack workspace and bot token
  2. Database Setup

    • PostgreSQL database with flight schedule tables
    • Passenger and ticket management tables
    • Audit logging tables for tracking changes
  3. Infrastructure

    • n8n instance with appropriate node modules
    • Reliable internet connection for API calls
    • Proper credential management and security

Customizing This Workflow

Modify the Process Changes node to adjust change detection sensitivity, add custom business rules, or integrate additional data sources like weather or airport operational data. Customize notification templates in the email and SMS nodes to match your airline's branding and communication style. Adjust the Schedule Trigger frequency based on your operational requirements and API rate limits.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.1

Block 2 - Fetch Airline Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 3 - Get Current Schedules

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.4

Block 4 - Process Changes

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Check for Changes

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 6 - Update Database

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.4

Block 7 - Notify Slack Channel

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 8 - Check Urgent Notifications

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 9 - Get Affected Passengers

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.4

Block 10 - Send Email Notifications

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 11 - Send SMS (Critical Only)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 12 - Update Internal Systems

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 13 - Log Sync Activity

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.4

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Real-time flight tracking with Aviation API, Slack & SendGrid/Twilio alerts
Complexity advanced
Nodes 15
Categories Miscellaneous
Author Oneclick AI Squad
Published 21 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6227/6227.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Real-time flight tracking with Aviation API, Slack & SendGrid/Twilio alerts do?

This automated n8n workflow continuously monitors airline schedule changes by fetching real time flight data, comparing it with stored schedules, and instantly notifying both internal teams and aff...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Miscellaneous use case.