Code actions
Unlock advanced automation capabilities within your workflows by running custom JavaScript or TypeScript in the Execute Code action. This feature lets you implement complex logic, transform data dynamically, connect with third-party systems, and use embedded Admin Assist to generate and refine code from natural-language prompts inside the editor.
Understand the power of custom scripts
By incorporating custom code into your workflows, you gain granular control over your automation processes. You can:
-
Implement complex business logic: Execute sophisticated conditional logic that goes beyond standard workflow conditions.
-
Transform data on the fly: Modify inputs, reformat data, or prepare data structures for subsequent actions or external systems. You can leverage dynamic values from requests using data pills and placeholders.
-
Integrate with external services: Make API calls to third-party systems, fetch data, or trigger actions in other platforms directly from your script.
-
Use connected app functions: Call
Workflow.*functions for integrated apps such as Jira, Slack, Okta, and Azure AD.
For instance, imagine you're automating new employee onboarding and need to create user accounts in Okta. A custom script can automatically check if a proposed username already exists. If it does, the script can intelligently modify the username (e.g., changing "" to "") before proceeding with account creation. This proactive approach helps prevent errors and significantly reduces manual intervention.
