The detection pipeline
The Worlds platform uses computer vision to detect and track objects (people, vehicles, equipment) across camera feeds in real time. The n8n integration turns those raw detections into automated business logic. Here’s how data flows from camera to action:What each layer does
Worlds Detection API
The Worlds platform processes camera feeds and produces detections — each detection identifies an object (person, forklift, AMR, etc.) with a bounding box, position, and timestamp. Detections are streamed in real time via GraphQL WebSocket subscriptions.State Machine
The state machine is a Go service that sits between the Worlds API and n8n. It solves a critical problem: raw detection streams arrive at high frequency and out of order. The state machine:- Maintains track state — aggregates individual detections into coherent tracks with position, velocity, and zone data
- Calculates zone intersections — determines which zones a track is in and how much it overlaps
- Tracks dwell time — measures how long an object has been in each zone
- Calculates velocity — both pixel-based and geo-referenced
- Emits signals — sends
track_created,track_updated, andtrack_expiredevents to n8n via webhooks - Ensures ordering — processes detections sequentially per data source to prevent race conditions
n8n Workflow
Your workflow receives fully enriched track state data and applies business logic using Worlds custom nodes:- Trigger Node — entry point, receives track state from the state machine
- Check Nodes — evaluate conditions using composable Type I/II/III checks
- Event Orchestrator — decides whether to create, update, or close an event based on check results
- Event Manager — executes the event action in the Worlds platform
- Action Nodes — supplementary operations like image capture, GIF generation, or email alerts
The three-step workflow pattern
Every Worlds n8n workflow follows the same fundamental pattern:Inject raw data
The Detection Webhook Trigger receives enriched track state from the state machine. Each incoming item contains the track’s position, velocity, zone data, dwell times, and zone intersection percentages.
Apply business logic
Check Nodes (Type I, II, III) evaluate whether conditions are met. Type I checks zone thresholds (intersection, dwell time, velocity), Type II checks zone sequences, and Type III checks track-to-track interactions. These compose together to express any detection use case.
Key concepts
Before building workflows, it helps to understand a few core concepts:Tracks & Zones
What tracks and zones are, and the data they carry.
Signals
When and why track_created, track_updated, and track_expired fire.
Composing Check Types
How to combine Type I, II, and III checks to build any use case.
Detection Pipeline
Deep dive into how data moves through the system.

