APIs & Integrations


Exception handling



I was assuming that a workflow would not do any further actions when an prior action is in error. 


A bit of context : I have a workflow with 4 custom code actions.

For example, when the first custom code action throw an error, I was expecting that the workflow would have stopped and would not execute any further actions.


Is it the normal behaviour or am I missing something ? 


Thanks for your help

2 Replies 2
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Exception handling



Given how you present your issue, I imagine your workflow did not stop and the subsequent custom code actions executed ?


If so, I'm also surprised as I had the same asumption.*

I've had a look at the automation API documentation (related to custom workflow actions development) which I imagine is more or less based on the same principle.


This is particularly interesting and I wonder how this can apply to the custom code actions :



I guess you could try to return the hs_execution_state variable in your custom code output to influence how the workflow behaves in case there's an error.


Maybe @dennisedson can help us find an answer ? (Or someone with an answer at least haha)


Best regards,



Agence Mi4 - Data DrivenCTO @ Mi4
Hubspot Platinum Partner and Integration Expert

Passionate human, very curious about everything data and automation.

Any problem with Hubspot you need help solving ?

Let me know !

Community Manager
Community Manager

Exception handling


@LMeert  is on the right path.  If there are errors, it will still move to the next step. 

After the action, add a "value equals" step. From here you can setup a branch to handle a success or a failure.





HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show