The Custom Code action gives you full control over your automation by letting you write custom JavaScript. It’s designed for situations where standard actions aren’t enough and you need something more flexible to meet your specific requirements.
- Transform or format data before sending it elsewhere
- Perform advanced calculations
- Trigger actions based on complex conditions
- Update multiple fields using custom rules
- Connect with external systems in a specific way

How to Set Up the Custom Code Action
Name: Give your action a clear name so you can easily identify it later.
App: Use the dropdown to select the app where the Custom Code will run. By default, it shows the app you selected at the start of the automation—but you can switch to a different one if needed.

Record: This dropdown lets you choose which specific record from the selected app will be affected by the Custom Code. What appears in this dropdown depends on the app you've chosen.
If you select the same app used at the start of the automation, the dropdown will offer two modes:
In this mode, selecting the Triggering Record option from the dropdown the automation updates the same record that triggers the automation. The record is initially selected through the Start action in the automation builder.

For example, if the automation starts in the Contacts App, it will trigger whenever a record on that app is updated with the specified values. In this case, our Update Record action will modify the same record that initiated the automation.
With this mode, you can choose the specific record to be updated. The dropdown menu will display records from the selected app, ensuring clarity on which record will be modified when the automation runs.
Code: This is where you’ll enter your custom code. Use this space to define the specific instructions or conditions for your automation, based on the App and Record you selected earlier in the setup.

Note: You can expand the code editor for a clearer view of your work.

If you want to know more about other actions for the automation builder, check this article.