Power Automate (WDL) function
null-safe access ?[ ] — Power Automate (WDL) function reference
Read a field without failing.
Syntax
wdl
expression?['propertyName']
Examples
wdl
body('Get_item')?['Author']?['Email']→ A value or null
wdl
triggerBody()?['Customer']?['Address']?['City']
→ A value or null, safely chained through three levels
wdl
if(equals(item()?['Approver']?['Email'], null), 'unassigned', item()?['Approver']?['Email'])
→ The approver email, or "unassigned"
Common mistakes & gotchas
- Chain ?[ ] through every level. One missing link otherwise breaks the whole expression.
- ?[ ] only guards the immediate property lookup — if item()?['Customer'] itself is null and the next access doesn't also use ?[ ], that next access still throws.
- Without the leading ?, a plain ['propertyName'] access throws immediately when the property doesn't exist, rather than returning null — always use ?[ ] on anything sourced from a trigger or connector whose schema isn't guaranteed.
Related Workflow Definition Language functions
From Objects & JSON