Power Automate (WDL) function
replace — Power Automate (WDL) function reference
Replace all occurrences.
Syntax
wdl
replace(text, oldText, newText)
Examples
wdl
replace('a-b-c', '-', '/')→ "a/b/c"
wdl
replace(triggerBody()?['Path'], '\\', '/')
→ A path with backslashes swapped for forward slashes
wdl
replace(item()?['Sku'], ' ', '')
→ The SKU with spaces stripped out
Common mistakes & gotchas
- replace() is case-sensitive — replace('ABC', 'abc', 'x') returns 'ABC' unchanged.
- It performs literal substring replacement only — there is no regex-based replace in WDL.
Related Workflow Definition Language functions
From Strings