Workflow Bug: Webhook ends flow during API call, not during manual run

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.

image

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.

just curious if you had tried connecting webhookReturn1 output to branch2 instead of having that 'dangling' response block. this might have indicated to retool that it was to continue processing stuff instead of resolving the workflow run immediately when no more blocks are found(?)

1 Like

That is what's done in the final screenshot. I definitely have other workflows with "dangling" blocks in places, and I'm 90% sure I've used the same pattern (early return) previously. This feels like a bug because a) it doesn't happen on a "Run" execution. b) there could be instances where I want to run 2 things in parallel and the result of one branch returns a result eventually and the other continues on to do other work.

Hey @MikeCB I'm seeing the same issue :slightly_frowning_face: It seems to have the expected behavior when clicking run or when running on a schedule.

I've flagged this as a bug to our team, so I'll keep you posted with any updates

1 Like