Power Platform Flow Expressions and Dynamic Content
Every flow moves data from one step to the next. Dynamic content picks values from earlier steps, and expressions reshape those values into exactly what you need.
Dynamic Content
When you click inside a field, a panel lists values from the trigger and previous actions. Pick Subject from an email trigger and the flow inserts that subject at run time. The panel saves typing and prevents spelling mistakes.
The Expression Editor
Next to the dynamic content tab sits the Expression tab. It accepts functions that calculate, format, or test values. Flow expressions use the Workflow Definition Language, which looks like spreadsheet formulas.
Field: Email Subject
+---------------------------------------------+
| concat('Order ', triggerBody()?['OrderId']) |
+---------------------------------------------+
Result at run time: Order 1045
Text Functions
| Function | Job | Example |
|---|---|---|
| concat | Joins text | concat('Hello ', 'Ravi') |
| toLower / toUpper | Changes case | toLower('ABC') |
| substring | Cuts a piece | substring('Dataverse', 0, 4) |
| replace | Swaps text | replace('a-b', '-', ' ') |
| split | Breaks into an array | split('a,b,c', ',') |
| trim | Removes extra spaces | trim(' text ') |
Date and Time Functions
utcNow() current time addDays(utcNow(), 7) one week from now formatDateTime(utcNow(), 'dd MMM yyyy') 28 Oct 2026 convertTimeZone(utcNow(), 'UTC', 'India Standard Time')
Date functions drive due dates, reminders, and report names that include the current date.
Logic Functions
if(greater(variables('Amount'), 5000), 'Manager', 'Auto')
equals(triggerBody()?['Status'], 'Open')
and(equals(a, 1), not(empty(b)))
coalesce(triggerBody()?['Phone'], 'Not given')
Coalesce returns the first value that is not empty, which makes it ideal for default values.
Reading Data From Earlier Steps
- triggerBody() reads the output of the trigger.
- body('Action_Name') reads the full output of an action.
- outputs('Action_Name') reads the raw output including headers.
- items('Apply_to_each') reads the current row inside a loop.
- variables('VarName') reads a variable you created.
The question mark in ?['Field'] protects the flow when a field is missing. The flow returns null instead of failing.
Diagram: Data Travelling Through a Flow
[Trigger: new row] Name = "asha", Amount = 7200
|
v
[Compose] toUpper(triggerBody()?['Name']) --> "ASHA"
|
v
[Condition] Amount greater than 5000 ?
| yes | no
v v
[Send approval] [Auto approve]
Subject = concat('Review for ', outputs('Compose'))
Layman Example: A Kitchen Blender
Dynamic content gives you the raw fruit. Expressions work like the blender blades that cut, mix, and shape it. A smoothie recipe may need only the pulp, a splash of milk, and a pinch of sugar. An expression selects, combines, and formats the data until the next step receives a clean mix.
Debugging Expressions
Use Compose Actions
Place a Compose action after a tricky step and read its output in the run history. You see the exact value the flow produced.
Check Data Types
Many errors come from mixing text and numbers. Convert values with int(), float(), or string() before comparing them.
Watch Quotation Marks
Text inside an expression uses single quotes. Double quotes cause an error.
Practical Mini Examples
A file name that includes a date uses concat('Report_', formatDateTime(utcNow(), 'yyyyMMdd'), '.xlsx'). A greeting that adapts to an empty name uses coalesce(triggerBody()?['Name'], 'Customer'). A deadline seven days away uses addDays(utcNow(), 7). Build a small flow that sends yourself an email with each of these values and read the results to see how each function behaves.
Working With Arrays and Objects
Many connectors return lists. The first() function reads the first item, length() counts items, and join() combines items into one text value with a separator. The Select action reshapes a list into new fields, and the Filter array action keeps only the rows that match a condition. Parse JSON turns raw text into named fields that appear in the dynamic content panel. These tools let a flow clean a list of fifty items before sending a single tidy email.
Key Takeaways
Dynamic content fetches values and expressions transform them. A handful of text, date, and logic functions covers most real flows.
