Asynchronous Workflow Steps

I am building an AI workflow that I'm going to call from a Salesforce Flow and the AI step coupled with some other system steps can take upwards of 90 seconds to complete. I don't want a user sitting there for 2 minutes doing nothing, so I want return success immediately and then slack them when they can move onto the next step.

Is there a way to return a value, but then continue to process in the workflow? Connecting the return value to the next step does not work as it just stops the flow at the return value.

Hi @mslade,

You can definitely do that, just attach another code block and keep going. Like this:

longRunningCode and moreCode will keep going even after the webhook itself has received it a response. Further in your code, send you notification to slack.

1 Like