Templates / Optimize fleet routes and anomaly alerts with GPT-4, Slack and Postgres

Optimize fleet routes and anomaly alerts with GPT-4, Slack and Postgres

Ready for 3.0

by Cheng Siong Chin ✓ · 40 views · created 2026-01-18 · Engineering, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 28 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Postgres and Slack.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).

  1. Workflow Configuration (Edit Fields (Set)): sets 9 fields: trafficApiUrl, weatherApiUrl, maxSpeedThreshold…
  2. Merge: merges the data from its input branches
  3. Normalize Telemetry Data (Code): runs custom JavaScript code
  4. Validate Data Quality (Code): runs custom JavaScript code
  5. Remove Duplicate Events (Remove Duplicates): removes duplicate items
  6. Fetch Traffic & Weather Data (HTTP Request): calls an HTTP API
  7. Merge: merges the data from its input branches
  8. Route Optimization Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4 Model; output parser: Route Optimization Output Parser
  9. Anomaly Detection Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4 Model for Anomaly; output parser: Anomaly Detection Output Parser
  10. Apply Business Rules (Code): runs custom JavaScript code

…plus 12 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelPostgresSlack

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (17)

From the author

How It Works This workflow automates veterinary clinic operations and client communications for animal hospitals and veterinary practices managing appointments, inventory, and patient care. It solves the dual challenge of maintaining medical supply levels…

Excerpt from Cheng Siong Chin's description on n8n.io.

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.