Is it possible to replay all runs of a workflow that failed?

This topic was automatically generated from Slack. You can find the original thread here.

Loic Ginoux : is there a way to replay all runs of a workflow that failed. Let’s say I have 5000 tasks to run on a workflow. some will fails for X reasons, I would like to have a list of them and rerun them after I identified what was wrong and I fixed my workflow. The live events column is not enough when processing that many runs. The global even workflow send me some errors but the list is not complete (does not notify when same error occurs within 24h), neither I want to click/replay each runs individually. Does someone have a solution ? Thanks

Dylan Sather (Pipedream) : what is your workflow trigger in this case?

Loic Ginoux : Coming from source events

Loic Ginoux : Http webhook I think it’s called

Loic Ginoux :

Dylan Sather (Pipedream) : I’m writing some docs for you, one moment :slightly_smiling_face:

Loic Ginoux : Perfect, no hurry then, back at work in 15h

Dylan Sather (Pipedream) : First, I completely hear you on the desire for native functionality to do this. We’re planning to improve the error handling / retry behavior over time.

For now, I have a few of suggestions:

• If you have fewer than 100 errors for a specific workflow, you can list them using this API endpoint. That’ll contain the original event data, which you can send as an HTTP request to your source.
• The global error workflow is yours to modify. So if you’d like, you can add a step that saves the value of steps.trigger.event.original_event to external storage (something as simple as Google Sheets might work). Since your workflow is triggered by an HTTP source, you could write a script / workflow that collects all of the original events that failed and sends them as HTTP requests to your source again.
• If you’d like to implement this behavior for a specific workflow, you can do that using the REST API. I wrote up a doc that shows you how this works. Any errors from one workflow are sent to another workflow. You can think of this latter workflow as a workflow-specific error workflow, and you can do the same as I described above here - log the errors to some external storage, and replay them when you’re done.

Dylan Sather (Pipedream) : I know all of these options involve a little work, but I hope that helps

David Watson : Awesome write-up

Loic Ginoux : ok thank you, I’ll have a look