Introduction

Power Automate expressions are essential for building dynamic, flexible, and intelligent workflows. While the visual designer makes flow creation easy, real-world business scenarios often require expressions to handle conditions, calculations, formatting, and data transformations.

This article explains commonly used Power Automate expressions, why they are needed, and how to use them, with practical examples you can apply immediately in your flows.

What Are Power Automate Expressions?

Power Automate expressions are formulas written in Workflow Definition Language (WDL). They allow you to:

Expressions are commonly used in:

Expressions are always written inside:

@{ }

1. concat() – Combine Text Values

Purpose: Combines multiple text values into a single string.

Syntax

concat(value1, value2, value3)

Example

concat('Leave request from ', triggerBody()?['EmployeeName'])

Output

Leave request from John Doe

Common Use Cases

2. equals() – Compare Two Values

Purpose

Checks whether two values are equal.

Syntax

equals(value1, value2)

Example

equals(triggerBody()?['Status'], 'Approved')

Output

Common Use Cases

3. if() – Conditional Logic

Purpose

Returns one value if the condition is true and another if it is false.

Syntax

if(condition, valueIfTrue, valueIfFalse)

Example

if(equals(triggerBody()?['Priority'], 'High'), 'Urgent', 'Normal')

Output

Urgent

or

Normal

Common Use Cases

4. empty() – Check for Blank or Null Values

Purpose

Checks whether a value is null or empty.

Syntax

empty(value)

Example

empty(triggerBody()?['Comments'])

Output

Best Practice

Always use empty() instead of direct null comparisons to avoid runtime errors.

5. coalesce() – Handle Null Values Safely

Purpose

Returns the first non-null value from a list.

Syntax

coalesce(value1, value2, value3)

Example

coalesce(triggerBody()?['ManagerEmail'], '[email protected]')

Output

Common Use Cases

6. formatDateTime() – Format Date and Time

Purpose

Formats date and time values into a readable format.

Syntax

formatDateTime(date, format)

Example

formatDateTime(triggerBody()?['Created'], 'dd-MMM-yyyy')

Output

16-Dec-2025

Common Use Cases

7. addDays(), addHours(), addMinutes() – Date Calculations

Purpose

Performs date and time calculations.

Syntax

addDays(date, number)
addHours(date, number)
addMinutes(date, number)

Example

addDays(utcNow(), 7)

Output

Date after 7 days from today

Common Use Cases

8. length() – Get Count of Items

Purpose

Returns the number of characters in a string or items in an array.

Syntax

length(value)

Example

length(body('Get_items')?['value'])

Output

Number of items retrieved

Common Use Cases

9. contains() – Check if Value Exists

Purpose

Checks whether a string or array contains a specific value.

Syntax

contains(value, substring)

Example

contains(triggerBody()?['Title'], 'Urgent')

Output

true

or

false

Common Use Cases

10. split() – Convert Text into an Array

Purpose

Splits a string into multiple values using a delimiter.

Syntax

split(string, delimiter)

Example

split('IT,HR,Finance', ',')

Output

["IT", "HR", "Finance"]

Common Use Cases

11. join() – Convert an Array into Text

Purpose

Combines array values into a single string.

Syntax

join(array, delimiter)

Example

join(variables('Departments'), ', ')

Output

IT, HR, Finance

12. int(), string(), bool() – Type Conversion

Purpose

Converts values into required data types.

Examples

int('10')
string(variables('Count'))
bool('true')

Common Use Cases

Common Mistakes to Avoid

Best Practices

Conclusion

Mastering Power Automate expressions significantly improves the reliability, scalability, and maintainability of your workflows. The expressions covered in this article address most real-world automation scenarios and form a strong foundation for advanced Power Automate development.

With regular practice, expressions become a powerful asset rather than a challenge.