Invoke Embedded Task Automation via API in RPA Hub

  • Release version: Zurich
  • Updated July 31, 2025
  • 1 minute to read
  • Invoke an attended bot process (attended automation) from the UI experiences by creating an action.

    The limitation to trigger the attended bot process (attended automation) from other UI experiences such as playbook can be resolved by performing the following customisation. By default, the UI action is created for classic or workspace experience to trigger the attended bot process (attended automation) when attended configuration is activated.

    To create a UI action or edit an existing one, see Create a UI action.

    In the corresponding action, verify that the action visibility is new sn_rpa_fdn.RPAInstanceFormHooks().canTriggerAutomation(current,’<attended_config_sys_id>.

    Populate the <attended_config_sys_id> with the associated Attended Configuration Sys ID.​

    The following code must be added to the Script section of the corresponding Action form:
    var rpaFormHooks = new GlideAjax('sn_rpa_fdn.RPAInstanceFormHooks');​
    
    rpaFormHooks.addParam('sysparm_name', 'generateRuntimeLaunchUrl');​
    
    rpaFormHooks.addParam('attendedConfigId’, ‘<attended_config_sys_id>’);​
    
    rpaFormHooks.addParam('recordId', g_form.getUniqueValue());​
    
    rpaFormHooks.getXMLAnswer(function(response) {​
    
    var result = JSON.parse(response);​
    
    if (!result.error) ​
    
    top.window.open(result.url);​
    
    });​