• You can add inherited or copied custom actions that do not require any authentication under any custom group. • You cannot have multiple actions with different connector types in the same custom group. |
This option appears only if you copy or inherit an existing action. |
• If you do not provide an icon, the default custom action icon is used. • If you are inheriting or copying an existing action, then by default, the action icon is used as the custom action icon. |
Legend | Description | ||||
---|---|---|---|---|---|
1 | Use the require() function to import Node.js modules for use in the custom action. In the sample code, the action imports the request module to make simple HTTP calls to third-party systems.
| ||||
2 | this.localization.namespace:label—Attribute that specifies the name of the custom action. Under this.localization, under specific locale, the value of the label variable defines the name of the custom action for that locale.
| ||||
3 | this.input—Attribute that defines the input fields that appear when configuring the action in a workflow. This is a JSON schema and must be valid. Assign values for the following parameters: • title (required)—Internally used as an identifier. In the example code, the value of the title field is this.localization.namespace:sample_input. Under this.localization, under specific locale, the value of the sample_input variable sets the value of title for that locale. • type (required)—Internally used. Always set this value to object. Do not change this value. • properties (required)—Define multiple input fields and validation conditions, if any, for the action. Define a unique key for each input field, for example, first_name and the following values for each input field: ◦ title—Name of the input field. In the example code, the value of the title field is this.localization.namespace:Custom_Action_First_Name. Under this.localization, under specific locale, the value of the Custom_Action_First_Name variable sets the value of title for that locale.
◦ type—Type of the field. For example: string, integer, number, and so on. ◦ description—Message that appears as a tooltip. In the example code, the value of the description field is this.localization.namespace:Enter_Custom_Action_First_Name. Under this.localization, under specific locale, the value of the Enter_Custom_Action_First_Name variable sets the value of description for that locale. ◦ minLength—Set the value of this field as 1 only if you want to make an input field mandatory. If you do not want to make an input field mandatory, remove the attribute for that input field. | ||||
4 | this.output—Attribute that defines the output fields that the action returns and makes it available for the other actions in the workflow. This is a JSON schema and must be valid. Assign values for the following parameters: • title (required)—Internally used as an identifier. In the example code, the value of the title field is this.localization.namespace:output. Under this.localization, under specific locale, the value of the output variable sets the value of title for that locale. • type (required)—Internally used. Always set this value to object. Do not change this value. • properties (required)—Define multiple output fields for the action. Define a unique key for each output field, for example, status and the following values for each output field: ◦ title—Name of the output field. In the example code, the value of the title field is this.localization.namespace:status. Under this.localization, under specific locale, the value of the status variable sets the value of title for that locale.
◦ type—Type of the field. For example: string, integer, number, and so on. | ||||
5 | this.localization—Attribute that defines a unique token for your custom action, and the English and localized input and output fields. Assign values for the following parameters: • namespace (required)—Automatically generated token for your custom action. The value of the namespace parameter must be unique across all custom actions.
• en (required)—Field names and internally used identifier names. The following image shows the field names and their English values : • de—Field names and internally used identifier names for a language. The sample code provides equivalent German values. You can add multiple languages and their equivalent values.
| ||||
6 | this.execute—Attribute that defines the program logic that runs when the action is executed within a workflow. The function must define the following two function parameters: • input—JSON object that contains the values of the input parameters at workflow execution time. Reference these values using the input field keys as defined in the this.input attribute of the action. • output—Callback function that must be called to pass the output values to the workflow. It indicates that the action is completed. Ensure that the code must produce output JSON that matches the this.output JSON schema. The function is in the form callback(err,output): ◦ err—Report any errors that may have occurred in the workflow. If no errors occur, then specify null. ◦ output—JSON object with values for each of the keys defined in the this.output attribute of the action. |