I've been troubleshooting a bug in a workflow lately and struggled until just now to understand it. I have a flow that can be triggered with a single item payload or an array of multiple items. The service that makes the call needs a response quicker that the flow sometimes takes to run, so I respond with a response block. Then it checks the shape of the payload and acts accordingly. This is a view of that part of the flow.
Now, I was seeing calls being made, but they were all getting to the branch logic and stopping.
If I opened the history and loaded the startTrigger
data and pressed Run, the workflow would run through branch2
and all the way to the end of the workflow. I couldn't figure out why it was constantly stopping during an API call, but not during a manual run with the exact same data.
Turns out I need to set it up this way to make it work for the API call.
The difference being that the webhookReturn
and isMultipleEvents
aren't parallel paths. I'm fine with this, having to continue running after the return value, but it isn't clear that the whole flow will stop as soon as a value is returned, particularly because that isn't the behavior during manual runs.