---
sourceDocument: Australia Enable AI
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/intelligent-experiences

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Call a custom skill from a script

# Call a custom skill from a script {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

You can use a script to call a custom skill.

## Antes de Iniciar

Role required: admin

## Procedimento

1. Navigate to AllSystem UIUI Actions.
2. Create a UI action.  
   For more information on creating UI actions, see [Create a UI action](https://www.servicenow.com/docs/access?context=t_EditingAUIAction&version=australia&pubname=australia-platform-administration&ft:locale=en-US).
3. Add your script.  
   The following script is an example. You can replace the variables with your data.

       var inputsPayload = {};

       // create the payload to deliver input data to the skill

       inputsPayload['input name'] = {

         tableName: 'table name',

         sysId: 'sys_id',

         queryString: ''

       };


       //create the request by combining the capability sys ID and the skill config sys ID

       var request = {

           executionRequests: [{

               payload: inputsPayload,

               capabilityId: 'capability sys id',

               meta: {

                   skillConfigId: 'skill config sys id'

               }

           }],

           mode: 'sync'

       };


       //run the custom skill and get the output in a string format
       try {
       var output = sn_one_extend.OneExtendUtil.execute(request)['capabilities'][request.executionRequests[0].capabilityId]['response'];
       var LLMOutput = JSON.parse(output).model_output;
       } catch(e) {
        gs.error(e);
        gs.addErrorMessage('Something went wrong while executing the skill.');
       }
       action.setRedirectURL(current);

**Tarefas relacionadas**   

* [Create a skill](https://servicenow-prod.fluidtopics.net/Af8ZD_06zyFT4wcox4v0EA "Create a custom skill for Now Assist. Creating a custom skill enables you to have greater flexibility with Now Assist's generative AI capabilities.")
* [Create a prompt](https://servicenow-prod.fluidtopics.net/3K4Mw7oWnde16Gb5hkIQ~Q "After you create a custom skill, create a prompt. Creating a prompt enables you to choose what skill inputs to use, as well as the type of tool.")
* [Use prompt assistance](https://servicenow-prod.fluidtopics.net/ZZm5cCoA76wpRoLwhiC~5w "Use prompt assistance to get a jump start with your prompt development by selecting an example from the prompt library or using Now Assist to generate one.")
* [Test a prompt](https://servicenow-prod.fluidtopics.net/9qkmGmprM967_h3JofOULg "After you create a prompt for your custom skill, test the prompt template before you finalize it. Testing the prompt verifies that you’re seeing the expected prompt results before it’s activated.")
* [Evaluate a prompt](https://servicenow-prod.fluidtopics.net/IxPxoq22NmNjnjr2ikC5ng "Use the Now Assist Skill Kit evaluation tools to evaluate the effectiveness of your skill prompts.")
* [Finalize and publish a skill](https://servicenow-prod.fluidtopics.net/4CCY98KqcGKnQezZsLF_Yw "When you’re satisfied with your prompt, you can publish your custom skill. Publishing the skill enables a Now Assist admin to activate it.")
* [Activate a skill](https://servicenow-prod.fluidtopics.net/oZJjIVP1LalfAgGuUV_d2A "After you create and publish a custom skill, you must activate it in Now Assist Admin. Activating the skill enables you to trigger the skill within the UI.")

