You can use scripts to implement hooks, filters, and data transformation. All scripts are written in JavaScript, and you can organize them according to your needs.
Example: You can put all your code in one script, or you can split your code across multiple scripts so that you delegate different projects to various users.
Note: Scripts can be referenced by any number of resources in your integrator.io account and changing a script should always be done with caution.
Create a script
- Log in to integrator.io and expand the Resources section of the left navigation menu.
- Click Scripts.
- At the top right, click + Create Script.
- Enter a name and a description for your script. Give your script a name that will make it easily recognizable to others working on your integration.
- Click Save & close.
- Click the elipses in the Actions column next to the script you just created.
- Click Edit script.

- You can modify the script in the Edit content section.
- Click Save.
Create an export hook script
Use the following steps to create a preSavePage export hook script:
- Open a flow, click + on the source application, and click the hook icon.
- For Hook type, choose Script or Stack depending on where you want to store the script.
- In the Pre save page section, enter the pre save page function name as defined in the script. You can select a pre-existing script from the Scripts drop-down menu or click the pencil icon to write a new script.
Note: You can leave the function name blank if there is only one function in the selected script. However, if the selected script contains two or more functions, you must provide the function name to be executed; otherwise, the first function present in the script automatically populates as the function name.
- Click the pencil icon beside the selected script to open the Script editor where you can preview the data input and output and perform any modifications to the code if required.

- Click Save & close. This script will be executed after the export and before the import.
Create an import hook script
Use the following steps to create a pre map, post map, or post submit hook script:
- Open a flow, click + on the import step, and click the hook icon.
- For Hook type, choose Script or Stack depending on where you want to store the script.
- In the Pre map, Post map, or Post submit section, enter the function name as defined in the script. You can select a pre-existing script from the Scripts drop-down menu or click the pencil icon to write a new script.
Note: You can leave the function name blank if there is only one function in the selected script. However, if the selected script contains two or more functions, you must provide the function name to be executed; otherwise, the first function present in the script automatically populates as the function name.
- Click the pencil icon beside the selected script to open the Script editor where you can preview the data input and output and perform any modifications to the code if required.
Comments
1 comment
When you click on the context menu to edit the script, it's not "Edit Script", but "Edit Script Content"
Please sign in to leave a comment.