---
title: "Failed Onfleet deliveries rebooked for tomorrow or sent to dispatch | FlowRunner flow"
description: "When an Onfleet delivery fails, this flow rebooks the ones a second try fixes for the next day. For a wrong address, a refusal or damage it texts the customer and asks dispatch in Slack."
url: https://flowrunner.ai/flows/onfleet-failed-deliveries-rebooked-or-reviewed
date_published: 2026-11-19
date_modified: 2026-11-25T18:03:54-08:00
---

# Failed Onfleet deliveries rebooked for tomorrow or sent to dispatch

When an Onfleet delivery fails, this flow rebooks the ones a second try fixes for the next day. For a wrong address, a refusal or damage it texts the customer and asks dispatch in Slack.

## The prompt

When an Onfleet delivery fails, read the failure reason and the driver's notes. If nobody was home, the business was closed or the driver ran out of time, and it hasn't failed twice already, copy the task in Onfleet for tomorrow in the same delivery window, keeping the load number and the rest of its details, and tell dispatch in Slack. For anything else, text the customer from our Twilio number to say what went wrong and ask them to call dispatch. Then ask dispatch in Slack, with Rebook for tomorrow and Hold for the customer buttons, and wait for the answer.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

## The flow

[Import this flow](https://flowrunner.ai/downloads/prompt-to-flow/onfleet-failed-deliveries-rebooked-or-reviewed.json)

-   [Onfleet](https://flowrunner.ai/integrations/onfleet)
-   [Twilio](https://flowrunner.ai/integrations/twilio)
-   [Slack](https://flowrunner.ai/integrations/slack)

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. [How importing works](https://docs.flowrunner.ai/manage/flows#importing-a-flow)

## What each step does

1.  Delivery failed in Onfleet Starts as soon as a driver marks a delivery failed in Onfleet, and counts how many attempts it has had. Failed pickups are left alone.
2.  Read why it failed An AI agent reads the failure reason and the driver's notes and decides whether a second try is likely to work: nobody home, closed, or the driver ran out of time.
3.  Book the reattempt for tomorrow A delivery a second try can fix, and that hasn't already failed twice, is copied in Onfleet for the next day in the same window, with the same address, customer and load number. Dispatch gets a note in Slack.
4.  Text the customer Anything else, such as a wrong address, no gate code, a refusal or damage, gets a text from your Twilio number saying what went wrong and asking the customer to call dispatch.
5.  Ask dispatch Posts the failure to dispatch in Slack with what happened, the driver's photos, what the customer was told, and two buttons, Rebook for tomorrow and Hold for the customer.
6.  Wait for dispatch's answer The run waits for the click. Rebook for tomorrow books the new task and confirms it in the Slack thread. Hold for the customer books nothing and says so in the thread.

## Need a custom failed deliveries automation? Our team can build it for you.

Tell us the process. Our implementation team at Midnight Flow builds it around how you work, tests it on your real data, and keeps it running, in your own FlowRunner workspace.

[Have us build it](https://midnightflow.ai/packages/custom?utm_source=flowrunner.ai&utm_medium=referral&utm_campaign=general&utm_content=flows.aside&utm_term=onfleet-failed-deliveries-rebooked-or-reviewed)

## Before you turn it on

-   Enter your Onfleet API key and your Twilio Account SID and Auth Token, and connect Slack. Add your Onfleet webhook secret too if you want FlowRunner to check that each failure comes from Onfleet.
-   Add your Anthropic key in the flow setting Anthropic key.
-   Copy the URL of the block Wait for dispatch's answer into the flow setting Answer link. The Slack buttons open it.
-   Fill in the flow settings Texting number (your Twilio number, in +1 format), Dispatch phone and Company name. Set Time zone to your dispatch time zone; it starts as America/Chicago. Most attempts starts at 2.
-   If the load number sits in an Onfleet metadata field with a name other than Load Number, set it in the flow setting Load number field.
-   Pick your dispatch channel in the three Slack steps.

[Everything FlowRunner does with Onfleet](https://flowrunner.ai/integrations/onfleet)

---
Markdown version of https://flowrunner.ai/flows/onfleet-failed-deliveries-rebooked-or-reviewed. Site index: https://flowrunner.ai/llms.txt
