automation-hub
2021.10
false
Wichtig :
Bitte beachten Sie, dass dieser Inhalt teilweise mithilfe von maschineller Übersetzung lokalisiert wurde.
UiPath logo, featuring letters U and I in white
Kein Support
Automation Hub-API-Handbuch
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated 11. Nov. 2024

Videotutorial zur Integration von ServiceNow Outbound

Kurzbeschreibung: In diesem Video wird gezeigt, wie Sie eine grundlegende Integration zwischen ServiceNow und Automation Hub erreichen, indem Sie die Open API verwenden und die Ideenerstellung über ServiceNow-Tickets auslösen.

Die Hauptthemen sind:

  • 00:00 – Einführung;

  • 01:30 – Einrichten von benutzerdefinierten Feldern für den Automation Hub-Fragebogen in der Vorfallstabelle;

  • 05:40 – Einrichten der Geschäftsregel, die den API-Aufruf für Automation Hub ausführt;

  • 10:50 – Erstellen eines neuen Vorfalls und Testen der Regel;

  • 13:10 – Überprüfen der Ausgabe direkt in Automation Hub.

In der ServiceNow-Konfiguration verwendeter Code

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());

War diese Seite hilfreich?

Hilfe erhalten
RPA lernen – Automatisierungskurse
UiPath Community-Forum
Uipath Logo White
Vertrauen und Sicherheit
© 2005–2024 UiPath. Alle Rechte vorbehalten