Cheat Sheets/Power Automate/empty
Power Automate (WDL) function

emptyPower Automate (WDL) function reference

Test for an empty array/string/object.

Syntax

wdl
empty(collection)

Examples

wdl
empty(body('Get_items')?['value'])
true / false
wdl
if(empty(triggerBody()?['ApproverEmail']), 'no-reply@contoso.com', triggerBody()?['ApproverEmail'])
A fallback address, or the real one

A common Condition gate before an Apply to each.

wdl
not(empty(body('Get_items')?['value']))
true when the query returned at least one row

Common mistakes & gotchas

Related Workflow Definition Language functions

From Arrays & collections

Used in these tutorials

← Back to the Power Automate (WDL) cheat sheet