Optimize fleet routes and anomaly alerts with GPT-4, Slack and Postgres
Ready for 3.0What 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).
- Workflow Configuration (Edit Fields (Set)): sets 9 fields: trafficApiUrl, weatherApiUrl, maxSpeedThreshold…
- Merge: merges the data from its input branches
- Normalize Telemetry Data (Code): runs custom JavaScript code
- Validate Data Quality (Code): runs custom JavaScript code
- Remove Duplicate Events (Remove Duplicates): removes duplicate items
- Fetch Traffic & Weather Data (HTTP Request): calls an HTTP API
- Merge: merges the data from its input branches
- Route Optimization Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4 Model; output parser: Route Optimization Output Parser
- Anomaly Detection Agent (AI Agent): runs an AI agent, with model: OpenAI GPT-4 Model for Anomaly; output parser: Anomaly Detection Output Parser
- Apply Business Rules (Code): runs custom JavaScript code
…plus 12 more steps. See the full node list below.
Services it uses
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)
- Webhook
n8n-nodes-base.webhook - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - Remove Duplicates
n8n-nodes-base.removeDuplicates - HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Wait
n8n-nodes-base.wait - Postgres
n8n-nodes-base.postgres - Slack
n8n-nodes-base.slack - Send Email
n8n-nodes-base.emailSend - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook
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…