automation-hub
latest
false
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique.
UiPath logo, featuring letters U and I in white
Guide de l'API Automation Hub pour le secteur public
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated 8 avr. 2024

Tutoriel vidéo sur l’intégration sortante de Service Now

Brève description : cette vidéo explique comment réaliser une intégration basique entre Service Now et Automation Hub en utilisant Open API et en déclenchant la création d'idées à partir de tickets Service Now.

Les principaux sujets sont :

  • 00:00 - Introduction ;

  • 01:30 - Configurer des champs personnalisés pour le questionnaire Automation Hub dans le tableau des incidents ;

  • 05:40 - Configurer la règle métier qui effectue l'appel API vers Automation Hub ;

  • 10:50 - Créer un nouvel incident et tester la règle ;

  • 13:10 - Vérifier la sortie directement dans Automation Hub.

Code utilisé dans la configuration 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());

Cette page vous a-t-elle été utile ?

Obtenez l'aide dont vous avez besoin
Formation RPA - Cours d'automatisation
Forum de la communauté UiPath
Uipath Logo White
Confiance et sécurité
© 2005-2024 UiPath Tous droits réservés.