Error handling in workflows / Conditional actions

This workflow includes a Webhook (Zapier, in this case) that creates an invoice in Quickbooks.
The API step marks the items that were included in the invoice as “Invoiced”

The issue is the Webhook step fails often enough due to a Quickbooks error (roughly once a week) that I need to handle the process better, and NOT run the API step to update the items unless the invoice creation step actually ran successfully.

I’d be able to write to a Glide row from the Zapier action that creates the invoice, for example, right before this Gmail step

Since I don’t know exactly how long it will take for Zapier to either create the invoice or fail, I don’t want to use a time-based waiting step, and I don’t really understand how to set up wait for condition.

What would be a good way to set this up?

What I would do (have done in a similar situation):

  • Create a Callback table
  • Every time your App interaction workflow runs, add a row to the Callback table immediately before the Trigger Webhook step, and capture the RowID
  • Include captured the RowID in the webhook to Zapier
  • Remove the Call API step
  • Create a separate Webhook Triggered workflow that accepts a CallbackID and a Status.
  • This workflow should match the CallbackID to a RowID in the Callback table, then execute the Call API step (depending on the received status)
  • On the Zapier side, once you know the outcome, send a webhook back to Glide with the CallbackID and status.

Here’s a visualized flow of Darren’s idea.