Below is a simple example of a Flow that is triggered each time I upload a document to my OneDrive and asks for approval whether to keep it or not. Maybe not the greatest example, but good enough to get the point across. In this flow, there are two steps that I get notified:
- New document has been uploaded
- Document has been approved or rejected
For each of these events, I use an HTTP Action to POST a message to a webhook.
Inside of each HTTP action, there are four properties
- Method: POST
- URL: The webhook URL that receives the notification
- Header: Description of the type of notification
- Body: The notification itself
In my example, I am posting the notification to a Microsoft Teams Channel. You can find the details on how to do it in my article on Using Microsoft Teams to keep up with the Flow. To post a message, all I needed to provide is the method, URL, and body. Note that for all the notification messages, the method is always POST and the URL is the same. The only property that changes is the Body.
I used some very basic formatting for my notifications to help visualize them better (yellow - in progress, green - approved, red - rejected). You can get a full description of the HTTP messages in the Actionable message card reference. Below is what the messages actually look like as they appear in the Microsoft Team channel.