Run script connector
What is the Run script?
The Run script connector allows you to run JavaScript code in response to a trigger or a previous action step in your App's integration. The JavaScript code interacts with the data from these steps and generates an output that the remaining actions can consume. This connector does not support any trigger event for now.
Note:
JavaScript is a specialized programming language to write front-end code. If you are unfamiliar with JavaScript, it is best to seek assistance from a developer.
For example, consider you have a board form for tracking externally reported events, and you want to individually contact customers through email only after the incident ticket is closed. For this to happen, the board and email connector must communicate with one another. The Run script connector maintains a constant communication channel by retrieving only the necessary email addresses from the board and forwarding them to the Email connector action step. The code connector's output will be an array of objects containing email strings. When the integration is enabled, separate email notifications are sent when incidents are closed.
Actions supported in Run script connector
Action |
Description |
Run JavaScript code |
This action runs an inserted JavaScript in response to a trigger from any of the previous steps. |
Configuring Run script connector
- In your Kissflow Low-code account, open your application's Application Builder > Integration > Create an integration. Provide a name and description for your integration.
- In the editor, select a trigger step. You can also use the search to find a trigger directly. For instance, use a webhook from a third-party application or a trigger from one of the flows in Kissflow.
- Click the Add button () to add an action. Search for Run script connector and select Run JavaScript code as the action.
- In the JavaScript code field, enter your vanilla JavaScript code as mentioned in the above screen. You can utilize the functions listed in our SDK documentation to write the code.
- You can also pass key-value pairs to allow mapping inside your code snippet. See the example below.
Optionally supply input data to your code by assigning one or more string values to a variable namedinputData
via an object.
Once provided, the input data fields will be mapped to the relevant output values from the previous trigger or action steps. They will be used alongside yourinputData
variable in your code.
- You can also pass key-value pairs to allow mapping inside your code snippet. See the example below.
- Click Next. Test trigger to check the output. The step will indicate success and display the data if your code is correct. Once the connector is set up, you can add your action step.
Supported functions
The JavaScript Software Development Kit (SDK) for Kissflow Low-code includes all the supported functions and code snippets you can incorporate into your application while integrating with other services.
Using the connector
After configuring your connector, turn ON the toggle button in the upper-right corner of the editor to activate the integration. When the configured action is triggered, the output data from the code connector is sent as input to the integration's subsequent steps.