Creating a Simple WebHook Listener using Python
-
Create a Flask application with below lines of code (Install Flask using the command “pip install flask”)
-
Run the code from command Prompt/Anaconda Prompt using command “python app.py”
-
Use NGROK to expose the localhost Flask application to the internet
Download NGROK for Windows(https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip)
Unzip the file and run ngrok.exe and run command “ngrok http port-number”
Here the port-number is: 5000
Once you run the above command it will expose two URLs. One for HTTP and another for HTTPS. You can use either of them.
-
Go to UiPath Orchestrator WebHook and configure the “rgrok-url/webhook” in the URL section
Select the Event Types for which you want to get Notifications
-
Now check in Command Prompt/Anaconda Prompt for the Notifications sent by Orchestrator.