How to create 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 the above command is executed, it will expose two URLs. One for HTTP and another for HTTPS. Either of them can be used -
Go to UiPath Orchestrator WebHook and configure the “rgrok-url/webhook” in the URL section
Select the Event Types for which Notifications are to be received -
Now check in Command Prompt/Anaconda Prompt for the Notifications sent by Orchestrator.