Power Automate (WDL) function
empty — Power 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
- The cleanest way to branch on a no-results query.
- empty(null) returns true, but referencing a property that does not exist at all (rather than existing with a null value) can throw before empty() even runs — wrap deep paths in ?[ ] first, e.g. empty(item()?['OptionalField']).
- A string containing only whitespace is not considered empty — trim() it first if you need to catch that case.
Related Workflow Definition Language functions
From Arrays & collections