Execute Script

ID: executeScript

Executes custom server-side JavaScript that is provided inline, in the script property of the action's configuration. To run a script that is stored as an attachment of a node, use the Execute Script from a Node action instead.

Configuration

Property Type Required Default Description
script text true String containing the script.
scriptMimetype text false application/javascript The mimetype of the script.
methodName false The method name of the script.
args false The arguments for the method in the script.

Example

{
    "script": "if (typeof(node.data.count) === 'undefined') { node.data.count = 0; }; node.data.count++;"
}

See Also

  • The "Scripts" section of Rules
  • The Script workflow handler, which runs a script based on the items in a workflow