
Connectors / Supply chain · HTTP Connector
Automate Onfleet with Tray.ai
Create a task, create an order and create a route plan in Onfleet, and start a workflow when Onfleet sends “Task started”.
What can you do with Onfleet on Tray.ai?
Onfleet is last-mile delivery management software for dispatching drivers, planning routes, tracking deliveries, and notifying recipients. Tray.ai connects to Onfleet through the HTTP Connector, so your workflows can call the Onfleet API alongside the rest of your stack.
- When Onfleet sends “Task completed”, mark the order delivered in your order management system.
- After “Task failed”, open a case in your help desk so support contacts the customer.
- Create a task in Onfleet for each new delivery order from your online store.
- When Onfleet sends “Task ETA”, text the customer an arrival update.
- Connects through
- HTTP Connector
- Authentication
- Basic authentication
- Base URL
- https://onfleet.com/api/v2
Set it up
Connect Onfleet to Tray.ai
Each step uses Onfleet's own API details, from its documentation.
Step 1
Save Onfleet's username and password
Save the credentials Onfleet gives you as a Tray.ai authentication. The HTTP Client sends them as basic auth. They stay out of the workflow and out of the logs.
Step 2
Point the HTTP Client at the API
Add an HTTP Client step and use https://onfleet.com/api/v2 as the base URL. Or paste a cURL example from Onfleet's API docs, and Tray.ai fills in the method, URL, and headers.
Step 3
Start with “List tasks”
It's one of 14 documented actions, under Tasks. The response comes back as data the next step can map into your other apps.
Step 4
Start workflows from Onfleet events
Give Onfleet the URL of a Tray.ai webhook trigger. “Task started” can then start a workflow, and so can 17 other events.
Workflows to build with Onfleet
Each one uses actions and events from Onfleet's own API documentation.
Create Onfleet delivery tasks from Shopify orders
When
An order is paid in Shopify
Then
- Create a task with the delivery address and recipient details
- Save the task ID on the order in Shopify
With Shopify
Alert support when an Onfleet delivery fails
When
Task failed
Then
- Get a task to read the recipient and failure notes
- Create a ticket for the support team in Zendesk
With Zendesk
Log completed Onfleet deliveries in Snowflake
When
Task completed
Then
- Get a task for the delivery details
- Add the delivery and completion time to a table in Snowflake
With Snowflake
Apps you can build on Onfleet data
Internal tools your team can build with an AI assistant, each one using Onfleet calls from its API documentation.
Failed delivery queue
Shows failed delivery tasks as they happen with task details for follow-up.
Route plan builder
Lists unassigned tasks and lets a dispatcher create a route plan and add tasks to it.
Live delivery tracker
Shows each task as it starts, gets an ETA and completes, for customer service.
Give your AI agents Onfleet tools
Build an MCP server on Onfleet in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works
- Create a task
- Create an order
- Create a route plan
- Update a webhook
- List tasks
- Get a task
- Get orders
- Update an order
What the Onfleet API covers
4 resources and 14 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.
Tasks
- Create a task
- List tasks
- Get a task
Orders
- Create an order
- Get orders
- Update an order
- Cancel an order
Route plans
- Create a route plan
- Get a route plan
- Update a route plan
- Add tasks to a route plan
- Delete a route plan
Webhooks
- Update a webhook
- Manage webhook secrets
Events Onfleet can send to a Tray.ai webhook trigger
- Task started
- Task ETA
- Task arrival
- Task completed
- Task failed
- Task created
- Task updated
- Task deleted
- Task assigned
- Task unassigned
- Task delayed
- Worker duty changed
- Worker created
- Worker updated
- Worker deleted
- Route plan created
- Route plan started
- Route plan completed
Checked against Onfleet's own documentation on 2026-10-22
How Tray.ai makes this work
Onfleet plugs into the whole Tray.ai platform
Intelligent Integration
Integrate and automate across 12,000+ apps, databases, APIs, and services with visual workflows, error handling, and observability.
Learn more →Agent Builder
Build AI agents that read, write, and take action in Onfleet — with guardrails, audit, and human-in-the-loop.
Learn more →Agent Gateway for MCP
Expose Onfleet actions as governed MCP tools — observable, rate-limited, authenticated.
Learn more →Tray Helix
Build apps on Onfleet data with your AI assistant, then deploy, run, and govern them on Tray.ai.
Learn more →More supply chain apps on Tray.ai
Dedicated connectors and other apps Tray.ai reaches in the same category. See every supply chain connector →
Frequently asked questions
What can a Tray.ai workflow do in Onfleet?
+
The Onfleet API documents 14 actions across 4 resources (Tasks, Orders, Route plans, Webhooks). For example: Create a task; Create an order; Create a route plan. A workflow can make any documented call through the HTTP Connector.
How does Tray.ai authenticate with Onfleet?
+
The Onfleet API uses basic authentication. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.
Which Onfleet events can start a Tray.ai workflow?
+
Onfleet sends 18 events to a webhook URL, for example: Task started; Task ETA; Task arrival; Task completed; Task failed; Task created; Task updated; Task deleted. A Tray.ai webhook trigger receives them and starts a workflow.
See Onfleet working against your stack.
We'll walk through a tailored demo with your systems plugged in.
Thanks — someone from our team will be in touch soon.