Part 6 - Microsoft Power Automate with Dataverse
Understanding Expressions in Power Automate with Dataverse
1. What Are Expressions in Power Automate:
===> Expressions in Power Automate are nothing but formulas that are used to perform calculations, manipulate data, and apply logic to automate workflows efficiently.
===> They are written using Power Automate built-in functions inside the Expression tab in dynamic content.
👉 Think of them like math formulas or text functions in Excel but used inside Power Automate.
2. Why Do We Use Expressions in Power Automate:
3. Where Are Expressions Used in Power Automate:
4. Common Power Automate Expressions with Examples:
Example: Send Email Based on Total Invoice Amount:
Business Requirement:
When an Invoice is created in Dataverse, check the Total Amount. If the amount is greater than 10,000, send a "High Value Invoice" email.
Step 1: Create an Automated Cloud Flow
Step 2: Add a Compose Action to Evaluate Amount
This is where we write the expression directly.
Recommended by LinkedIn
if(greater(triggerOutputs()?['body/totalamount'], 10000), 'High', 'Normal')
✅ This checks the totalamount from the invoice
✅ Returns "High" if amount > 10,000, else "Normal"
Step 3: Add Condition Using Expression:
If you want to go further and only send an email when the value is High, do this:
equals(outputs('Compose'), 'High')
✅ This checks if the output from the Compose is 'High'.
Step 4: Inside "Yes" Branch → Send an Email:
An invoice of amount @{triggerOutputs()?['body/totalamount']} has been created.
Expression Summary:
Output Behavior:
Difference Between Using Expression vs. Without Expression in Power Automate
Example: Check if Revenue > 10,000 and Set Priority
Without Expression:
✅ 3 or more blocks used here.
With Expression:
Use the below expression inside a Compose or Set Variable:
if(greater(triggerOutputs()?['body/revenue'], 10000), 'High', 'Low')
✅ Just 1 line
✅No condition block needed