Event

trigger.onfleet_event
TriggerBusiness appsconnection requiredruns in-engine

Registers a webhook in the tenant's Onfleet organisation on publish and starts one run per delivered event, verified against Onfleet's HMAC-SHA512 signature.

Start a run when Onfleet fires a webhook trigger (task, worker, route plan).

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Onfleet
Secret shape
{"api_key": "…", "webhook_secret": "<hex from the dashboard>"}
Resolved by
config.connection_id, else node.connection_id
Note
Two credentials, and the second is not optional here: the API key registers the webhook, and the organisation's webhook secret (Configuration → API & Webhook → Show Secret, a hexadecimal string) is what every delivery is verified against. No Onfleet API call returns that secret, so it has to be stored on the connection.

Configuration

2 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
trigger
The Onfleet trigger to subscribe to. One webhook carries exactly one — add a second trigger node for a second event.
stringNotaskCompletedone of "taskStarted", "taskEta", "taskArrival", "taskCompleted", "taskFailed", "workerDuty", "taskCreated", "taskUpdated", "taskDeleted", "taskAssigned", "taskUnassigned", "taskDelayed", "taskCloned", "smsRecipientResponseMissed", "workerCreated", "workerDeleted", "SMSRecipientOptOut", "autoDispatchJobCompleted", "taskBatchCreateJobCompleted", "routeOptimizationJobCompleted", "routePlanCreated", "routePlanStarted", "routePlanCompleted", "workerUpdated", "routePlanUpdated", "routePlanUnassigned", "routePlanAssigned", "routePlanDelayed", "predictedTaskDelay"—
threshold
The value the trigger fires relative to: seconds for taskEta, taskDelayed and predictedTaskDelay, metres for taskArrival. Every other trigger ignores it.
numberNo—≥ 0—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "trigger": "taskCompleted"
}

Output

One shape.

onfleet event

The flattened Onfleet delivery. data's own keys vary by trigger, so the shape is open below the declared fields.

Extra keys beyond the ones listed can appear.

FieldTypeExample
trigger_name
The Onfleet trigger that fired, e.g. taskCompleted. One webhook carries one trigger, so this is the trigger this node subscribed to.
stringtaskCompleted
trigger_id
The same trigger as Onfleet's numeric id (0-30).
number3
time
When Onfleet raised the event, Unix time in milliseconds. Every Onfleet time field is milliseconds except etaSeconds.
number1717070400000
task_id
The task the event is about, or empty on a trigger that is not about a task (workerCreated, routePlanUpdated…).
string11z1BbsQUZFHD1XAd~emDDeK
worker_id
The driver the event is about or was caused by; empty where the trigger does not name one.
string1LjhGUWdxFbvdsTAAXs0TFos
admin_id
The administrator who caused the event, where a person in the dashboard did rather than a driver in the app.
string—
route_plan_id
The route plan the event is about, on the routePlan* triggers.
string—
action_context
Who or what caused the event — Onfleet's {type, id} pair, e.g. DRIVER or API. Empty where Onfleet sends none.
object—
data
The full objects for this trigger — data.task, data.worker, data.routePlan and so on. Which keys are present depends on the trigger.
object—
payload
The body exactly as Onfleet sent it, for anything the fields above do not lift out. Properties not relevant to the trigger arrive as null.
object—
{
  "action_context": {
    "id": "1LjhGUWdxFbvdsTAAXs0TFos",
    "type": "DRIVER"
  },
  "admin_id": "",
  "data": {
    "task": {
      "completionDetails": {
        "notes": "Left with reception",
        "success": true
      },
      "destination": {
        "address": {
          "number": "543",
          "street": "Howard St"
        }
      },
      "id": "11z1BbsQUZFHD1XAd~emDDeK",
      "shortId": "8dc4e2d8",
      "state": 3
    }
  },
  "payload": {
    "time": 1717070400000,
    "triggerId": 3,
    "triggerName": "taskCompleted"
  },
  "route_plan_id": "",
  "task_id": "11z1BbsQUZFHD1XAd~emDDeK",
  "time": 1717070400000,
  "trigger_id": 3,
  "trigger_name": "taskCompleted",
  "worker_id": "1LjhGUWdxFbvdsTAAXs0TFos"
}

Notes

  • Publishing creates the webhook in Onfleet; unpublishing, disabling or archiving deletes it. A workflow that is off is off at Onfleet too.
  • KNOWN LIMITATION: Onfleet validates the URL with a GET carrying ?check=… before it will create the webhook, and Mantle's provider ingress currently serves POST only — so publishing fails with Onfleet's validation error until that route answers GET.
  • Onfleet retries a failed delivery every 30 seconds and disables the webhook after 300 consecutive failures. Publishing again re-registers it.
  • Deliveries carry no event id, so redelivery is deduplicated on the trigger, the event time and a digest of the body — all of it Onfleet's own data.

See Event run in a workflow.

In a technical demo we add the Onfleet connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.