Power Automate (WDL) function
createArray — Power Automate (WDL) function reference
Build an array from values.
Syntax
wdl
createArray(value1, value2, ...)
Examples
wdl
createArray('a', 'b', 'c')→ ["a","b","c"]
wdl
createArray(triggerBody()?['Manager'], triggerBody()?['Backup'])
→ A two-element array
A common "append without an Append to array variable action" pattern.
wdl
union(variables('processedItems'), createArray(item()))→ The running list with the current item appended, without duplicates
Common mistakes & gotchas
- Arguments can be any mix of types (strings, numbers, objects) — WDL doesn't enforce a uniform element type.
- Calling createArray() with zero arguments is valid and returns an empty array, useful as an initial value.
Related Workflow Definition Language functions
From Arrays & collections