I have created an Azure Budget which is mapped to an Action group.
I have created a Logic App to send different emails with different email structures on different budget threshold example 50% , 75% etc.
Not able to understand, How to trigger a single logic app for sending different emails as per Azure Budget Action Group conditions.
2
Answers
In logic app flow, you can use multiple conditions to send different mails based on different budget conditions.
Created logic app flow as shown below,
The body of Http request trigger is in below format,
Selecting body of Http request trigger as content in Parse JSON action and given above code in use sample payload to generate schema.
I am checking condition for NotificationThresholdAmount value from Parse JSON action.
If NotificationThresholdAmount is greater than or equal to 0.8 and less than 1, sending mail to one user with one format.
Added one parallel condition to check if NotificationThresholdAmount is greater than or equal to 1 and less than 2, sending mail to another user with different format.
Mail format received in below format when NotificationThresholdAmount is 0.9
Mail format received in below format when NotificationThresholdAmount is 1.2.
Here is reference link
I followed the Microsoft article mentioned by Vijaya. What it lacks is you need to convert the
NotificationThresholdAmount
object from the incoming JSON data to integer as the conditions are going to want it as such for comparison with your defined threshold numbers.For the same you can use Compose Action for converting the incoming NotificationThresholdAmount to integer which would come as string.