URL actions

URL actions

ThoughtSpot allows you to add a custom action to trigger a data payload to a specific URL target. For example, you may search in ThoughtSpot for specific data and want to programmatically deliver this data to an external application or web page. ThoughtSpot Developer portal allows developers to add a custom menu item in the visualization pages and trigger a data push workflow when a user clicks the action.

Feature highlights

  • Any ThoughtSpot user with admin or developer privileges can create URL custom actions in the Developer portal.

  • URL actions are available on both embedded and standalone ThoughtSpot instances and do not require ThoughtSpot Embedded Edition license.

  • Developers can set a URL action as a global or local action.

  • Developers can limit custom action access to a specific user group.

  • To access a URL action, users must have the New Answer Experience enabled.

  • For URL actions to work in the embedded mode, you must add the URL domain to the CORS and CSP connect-src allowlist.

  • Only ThoughtSpot users with edit permissions to a Worksheet or visualization can add a URL action to a Worksheet, visualization, or saved Answer.

Create a URL action🔗

Before you begin:

  • Make sure you have the developer or admin privileges to create a custom action.

  • If a URL action is intended to be used by the embedded ThoughtSpot user, add the URL to the CORS and CSP connect-src allowlist.

To create a URL action, complete the following steps:

  1. Go to Develop > Customizations > Custom actions.

  2. Click Create action.

  3. Add a label for the custom action. For example, Send Email.

  4. Make sure the URL option is selected.

  5. Add the target URL that you want to invoke when a user clicks this action in the UI.

    Note that the custom action ID is generated automatically.

  6. To view additional settings, click Show URL settings.

  7. From the Authorization drop-down, select an authentication method. ThoughtSpot will use the specified authentication method to invoke the URL or make an API call.

    Important
    The authentication information you specify in these fields is visible to other authenticated users, even if they do not have Developer or Admin privileges.
    None

    If you do not want to use an authentication method, select None.

    Basic authentication

    Select this authentication method if your server requires ThoughtSpot to pass the authentication information, such as username and password in the Authorization header. If selected, enter the username and password.

    Bearer

    Select this authentication method if your server requires ThoughtSpot to obtain a security token and send the token in the Authorization headers during an API call. Specify the security token to use for authentication and authorization.

    API key

    Select this authentication method if you want ThoughtSpot to use an API key during API calls to the URL target. Specify the API key value to use in the X-API-Key request header.

  8. If the URL endpoint requires specific data for the custom action workflow, you can configure the action to send these attributes as query parameters. For example, you may want to send database information in query parameters to the URL endpoint when the action workflow is triggered. Make sure these query parameters are defined as key-value pairs.

  9. To add this action to all visualizations and saved Answer pages, select On by default on all visualizations.

    If you do not select this checkbox, the URL action will be set as a Local action.

  10. To restrict action availability to specific user groups, click Show advanced availability settings, and select the groups.

  11. Click Create action.

    The custom action is added to the Actions dashboard in the Developer portal.

  12. To view the custom action you just created, navigate to a visualization or saved Answer page.

Important

By default, the global actions are added as a menu action in the More menu the more options menu on all visualizations and saved answers. The local custom actions are not added as a clickable action on any Answer page or visualization. You can assign a local action to a specific visualization or saved Answer, or all new answers built from a specific worksheet and add it to a menu component.

Initiate a URL action🔗

To initiate a URL action:

  1. Navigate to a Liveboard visualization or saved Answer page, and click the URL action.

    Custom actions appear as disabled on unsaved charts and tables. If you have generated a chart or table from a new search query, you must save the Answer to use the custom action.

  2. When you click the action, a POST request is sent to the specified URL target with the Answer or visualization data.