Skip to Content
Support Hub
Integrations & ActionsCustom JavaScript

Custom JavaScript action

Custom JavaScript

The Custom JavaScript action enables JavaScript code execution within actions, ideal for flexible and complex integrations.

When to Use

  • For integrating with API protocols other than REST, like SOAP XML or GraphQL.

  • For handling complex data needs, such as retrieving product info from an ERP and formatting it for users, or converting dates into a readable format.

Configuring the Custom JavaScript Action

  • API Requests
    Use the fetch function to call third-party APIs. Add each API’s hostname (e.g., api.example.com) to the “Allowed Hostnames” in the configuration.

  • Access Form Data
    Use formData to access all session form data.

  • Access Secrets
    Use secrets to access your organizations secrets.

  • JavaScript
    Use any typical JavaScript functions, such as JSON.parse and JSON.stringify, use regular expressions and string functions to process text, or make multiple API calls in parallel or sequentially.

  • Return Results
    Return a resulting object that can be used to assign form data via the "Form data assignments".

Outbound IP Address

All outbound requests from the Custom JavaScript action use the static IP address 34.79.148.154.

© 2024 Mavenoid ABSitemap
Terms of servicePrivacy policyCookie policyData processing agreement