Log an incident in ServiceNow for all failure events triggered from Uipath Orchestrator. Send out notification emails to support team on every failure.
Create an API Gateway in AWS to listen to Orchestrator webhook events. And with help of Lambda, log an incident to ServiceNow. Use SNS within lambda to send out notification e-mail to support team.
Create API Gateway service in AWS.
Create a POST method for this API Gateway with integration type as “Lambda Function”.
Create a new lambda function for python run.
Under integration request of API, add new mapping template as below. This extracts the signature passed by Orchestrator in the request header and adds it to the request object for Lambda function
Modify the lambda function as below:
Import required packages in python
Extract signature from the request and generate SHA256 hash from the raw request
Compare the hash with the signature passed in the webhook event header. If both matches then extracts the required fields from request object and call SNS to send out notification and ServiceNow API to log an incident.
Deploy the API. And in UiPath Orchestrator, add new webhook and use the deployed API’s URL and select individual events as per requirement
source.zip (1.7 KB)
API Gateway Mapping Template: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html