logo

NJP

Flow action - Invalid return type encountered

Import · Jun 24, 2022 · article

When running a flow if you receive following error Invalid return type encountered, check the following

1. Check if the action has any script step, if yes check if the script step has correct syntax as below

(function execute(inputs, outputs) {//your script here

})(inputs, outputs);

If it misses (function execute(inputs, outputs) { then below error can occur.

Labels:

image

View original source

https://www.servicenow.com/community/now-platform-articles/flow-action-invalid-return-type-encountered/ta-p/2313537