Saturday, May 20, 2023

How to send notification on Microsoft Team using Webhook from UiPath?

By using webhook we can send notification on Microsoft Team's channel only. To configure a webhook in UiPath we need an HTTP Request activity and for http request activity we have to install UiPath.WebAPI.Activities package.

Webhook is a post request, so for http request activity we need following information for configuration purpose:

  • Webhook URL 
  • Payload for request
How to create a webhook in Microsoft Team?
I have already created an article for this. Please refer to the below article if you don't know about it.

How to create process in UiPath for sending notification?
Select a Process from New Project section


Provide a name to your process and click on Create button
Click on Main.xaml in project tab
A webhook is a rest API, so to call it from UiPath we need "HTTP Request" activity. To do this we have to install UiPath.WebAPI.Activities package.
Click on Manage Packages => Click on All Packages => In search tab type 'UiPath.WebAPI.Activities' => Click on 'UiPath.WebAPI.Activities' from search result => Click on 'Install' button => Click on 'Save' button
Click on Activities tab
Drag 'HTTP Request' to Main Sequence => Click on Configure button => a pop up window will appear

In the End point text box paste your webhook URL in double quotes("") => From Request Method dropdown select POST => Click on Ok button
In the right panel go to Properties tab => set the Body Format to application/json => In Body provide your payload(webhook supports a specific format only) => Click on OK button
Example of a very simple payload:
"{'title':'New Ticket','text':'Splunk created a new ticket'}"

Now go to Debug File => click on Run
You will get a notification
Go to teams channel and you will see the message 








No comments:

Post a Comment

Will it be possible to live on Mars, as Elon Musk has said?

Elon Musk has expressed his ambition to establish a human presence on Mars in the future. While living on Mars is a long-term goal for Space...