automation-hub
2021.10
false
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática.
UiPath logo, featuring letters U and I in white
Sin asistencia
Guía de la API de Automation Hub
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated 11 de nov. de 2024

Videotutorial de integración de Service Now Outbound

Breve descripción: Este vídeo presenta cómo lograr una integración básica entre Service Now y Automation Hub, mediante el uso de Open API y desencadenando la creación de ideas a partir de tickets de Service Now.

Los temas principales son los siguientes:

  • 00:00 - Introducción;

  • 01:30 - Configuración de campos personalizados para el cuestionario de Automation Hub en la tabla de incidentes;

  • 05:40 - Configuración de la regla empresarial que realiza la llamada API a Automation Hub;

  • 10:50: Creación de un nuevo incidente y prueba de la regla;

  • 13:10 - Comprobación de la salida directamente en Automation Hub.

Código utilizado en la configuración de Service Now

var params = {
    "process_name": current.getDisplayValue()+" - "+current.short_description.toString(),
    "process_description": current.short_description.toString(),
    "category_id": parseInt(current.u_ah_business_area),
    "rules": parseInt(current.u_ah_how_rule_based_is_your_task),
    "input_type": parseInt(current.u_ah_how_would_you_describe_the_input_data_for_your_task_process),
    "input_quality": parseInt(current.u_ah_how_would_you_describe_the_structure_of_your_input_data),
    "stability": parseInt(current.u_ah_changes_in_the_next_6_months),
    "documentation": parseInt(current.u_ah_documentation_type),
    "owner": current.u_ah_process_owner.toString()
};
	
var json = new JSON();
var text = json.encode(params);
	
var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://rpanavigator-pentest-open-api.azurewebsites.net/api/v1/openapi/automationidea');
request.setHttpMethod('POST');
request.setRequestHeader("Accept","application/json");
request.setRequestHeader("Content-Type","application/json");
request.setRequestHeader("x-ah-openapi-app-key","userapi");
request.setRequestHeader("x-ah-openapi-auth","openapi-token");
request.setRequestHeader("Authorization","Bearer 4ec2bd1f-af111111111111111/411497b2-cfa3-454d-1111111111111");
request.setRequestBody(text);
	
var requestBody = request.getRequestBody();
var response = request.execute();
var responseBody = response.getBody();
var responseObj = JSON.parse(responseBody);
var tenantURL = 'https://preprod-automation-hub.uipath.com/integrations_change/';
current.description = current.description+"  /Info from Automation Hub:/"+responseObj.statusCode+"  "+responseObj.message+"//Process url: "+tenantURL+responseObj.data.process_slug+"//Process name:"+responseObj.data.process_name;
current.update();
gs.log(response.getBody());var params = {
    "process_name": current.getDisplayValue()+" - "+current.short_description.toString(),
    "process_description": current.short_description.toString(),
    "category_id": parseInt(current.u_ah_business_area),
    "rules": parseInt(current.u_ah_how_rule_based_is_your_task),
    "input_type": parseInt(current.u_ah_how_would_you_describe_the_input_data_for_your_task_process),
    "input_quality": parseInt(current.u_ah_how_would_you_describe_the_structure_of_your_input_data),
    "stability": parseInt(current.u_ah_changes_in_the_next_6_months),
    "documentation": parseInt(current.u_ah_documentation_type),
    "owner": current.u_ah_process_owner.toString()
};
	
var json = new JSON();
var text = json.encode(params);
	
var request = new sn_ws.RESTMessageV2();
request.setEndpoint('https://rpanavigator-pentest-open-api.azurewebsites.net/api/v1/openapi/automationidea');
request.setHttpMethod('POST');
request.setRequestHeader("Accept","application/json");
request.setRequestHeader("Content-Type","application/json");
request.setRequestHeader("x-ah-openapi-app-key","userapi");
request.setRequestHeader("x-ah-openapi-auth","openapi-token");
request.setRequestHeader("Authorization","Bearer 4ec2bd1f-af111111111111111/411497b2-cfa3-454d-1111111111111");
request.setRequestBody(text);
	
var requestBody = request.getRequestBody();
var response = request.execute();
var responseBody = response.getBody();
var responseObj = JSON.parse(responseBody);
var tenantURL = 'https://preprod-automation-hub.uipath.com/integrations_change/';
current.description = current.description+"  /Info from Automation Hub:/"+responseObj.statusCode+"  "+responseObj.message+"//Process url: "+tenantURL+responseObj.data.process_slug+"//Process name:"+responseObj.data.process_name;
current.update();
gs.log(response.getBody());

¿Te ha resultado útil esta página?

Obtén la ayuda que necesitas
RPA para el aprendizaje - Cursos de automatización
Foro de la comunidad UiPath
Uipath Logo White
Confianza y seguridad
© 2005-2024 UiPath. Todos los derechos reservados.