To add a function to your workflow, click the "+" button in the workflow canvas and choose the Function step from the sidebar.
You can pass any data from upstream steps into your Function as parameters using the key-value table under "What data should be passed in as parameters?". Under "Key", you can give your variable a name and under "Value" you can insert a variable from the variable menu by clicking the dropdown button.
You can write your custom code in the
return from this function can then accessed by downstream steps in your workflow.
You can access parameters defined in the key-value table above by referencing
yourFunction(). For example, a parameter whose key is
Paragon provides access to certain npm modules that can be used within functions. Here's an example of how you can access the
uuid npm module within a function.
Note that you'll need to add the
libraries parameter to
yourFunction(). If your function needs to work asynchronously, you can declare it