Skip to main content

Track & alert public transport delays using ScrapeGraphAI, Teams and Todoist

Workflow preview

Workflow preview
100%
Track & alert public transport delays using ScrapeGraphAI, Teams and Todoist preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Public Transport Delay Tracker with Microsoft Teams and Todoist ️ COMMUNITY TEMPLATE DISCLAIMER: This is a community contributed template that uses ScrapeGraphAI (a community node). Please ensure ...

Best for

  • Personal Productivity automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-scrapegraphai.scrapegraphai, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.microsoftteams, n8n-nodes-base.todoist

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by vinci-king-01.

Original n8n.io source

1.1 Workflow description

Title
Track & alert public transport delays using ScrapeGraphAI, Teams and Todoist
Workflow name
Track & alert public transport delays using ScrapeGraphAI, Teams and Todoist

Public Transport Delay Tracker with Microsoft Teams and Todoist

⚠️ COMMUNITY TEMPLATE DISCLAIMER: This is a community-contributed template that uses ScrapeGraphAI (a community node). Please ensure you have the ScrapeGraphAI community node installed in your n8n instance before using this template.

This workflow continuously monitors public-transportation websites and apps for real-time schedule changes and delays, then posts an alert to a Microsoft Teams channel and creates a follow-up task in Todoist. It is ideal for commuters or travel coordinators who need instant, actionable updates about transit disruptions.

Pre-conditions/Requirements

Prerequisites

  • An n8n instance (self-hosted or n8n cloud)
  • ScrapeGraphAI community node installed
  • Microsoft Teams account with permission to create an Incoming Webhook
  • Todoist account with at least one project
  • Access to target transit authority websites or APIs

Required Credentials

  • ScrapeGraphAI API Key – Enables scraping of transit data
  • Microsoft Teams Webhook URL – Sends messages to a specific channel
  • Todoist API Token – Creates follow-up tasks
  • (Optional) Transit API key if you are using a protected data source

Specific Setup Requirements

Resource What you need
Teams Channel Create a channel → Add “Incoming Webhook” → copy the URL
Todoist Project Create “Transit Alerts” project and note its Project ID
Transit URLs/APIs Confirm the URLs/pages contain the schedule & delay elements

How it works

This workflow continuously monitors public-transportation websites and apps for real-time schedule changes and delays, then posts an alert to a Microsoft Teams channel and creates a follow-up task in Todoist. It is ideal for commuters or travel coordinators who need instant, actionable updates about transit disruptions.

Key Steps:

  • Webhook (Trigger): Starts the workflow on a schedule or via HTTP call.
  • Set Node: Defines target transit URLs and parsing rules.
  • ScrapeGraphAI Node: Scrapes live schedule and delay data.
  • Code Node: Normalizes scraped data, converts times, and flags delays.
  • IF Node: Determines if a delay exceeds the user-defined threshold.
  • Microsoft Teams Node: Sends formatted alert message to the selected Teams channel.
  • Todoist Node: Creates a “Check alternate route” task with due date equal to the delayed departure time.
  • Sticky Note Node: Holds a blueprint-level explanation for future editors.

Set up steps

Setup Time: 15–20 minutes

  1. Install community node: In n8n, go to “Manage Nodes” → “Install” → search for “ScrapeGraphAI” → install and restart n8n.
  2. Create Teams webhook: In Microsoft Teams, open target channel → “Connectors” → “Incoming Webhook” → give it a name/icon → copy the URL.
  3. Create Todoist API token: Todoist → Settings → Integrations → copy your personal API token.
  4. Add credentials in n8n: Settings → Credentials → create new for ScrapeGraphAI, Microsoft Teams, and Todoist.
  5. Import workflow template: File → Import Workflow JSON → select this template.
  6. Configure Set node: Replace example transit URLs with those of your local transit authority.
  7. Adjust delay threshold: In the Code node, edit const MAX_DELAY_MINUTES = 5; as needed.
  8. Activate workflow: Toggle “Active”. Monitor executions to ensure messages and tasks are created.

Node Descriptions

Core Workflow Nodes:

  • Webhook – Triggers workflow on schedule or external HTTP request.
  • Set – Supplies list of URLs and scraping selectors.
  • ScrapeGraphAI – Scrapes timetable, status, and delay indicators.
  • Code – Parses results, converts to minutes, and builds payloads.
  • IF – Compares delay duration to threshold.
  • Microsoft Teams – Posts formatted adaptive-card-style message.
  • Todoist – Adds a task with priority and due date.
  • Sticky Note – Internal documentation inside the workflow canvas.

Data Flow:

  1. WebhookSetScrapeGraphAICodeIF
    a. IF (true branch)Microsoft TeamsTodoist
    b. IF (false branch) → (workflow ends)

Customization Examples

Change alert message formatting

// In the Code node
const message = `⚠️ Delay Alert:
Route: ${item.route}
Expected: ${item.scheduled}
New Time: ${item.newTime}
Delay: ${item.delay} min
Link: ${item.url}`;
return [{ json: { message } }];

Post to multiple Teams channels

// Duplicate the Microsoft Teams node and reference a different credential
items.forEach(item => {
  item.json.webhookUrl = $node["Set"].json["secondaryChannelWebhook"];
});
return items;

Data Output Format

The workflow outputs structured JSON data:

{
  "route": "Blue Line",
  "scheduled": "2024-12-01T14:25:00Z",
  "newTime": "2024-12-01T14:45:00Z",
  "delay": 20,
  "status": "Delayed",
  "url": "https://transit.example.com/blue-line/status"
}

Troubleshooting

Common Issues

  1. Scraping returns empty data – Verify CSS selectors/XPath in the Set node and ensure the target site hasn’t changed its markup.
  2. Teams message not sent – Check that the stored webhook URL is correct and the connector is still active.
  3. Todoist task duplicated – Add a unique key (e.g., route + timestamp) to avoid inserting duplicates.

Performance Tips

  • Limit the number of URLs per execution when monitoring many routes.
  • Cache previous scrape results to avoid hitting site rate limits.

Pro Tips:

  • Use n8n’s built-in Cron instead of Webhook if you only need periodic polling.
  • Add a SplitInBatches node after scraping to process large route lists incrementally.
  • Enable execution logging to an external database for detailed audit trails.

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 - Webhook – Incoming Request

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

Block 2 - Validate & Parse Request

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

Block 3 - Generate Target URLs

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

Block 4 - Split URLs

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Scrape Schedules & Delays

Type / Role
n8n-nodes-scrapegraphai.scrapegraphAi - scrapegraphAi
Config choices
Version 1

Block 6 - Clean & Enrich Data

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

Block 7 - Delay > 0?

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

Block 8 - Prepare Teams Message

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Send Teams Alert

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

Block 10 - Prepare Todoist Task

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Create Todoist Task

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

Block 12 - Workflow Overview

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

Block 13 - Section – Trigger & Input

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

Block 14 - Section – Scraping & Transformation

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

Block 15 - Section – Conditional Logic & Storage

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

Block 16 - Section – Microsoft Teams Alerts

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

3. Summary Table

Workflow Track & alert public transport delays using ScrapeGraphAI, Teams and Todoist
Complexity advanced
Nodes 16
Categories Personal Productivity, AI Summarization
Author vinci-king-01
Published 22 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12010/12010.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 Track & alert public transport delays using ScrapeGraphAI, Teams and Todoist do?

Public Transport Delay Tracker with Microsoft Teams and Todoist ️ COMMUNITY TEMPLATE DISCLAIMER: This is a community contributed template that uses ScrapeGraphAI (a community node). Please ensure ...

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 Personal Productivity, AI Summarization use case.