Power Automate Expression Builder
Browse a curated set of Power Automate and Workflow Definition Language function examples by category, insert one into an editor, adapt it, and check balanced parentheses and single-quoted strings. The wrapped preview is a syntax aid and does not evaluate flow data.
How to Use the Power Automate Expression Builder
Start from a curated function example, customize it for your flow, and use the local check as an early syntax screen.
- Choose All or a String, Date, Math, Array, Logical, Conversion, or Variable category.
- Select a function card to load its example; star functions you reuse to keep them under Favorites.
- Edit literals, paths, action names, variables, and nested calls for your scenario.
- Review the Valid/Invalid message and the wrapped preview text.
- Copy the preview into the appropriate Power Automate expression field and test with real sample data.
Validation method
The scanner’s method walks the expression character by character, tracking parenthesis depth and single-quoted strings (with '' as an escaped apostrophe). Unmatched parentheses or an open string produce an Invalid message with a short reason.
Example workflow
Pick concat, change the example to concat('Hello, ', triggerBody()?['fullname']), confirm Valid, copy the @{...} preview, and paste it into a Compose or field expression in your flow designer—then run a test.
Syntax tips
- Prefer single quotes for string literals in these examples, matching common Power Automate expression style.
- Nested calls must still balance parentheses; the tool will not fix argument order for you.
- Wrapper needs differ by control—some fields want @{...}, others already expect an expression body.
Limitations
- No runtime evaluation, IntelliSense against your flow, or full WDL coverage.
- Double-quoted strings are not the focus of the terminator check.
- A Valid badge is never a substitute for a successful flow run.
Privacy note
Editing and validation happen in the browser. Favorites persist in localStorage. Do not paste secrets, connection strings, or sensitive payload samples into expressions you may later share.
FAQ
Does this run my expression against a real flow?
No. It only checks parenthesis balance and single-quoted string termination locally. It does not connect to Power Automate, resolve actions, type-check arguments, or evaluate trigger/action data.
What does the wrapped preview do?
If the trimmed input already starts with @{...} or @functionName, it is left unchanged. Otherwise it wraps the text as @{...}. Whether that wrapper is correct depends on the Power Automate field you paste into.
Which function categories are included?
A curated catalog covers String, Date, Math, Array, Logical, Conversion, and Variable examples—such as concat, formatDateTime, add, equals, createArray, json, variables, outputs, and triggerBody. It is not a complete Microsoft function encyclopedia.
What does a Valid result mean?
Parentheses are balanced and single-quoted strings appear terminated (including doubled apostrophes inside strings). Function names, argument counts, types, null handling, and platform availability are not verified.
Where are Favorites stored?
Starred function names are saved in the browser's localStorage on your device. Clearing site data removes them. Favorites are not synced to a ToolsLibrary account.
Why did my draft disappear when I clicked another function?
Selecting a function card replaces the editor contents with that function's example. Copy your draft first if you need to keep unsaved edits.
Can I rely on examples' action names in my flow?
No. Examples use illustrative names like Get_item or triggerBody paths. Adapt action names, variable names, types, and date formats to your flow, then validate inside Power Automate with sample runs.