- Home
- Resources
- Integrations
- Onfleet
Onfleet n8n integrationAutomate Onfleet with n8n.
The Onfleet n8n integration turns a delivery event into the next step of a workflow. The node exposes 37 operations across 9 resources, from tasks and recipients to teams, hubs, containers and workers. The trigger listens to 17 webhook events in 4 families. It is built for teams that dispatch routes every morning.
Verified Trustpilot reviews · AI, automation & growth agency
What does the Onfleet n8n integration actually cover?
Onfleet handles last-mile delivery: tasks, drivers, teams and the SMS sent to recipients. The n8n node drives that same data from a workflow. It ships with n8n, so there is nothing to install and no extra cost on the n8n side, on n8n Cloud or on a self-hosted instance. Two nodes share one credential: the Onfleet node for the 37 operations, the Onfleet Trigger for the 17 events.
The first pattern is order intake. A new order lands in a spreadsheet, a form or a shop, and task.create turns it into a delivery task with its destination and its time window. Teams that keep their daily runs in a sheet usually pair this node with Google Sheets, read the new rows, and create one task per row. The three public templates on n8n.io do exactly that, from Airtable (1524), from Google Drive (1547) and from a local spreadsheet (1530).
The second pattern runs the other way. The trigger receives taskCompleted or taskFailed, and the workflow tells the rest of the company. A message in Slack for the dispatcher, a proof-of-delivery email through Gmail for the customer service inbox, a line appended to the daily log. Each event reaches n8n in a few seconds, because Onfleet calls the webhook URL that n8n registered.
The third pattern is dispatch preparation. Containers hold the ordered list of tasks for an organization, a team or a driver. With container.addTask you push the tasks of the day into the right container at the right position, and container.get reads back what a driver is about to run.
Two honest limits. The node covers 9 resources and 37 operations; when an Onfleet endpoint you need is not in that list, the HTTP Request node calls it directly and reuses the same API key credential, so nothing has to be rebuilt. And several read operations still mark an ID field as required in the node, including Get Many on admins and on tasks, so keep a value ready even when you expect a full list.
If you want to see how the node compares with the rest of the catalogue before committing, the n8n review goes through the platform itself, and the n8n training covers the workflow basics this page assumes you already know.
How do you connect Onfleet to n8n?
- 01
Open an Onfleet administrator account
The credential starts on the Onfleet side. You need an administrator account on the organization you want to automate, because the API key is created from the admin settings and inherits what that account is allowed to do. A driver account is not enough here. If somebody else owns the organization, ask them to add you as an administrator first, or to generate the key and hand it over.
- 02
Create the API key in Onfleet
Log into the organization's administrator account, open Settings and then API & Webhooks, then select + to create a new key. Copy it straight away and store it somewhere safe. Onfleet documents the whole procedure in its support article on creating an API key, referenced as
360045763292in their help center, and the API itself is documented separately in the Onfleet developer reference. - 03
Save the credential in n8n
In n8n, open the Credentials menu and create an Onfleet credential, which means a stored connection n8n reuses instead of asking for the key in every node. Paste the value in the API key field and save. From then on, both the Onfleet node and the Onfleet Trigger offer that credential in their dropdown, in every workflow of the instance.
What starts an Onfleet workflow?
Onfleet Trigger is the node that starts a workflow when something happens in Onfleet. It listens to 17 events, listed below by family. Pick one or several, activate the workflow: n8n registers the webhook on your Onfleet account.
What you see in n8n
Every event, by family
One row per object, one chip per action. The event to tick in the node is object.action; hover a chip to read exactly when it fires.
task.*12worker.*3sms.*1SMSRecipientOptOut.*1SMSRecipientOptOut.SMSRecipientOptOut
Configuration notes
01Set up the Onfleet Trigger
The Onfleet Trigger starts a workflow when Onfleet reports something. It works by webhook, which means an URL that Onfleet calls: n8n registers that URL when you activate the workflow, and each event arrives a few seconds later, with no polling and no schedule to configure.
Key parameters
- Trigger On: the list of events the workflow listens to. There is no wildcard option, so every event you want has to be picked explicitly in the list.
- Name (Additional Fields): a name for the webhook, used for identification. Useful once several workflows are registered on the same Onfleet organization and you need to tell them apart.
1 and exposes 17 events split into 4 families, described in the notes below.02Task events
The task family is by far the largest, with 12 of the 17 events. It follows a delivery through its whole life, from creation to the final outcome, and it is what most Onfleet workflows listen to.
Key parameters
- Trigger On: creation and edits with
taskCreated,taskUpdated,taskClonedandtaskDeleted. - Trigger On: assignment and progress with
taskAssigned,taskUnassigned,taskStarted,taskArrival,taskEtaandtaskDelayed. - Trigger On: outcomes with
taskCompletedandtaskFailed.
taskDelayed and taskEta to warn customers before they call, and to taskFailed to reschedule the same day. Subscribe to the events you act on, not to all 12, or the workflow will run on noise. Most workflows only ever need three or four of them.03Worker events
Three events cover the driver side of the organization. They fire on the worker object itself, not on the tasks that worker carries, so they are the right hook for people management rather than for delivery tracking.
Key parameters
- Trigger On:
workerCreatedandworkerDeleted, when a driver joins or leaves the organization. - Trigger On:
workerDuty, when a driver goes on or off duty.
workerDuty is the one dispatchers care about in the morning: it tells you who is actually available before the routes go out. A driver who leaves also has accesses to close elsewhere, and the same run handles them.04SMS recipient events
Onfleet sends SMS notifications to recipients, and two of the 4 families in the catalogue cover what comes back. Each of them carries a single event, which is why they show up separately in the list rather than under one shared prefix.
Key parameters
- Trigger On:
smsRecipientResponseMissed, when a reply from a recipient was missed. - Trigger On:
SMSRecipientOptOut, when a recipient opts out of SMS notifications. Note the capital letters at the start of that value, it is the exact catalogue spelling.
What can the Onfleet node do?
The Onfleet node exposes 37 operations across 9 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Create | Get | Get Many | Update | Delete | Add Tasks | Auto-Dispatch | Clone | Complete | Get Delegatee Details | Get Schedule | Get Time Estimates | Update Tasks |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Admin | ✓ | ✓ | ✓ | ✓ | |||||||||
| Container | ✓ | ✓ | ✓ | ||||||||||
| Destination | ✓ | ✓ | |||||||||||
| Hub | ✓ | ✓ | ✓ | ||||||||||
| Organization | ✓ | ✓ | |||||||||||
| Recipient | ✓ | ✓ | ✓ | ||||||||||
| Task | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| Team | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||
| Worker | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Operations index
Admin
4 operationsCreate an admin
admin.createWhat you see in n8n
Notes & use cases
Adds an administrator to the Onfleet organization and returns the created object. Administrators are the accounts that manage the organization, as opposed to the drivers who run the tasks.
Key parameters
- Admin ID: the ID of the admin object for lookup.
- Name and Email: the administrator's name and email address, in the
name@email.comform suggested by the field. - Read Only (Additional Fields): whether this administrator can perform write operations.
Delete an admin
admin.deleteWhat you see in n8n
Notes & use cases
Removes an administrator from the organization. The call targets one account and returns nothing to reuse afterwards, so put it at the end of the branch.
Key parameters
- Admin ID: the ID of the admin object for lookup. It expects the identifier, not the person's name, so pass
{{ $json.id }}from the operation that found the account rather than a value typed by hand.
Get many admins
admin.getAllWhat you see in n8n
Notes & use cases
Lists the administrators of the organization, so a workflow can audit them or pick one to notify.
Key parameters
- Admin ID: still marked as required on this operation, even though it returns a list. Fill it before running the node, or the execution stops on the empty field.
- Return All: enabled, n8n walks every page of admins; disabled, Limit caps how many come back.
Update an admin
admin.updateWhat you see in n8n
Notes & use cases
Changes the details of an administrator who already exists. Only the fields you add are touched, the rest of the account is left alone.
Key parameters
- Admin ID: the ID of the admin object for lookup.
- Name (Update Fields) and Phone: the administrator's name and phone number.
- Read Only (Update Fields): whether this administrator can perform write operations.
Container
3 operationsAdd tasks
container.addTaskWhat you see in n8n
Notes & use cases
Inserts tasks into a container, the ordered list of tasks attached to an organization, a team or a driver.
Key parameters
- Container Type and Container ID:
organizations,teamsorworkers, then the object ID matching the container chosen. - Insert Type and Index:
-1to append,0to prepend,1to insert at a specific index, and the index is the position where the tasks are inserted. - Task IDs: the tasks that are going to be used.
- Consider Dependencies (Options): whether the target task's dependency family, parent and child tasks, follows into the assignment.
Get a container
container.getWhat you see in n8n
Notes & use cases
Reads a container and returns the tasks it currently holds, in their running order. Nothing is modified.
Key parameters
- Container Type:
organizations,teamsorworkers, depending on whose list you want to look at. - Container ID: the object ID according to the container chosen, often
{{ $json.id }}from the worker or team operation just before.
Update tasks
container.updateTaskWhat you see in n8n
Notes & use cases
Fully replaces the tasks of a container. What you send becomes the complete list, so anything missing from that list is no longer in the container.
Key parameters
- Container ID: the object ID according to the container chosen.
- Task IDs: the tasks that are going to be used, in the order you want them run.
- Consider Dependencies (Options): whether to include the target task's dependency family, parent and child tasks, in the resulting assignment.
Destination
2 operationsCreate a destination
destination.createWhat you see in n8n
Notes & use cases
Registers an address as a destination object, which tasks can then point to. Creating it once keeps the address consistent across every delivery that uses it.
Key parameters
- Unparsed Address: whether the address is specified in a single unparsed string, which decides how the other address fields are read.
- Destination Address, Number, Street, City, Country: the street address details, the number component that may also contain letters, the street name, the municipality and the country.
- Apartment (Additional Fields) and Address Notes: the suite or apartment number, and notes about the destination.
Get a destination
destination.getWhat you see in n8n
Notes & use cases
Fetches one destination and returns its stored address details.
Key parameters
- Destination ID: the ID of the destination object for lookup, usually taken from the task that references it with an expression like
{{ $json.destination }}.
Hub
3 operationsCreate a hub
hub.createWhat you see in n8n
Notes & use cases
Declares a hub, the physical site a run starts from, and returns the created object. A hub carries an address of its own and can be attached to teams.
Key parameters
- Name: a name to identify the hub.
- Destination: the hub address, added through the
Add Destinationblock, with Street, City, State and Country. - Team Names or IDs (Additional Fields): the teams this hub is assigned to, chosen from the list or given as IDs through an expression.
Get many hubs
hub.getAllWhat you see in n8n
Notes & use cases
Returns the hubs declared in the organization. No identifier is required here, which makes it the simplest way to get the full picture of your sites.
Key parameters
- Return All: enabled, every hub comes back page after page; disabled, Limit sets the maximum number of hubs returned.
Update a hub
hub.updateWhat you see in n8n
Notes & use cases
Edits a hub that already exists, one field at a time. The fields you leave out keep their current value.
Key parameters
- Hub ID: the ID of the hub object for lookup.
- Name (Update Fields): a name to identify the hub, handy when depots are renamed after a reorganization.
- Destination (Update Fields) and Team Names or IDs: the hub address through
Add Destination, and the teams the hub is assigned to.
Organization
2 operationsGet my organization
organization.getWhat you see in n8n
Notes & use cases
Retrieves the details of the organization behind the API key. There is nothing to configure: the credential already says which organization is being read.
Get a delegatee's details
organization.getDelegateeWhat you see in n8n
Notes & use cases
Reads the details of another organization you are connected with in Onfleet. Delegation is how two companies share deliveries, one sending the work, the other fulfilling it.
Key parameters
- Organization ID: the ID of the delegatees for lookup.
Recipient
3 operationsCreate a recipient
recipient.createWhat you see in n8n
Notes & use cases
Saves a customer as a recipient, the object Onfleet attaches to tasks and sends SMS notifications to.
Key parameters
- Recipient Name: the recipient's complete name.
- Recipient Phone: a unique, valid phone number as per the organization's country if there is no leading + sign; with a leading + sign, the organization's country setting is disregarded.
- Skip Recipient SMS Notifications (Additional Fields): whether this recipient has requested to skip SMS notifications.
Get a recipient
recipient.getWhat you see in n8n
Notes & use cases
Looks up a single recipient. What makes this one different is that you choose how to search, which matters when the only thing you have is a phone number from an inbound message.
Key parameters
- Get By: the variable used for looking up a recipient,
id,phoneorname. - Recipient ID, Name or Phone: the matching lookup value for the choice above.
Update a recipient
recipient.updateWhat you see in n8n
Notes & use cases
Corrects the stored data of a recipient, which then applies to their future tasks.
Key parameters
- Recipient ID: the ID of the recipient object for lookup.
- Recipient Phone (Update Fields): the same phone rule as on creation, with the leading + sign deciding whether the organization's country is used.
- Recipient Notes (Update Fields): global notes for this recipient, which are not meant to be task-specific or destination-specific.
SMSRecipientOptOut event arrives, and the workflow sets Skip Recipient SMS Notifications so the opt-out is respected on every later delivery.Task
7 operationsClone a task
task.cloneWhat you see in n8n
Notes & use cases
Duplicates an existing task and returns the copy. Useful when a delivery has to happen again with the same destination and recipient.
Key parameters
- Task ID: the ID of the task object for lookup.
- Complete After (Override Fields) and Complete Before: the earliest and latest time the copy should be completed, which is what you usually change on a clone.
- Include Dependencies (Override Fields), Include Barcodes and Include Metadata: what gets carried over to the copy.
Complete a task
task.completeWhat you see in n8n
Notes & use cases
Force-completes a task that has already been started, and records whether it ended well. This is the manual override, for the cases the driver app did not close properly.
Key parameters
- Task ID: the ID of the task object for lookup.
- Complete as a Success: whether the task's completion was successful, which is what separates a delivered parcel from a failed attempt in your reporting.
- Notes (Additional Fields): the completion notes.
Create a task
task.createWhat you see in n8n
Notes & use cases
This is the operation most Onfleet workflows are built around. It creates the delivery or pickup, with its destination, and returns the task object.
Key parameters
- Destination: the address, added through the
Add Destinationblock, with Street, City and Country at minimum, or a single string when Unparsed Address is on. - Complete After (Additional Fields) and Complete Before: the delivery window.
- Pick Up Task (Additional Fields): whether the task is a pickup rather than a drop-off.
- Service Time (Additional Fields): the minutes spent on arrival at the destination, used for route optimization.
Delete a task
task.deleteWhat you see in n8n
Notes & use cases
Erases a task from Onfleet. It disappears from the driver's list, so this belongs to cancellations, not to failed attempts.
Key parameters
- Task ID: the ID of the task object for lookup, typically
{{ $json.id }}carried from the node that identified the order.
task.complete with a failed outcome keeps the history instead.Get a task
task.getWhat you see in n8n
Notes & use cases
Retrieves one task and its current state, which is the usual way to enrich an event before acting on it.
Key parameters
- Task ID: the ID of the task object for lookup, often
{{ $json.id }}straight from the trigger.
taskDelayed with the identifier, and this node pulls the full task so the customer message can mention the address and the time window rather than a bare reference number.Get many tasks
task.getAllWhat you see in n8n
Notes & use cases
Pages through the tasks of the organization, filtered by period and by state. This is the reporting operation of the node.
Key parameters
- Task ID: marked as required even on this list operation, so give it a value before running the node.
- Return All: enabled, every matching task comes back; disabled, Limit caps the number of tasks returned.
- From (Filters) and To: the start and end of the range, the end defaulting to the current time.
- State (Filters):
0unassigned,1assigned,2active,3completed, orall.
Update a task
task.updateWhat you see in n8n
Notes & use cases
Edits a task that already exists in Onfleet, without recreating it. Only the update fields you fill are applied.
Key parameters
- Task ID: the ID of the task object for lookup.
- Notes (Update Fields): the notes for the task, the field drivers read on their phone.
- Quantity (Update Fields) and Service Time: the number of units dropped off and the minutes spent on site, both used for route optimization.
Team
7 operationsAuto-dispatch a team
team.autoDispatchWhat you see in n8n
Notes & use cases
Onfleet takes the tasks sitting in a team's unassigned container and hands them to the drivers currently on duty.
Key parameters
- Team ID: the ID of the team object for lookup, usually
{{ $json.id }}carried over from an earlier node. - Max Allowed Delay: the maximum time in minutes a task is allowed to run late.
- Max Number Of Tasks Per Route: the total number of tasks allowed on one route, so a single driver does not inherit the whole morning.
- Service Time: the default service time in minutes applied to tasks that carry none of their own.
Create a team
team.createWhat you see in n8n
Notes & use cases
A new team lands in the Onfleet organization with its drivers and its managing admins attached from the start.
Key parameters
- Name: a unique name for the team, so two depots never get confused.
- Worker Names or IDs: a list of workers, picked from the dropdown or passed as IDs through an expression, the n8n formula that reads a value off the incoming item.
- Administrator Names or IDs: the managing administrators who own the team.
- Self Assignment: in Additional Fields, decides whether drivers can self-assign tasks that sit in the team's unassigned container.
Delete a team
team.deleteWhat you see in n8n
Notes & use cases
The team is removed from the Onfleet organization. Worth keeping this one in a workflow a human starts on purpose rather than on an automatic schedule.
Key parameters
- Team ID: the ID of the team object for lookup, better stored when the team is created than hunted for afterwards.
Get a team
team.getWhat you see in n8n
Notes & use cases
Point the node at one team ID and Onfleet returns that team's record, ready for the rest of the workflow to read with expressions.
Key parameters
- Team ID: the ID of the team object for lookup, often
{{ $json.id }}coming out of a Get many teams step.
Get many teams
team.getAllWhat you see in n8n
Notes & use cases
Every team in the organization comes back as a list, one item per team.
Key parameters
- Return All: on, n8n walks the API pages until the last team is in; off, it stops at Limit.
- Limit: the maximum number of teams to return, handy while you are still testing the workflow.
Get time estimates for a team
team.getTimeEstimatesWhat you see in n8n
Notes & use cases
Estimated times for a team's upcoming tasks come back, along with the driver Onfleet would pick for the job.
Key parameters
- Team ID: the team being queried.
- Pick Up and Drop Off: in Filters, the two ends of the trip being estimated.
- Restricted Vehicle Types: vehicle types to ignore in the query, among
CAR,MOTORCYCLE,BICYCLEandTRUCK. - Service Time: the time in seconds a worker is expected to spend at the pickup location, the dropoff location, or both.
Update a team
team.updateWhat you see in n8n
Notes & use cases
Changes land on an existing team. What you put in Update Fields is what changes, and nothing else gets sent.
Key parameters
- Team ID: the team being edited.
- Worker Names or IDs: the workers making up the team after the update.
- Hub Name or ID: the team's hub, chosen from the list or passed as an ID.
- Self Assignment: flips whether drivers can pick up the team's unassigned tasks themselves.
Worker
6 operationsCreate a worker
worker.createWhat you see in n8n
Notes & use cases
A driver gets an Onfleet account and joins a team in the same step, which is usually exactly what onboarding needs.
Key parameters
- Name: the worker's name.
- Phone: the worker's phone numbers.
- Team Names or IDs: one or more teams the worker is a member of.
- Capacity: in Additional Fields, the maximum number of units this worker can carry, used for route optimization.
Delete a worker
worker.deleteWhat you see in n8n
Notes & use cases
Offboarding, in one node: the worker record leaves Onfleet. Logging the removal to a channel keeps dispatch from looking for someone who is gone.
Key parameters
- Worker ID: the ID of the worker object for lookup, not the display name.
Get a worker
worker.getWhat you see in n8n
Notes & use cases
One worker, one item back. The Options collection decides how much of the record travels with it.
Key parameters
- Worker ID: the ID of the worker object for lookup.
- Analytics: on, the response gets more detail, including basic worker duty events, traveled distance in meters and time analytics.
- Fields to Return: the list of fields to show when the full record is more than you need, such as
onDuty,locationoractiveTask.
Get many workers
worker.getAllWhat you see in n8n
Notes & use cases
The worker list comes back filtered by where the drivers are right now, which is how you answer "who is near this address".
Key parameters
- Search by Location: whether to keep only the workers currently inside a target area.
- Longitude and Latitude: the coordinate pair at the center of that area.
- Radius: in Filters, the radius in meters of the spherical area to search. It defaults to
1000when missing, and the maximum is10000. - Return All: on, every matching worker comes back; off, Limit caps the list.
Get the schedule for a worker
worker.getScheduleWhat you see in n8n
Notes & use cases
Asking Onfleet for a driver's schedule gives the workflow something to reason with before it commits anyone to a job.
Key parameters
- Worker ID: the ID of the worker object for lookup, taken from a Get many workers step or stored in your own database.
Update a worker
worker.updateWhat you see in n8n
Notes & use cases
Editing a driver record covers the day-to-day moves: a bigger load, a name fix, a transfer to another team.
Key parameters
- Worker ID: the driver being edited.
- Capacity: the maximum number of units this worker can carry, for route optimization purposes.
- Display Name: the name used in place of the real one in SMS notifications, on delivery tracking pages and across organization boundaries.
- Team Names or IDs: the teams the worker belongs to after the change.
Need help automating Onfleet with n8n?
A person reads every message.


