Using Empty Function in Power Automate

Introduction to Empty Function

The Empty function in Power Automate is a built-in expression that helps determine whether a value contains data or not. It is useful when working with SharePoint, Dataverse, Excel, Outlook, APIs, and variables.

What is Empty Function?

The Empty function checks whether a value is empty. It returns true when the value is empty and false when the value contains data.

Syntax

empty(value)

Example

empty('')

Output: true

Why Use Empty?

Organizations commonly use Empty to validate user input, check API responses, verify SharePoint fields, handle optional values, prevent workflow failures, and improve error handling.

Solution Overview

Workflow: GetData > CheckEmpty > Condition > ProcessData > ContinueFlow

This ensures actions run only when valid data exists.

Example 1: Empty String

Expression: empty('')

Result: true

Because the string contains no value.

Example 2: Non-Empty String

Expression: empty('CRMONCE')

Result: false

Because data exists.

Example 3: Empty Array

Expression: empty(createArray())

Output: true

The array contains no elements.

Example 4: Array with Values

Expression: empty(createArray('A','B'))

Output: false

Because the array contains data.

Example 5: Check SharePoint Column

Expression: empty(triggerOutputs()?['body/Title'])

Result: True → Title is empty, False → Title contains data

Useful when validating SharePoint records.

Example 6: Check Dataverse Field

Expression: empty(outputs('Get_Row')?['body/emailaddress1'])

Result: True → Email field is blank, False → Email exists

Commonly used in Dataverse automations.

Using Empty in Conditions

Add: Condition Action

Expression: empty(variables('CustomerName'))

If: true, Then: SendNotification, Else: ContinueProcessing

This prevents processing incomplete records.

Combining Empty with NOT

Expression: not(empty(variables('CustomerName')))

Meaning: Value exists.

Result: true when data is available.

This is commonly used before sending emails or creating records.

Real-World Example

Customer Registration Process

Requirement: Create customer records only if Email Address exists.

Workflow: SubmitForm > CheckEmailField > empty(email) > IfFalse > CreateCustomer

Result: Only valid records are processed.

Common Use Cases

Best Practices

Benefits

Conclusion

The Empty function is one of the most useful expressions in Power Automate for validating data and handling missing values. Whether you're working with SharePoint, Dataverse, Excel, APIs, or variables, Empty helps ensure workflows process only valid data and avoid unnecessary errors.

By combining Empty with conditions and validation logic, organizations can build more reliable and efficient automation solutions.