How To Create A Simple Webhook Listener Using Python?

How to create a Simple Webhook Listener using Python?

  1. Create a Flask application with below lines of code (Install Flask using the command “pip install flask”)

    image
  2. Run the code from command Prompt/Anaconda Prompt using command “python app.py”

    1.png
  3. 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

    2.png
  4. 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
    image

  5. Now check in Command Prompt/Anaconda Prompt for the Notifications sent by Orchestrator.

    3.jpeg