Workflow automation: handling retries and exceptions

An automation is ready for daily use when the team can see what happened, identify unfinished work and recover safely. That means designing the path for missing information, unavailable systems and uncertain outcomes alongside the successful path.

Block Consult3 min read
In this article
Figure · Automation

Give each case a visible state

Consider a workflow that reads a service request, drafts a reply and records the outcome in a CRM. The draft may be correct while the CRM update fails. A single green or red status cannot explain whether anyone still needs to act.

Give the business case a stable reference and track meaningful stages such as received, checked, awaiting review, completed and needs attention. Record when it entered each stage and which system confirmed the last completed action. The status should describe the work, so a support colleague can understand it without reading a technical log.

Distinguish waiting from a decision

  • Temporary failure: a service is unavailable or rate-limited. The case may be eligible for a bounded retry.
  • Missing or invalid information: a customer reference is absent or two records disagree. Route the case to someone who can resolve it.
  • Approval required: the proposed action exceeds the agreed scope. Keep it pending until the responsible person decides.
  • Uncertain outcome: a request was sent but its acknowledgement was lost. Check what happened before repeating the action.

For temporary failures, AWS documents retry with backoff: space attempts out and stop after a defined limit. The retry budget should fit the business deadline. Assign an owner to any case still unresolved after that limit.

Make repeated requests safe

A timeout does not prove that an action failed. Where a destination supports idempotency, reuse its request identifier and the same payload when retrying that action, within its documented retention window. The Amazon Builders' Library explains this contract. A local log alone cannot guarantee that a remote action happens only once.

In the service-request example, saving a draft and recording the CRM update are separate steps. If the second step fails, recovery should start from the confirmed state. Replaying the whole workflow could overwrite an edited draft or send a message again. When the destination offers no reliable duplicate protection or status check, leave the uncertain action for reconciliation by a person.

Give the exception queue enough context

An exception queue needs a named owner, a backup and a clear response expectation. Each item should show the business reference, the reason it stopped, the last confirmed action and the next available choices. Keep the underlying record accessible to authorised reviewers without copying sensitive information into every alert.

Separate correction, approval and retry controls. Someone fixing a customer reference should not accidentally approve the outgoing message. If the content changes after approval, require another review where that change affects the decision. Our guide to human review in AI workflows covers how to define that responsibility.

Rehearse recovery before expanding the workflow

  1. Deliver the same incoming event twice and inspect the resulting business records.
  2. Interrupt a connection after the destination accepts an action but before the confirmation arrives.
  3. Remove a required field and confirm that the case reaches the right owner.
  4. Withdraw a user's permission while a case is pending and verify that the action cannot proceed under the old access.
  5. Resume an interrupted case and check that already completed steps remain intact.

Run these exercises with test records and write down the recovery steps the operator actually used. Track completed cases, the age of unresolved exceptions and time spent on manual recovery. An increasing backlog is a reason to pause expansion and fix the cause, even when the successful cases look fast.

Include this work in the move from pilot to production and the ongoing care of the AI workflow. Document how to operate the automation and name the person accountable for keeping it working.

Frequently asked questions

Should every failed automation retry automatically?
No. Temporary failures may justify bounded retries when the action is safe to repeat. Missing information, approval decisions and uncertain side effects need a different recovery path.
What should an exception notification contain?
The case reference, the reason it stopped, the last confirmed action, the responsible person and the next step. Link to the authorised record instead of reproducing all its data in an alert.
Does this apply to automation without AI?
Yes. Duplicate events, partial completion and unavailable systems occur in ordinary integrations too. AI adds further review questions around the quality and scope of the proposed output.
Contact

Let's build something durable.

Tell us about your project. We reply within two business days.

EssentialAs needed
We use storage to keep portal sign-in secure, verify invitations and remember that you’ve seen this notice. Security controls also help protect the site.
Your preferences and toolsWhen you use them
Your browser can save your chosen theme, chat conversation in this tab, simulator model and workspace preferences. You can clear this data in your browser settings.
Analytics and advertisingNot used
We don’t use Google Analytics, advertising pixels or cross-site tracking. We use Search Console to see how the site appears in Google Search; it adds no tracking script to this site.

Acknowledging this notice does not give consent to tracking. We will ask for your consent before adding optional tracking.

Cookie policyPrivacy policy