The Script connector can be used to add JavaScript functions to your workflows.  You can choose from the Operation dropdown whether you want to execute your step synchronously or asynchronously.  You should nearly always choose synchronously, unless you're planning to make HTTP requests from your script.

When you add a new Script connector to your workflow it comes with some example variables and an example script.  You can change the variables to anything you want.  Within your script variables are referenced using In the example below the variable foo with the value bar can be referenced by - you can see in the example that this is being used here to return this variable.  Any variable that you return in a script is available to be used in other connectors.

When writing scripts only replace the line return; in the example script.  The function declaration is required to make the script run properly.

JS Libraries

The Script connector supports some helpful JavaScript libraries which you can use in your script.

Library Link

Last updated 11th May 2017