/azure-logic-apps:la-expression-helper <goal-description> [--validate <expression>]from azure-logic-apps
Generates, validates, and explains Workflow Definition Language (WDL) expressions for Azure Logic Apps. Supports string, date/time, JSON, conditional, type conversion, and collection operations.
Ships in azure-logic-apps. Installing the plugin adds it to Claude Code.
Generate, validate, and explain Workflow Definition Language (WDL) expressions for Azure Logic Apps.
Ask the user what data transformation or logic they need if not provided. Common goals include:
Build the expression using WDL functions. Logic App expressions use the @{...} syntax in string contexts or @<expression> when the entire value is an expression.
Expression function reference (organized by category):
String Functions:
| Function | Description | Example |
|---|---|---|
concat(text1, text2, ...) | Join strings | @concat('Hello ', triggerBody()?['name']) |
substring(text, startIndex, length) | Extract substring | @substring('Hello World', 0, 5) returns Hello |
replace(text, oldText, newText) | Replace text | @replace(triggerBody()?['msg'], ' ', '-') |
toLower(text) / toUpper(text) | Change case | @toLower(triggerBody()?['email']) |
trim(text) | Remove whitespace | @trim(triggerBody()?['input']) |
split(text, delimiter) | Split to array | @split('a,b,c', ',') |
indexOf(text, searchText) | Find position | @indexOf('Hello', 'lo') returns 3 |
startsWith(text, searchText) | Check prefix | @startsWith(triggerBody()?['code'], 'PRD-') |
endsWith(text, searchText) | Check suffix | @endsWith(triggerBody()?['file'], '.pdf') |
length(text) | String length | @length(triggerBody()?['name']) |
guid() | Generate GUID | @guid() |
Date/Time Functions:
| Function | Description | Example |
|---|---|---|
utcNow() | Current UTC timestamp | @utcNow() |
formatDateTime(timestamp, format) | Format date | @formatDateTime(utcNow(), 'yyyy-MM-dd') |
addDays(timestamp, days) | Add days | @addDays(utcNow(), 7) |
addHours(timestamp, hours) | Add hours | @addHours(utcNow(), -24) |
addMinutes(timestamp, minutes) | Add minutes | @addMinutes(triggerBody()?['start'], 30) |
convertTimeZone(timestamp, source, dest) | Convert timezone | @convertTimeZone(utcNow(), 'UTC', 'Eastern Standard Time') |
dayOfWeek(timestamp) | Day number (0=Sun) | @dayOfWeek(utcNow()) |
ticks(timestamp) | Timestamp to ticks | @ticks(utcNow()) |
dateDifference(start, end) | Duration between dates | @dateDifference(triggerBody()?['start'], utcNow()) |
Collection Functions:
| Function | Description | Example |
|---|---|---|
length(collection) | Array length | @length(triggerBody()?['items']) |
first(collection) | First element | @first(body('Get_rows')?['value']) |
last(collection) | Last element | @last(body('Get_rows')?['value']) |
contains(collection, value) | Check membership | @contains(triggerBody()?['tags'], 'urgent') |
union(collection1, collection2) | Merge arrays | @union(variables('list1'), variables('list2')) |
intersection(col1, col2) | Common elements | @intersection(variables('a'), variables('b')) |
skip(collection, count) | Skip N elements | @skip(body('Get_rows')?['value'], 10) |
take(collection, count) | Take N elements | @take(body('Get_rows')?['value'], 5) |
join(collection, delimiter) | Join array to string | @join(triggerBody()?['tags'], ', ') |
Logical Functions:
| Function | Description | Example |
|---|---|---|
if(condition, trueVal, falseVal) | Conditional | @if(equals(triggerBody()?['status'], 'active'), 'Yes', 'No') |
equals(val1, val2) | Equality check | @equals(triggerBody()?['type'], 'order') |
and(expr1, expr2) | Logical AND | @and(greater(variables('count'), 0), less(variables('count'), 100)) |
or(expr1, expr2) | Logical OR | @or(equals(variables('status'), 'A'), equals(variables('status'), 'B')) |
not(expression) | Logical NOT | @not(equals(triggerBody()?['active'], true)) |
greater(val1, val2) | Greater than | @greater(length(triggerBody()?['items']), 0) |
less(val1, val2) | Less than | @less(variables('retryCount'), 3) |
coalesce(val1, val2, ...) | First non-null | @coalesce(triggerBody()?['name'], 'Unknown') |
Conversion Functions:
| Function | Description | Example |
|---|---|---|
int(value) | Convert to integer | @int(triggerBody()?['quantity']) |
float(value) | Convert to float | @float(triggerBody()?['price']) |
string(value) | Convert to string | @string(triggerBody()?['id']) |
json(value) | Parse JSON string | @json(triggerBody()) |
base64(value) | Base64 encode | @base64(body('Get_file')) |
base64ToString(value) | Base64 decode | @base64ToString(triggerBody()?['data']) |
decodeUriComponent(value) | URL decode | @decodeUriComponent(triggerBody()?['url']) |
encodeUriComponent(value) | URL encode | @encodeUriComponent(variables('path')) |
xml(value) | Convert to XML | @xml(triggerBody()) |
xpath(xml, expression) | XPath query | @xpath(xml(body('Get_file')), '//order/id') |
Data Access Functions:
| Function | Description | Example |
|---|---|---|
triggerBody() | Trigger output body | @triggerBody() |
triggerOutputs() | All trigger outputs | @triggerOutputs()?['headers'] |
body('actionName') | Action output body | @body('Send_email') |
outputs('actionName') | All action outputs | @outputs('HTTP')?['statusCode'] |
actions('actionName') | Action status info | @actions('Step_1')?['status'] |
variables('name') | Variable value | @variables('counter') |
parameters('name') | Parameter value | @parameters('apiEndpoint') |
items('ForEachLoop') | Current loop item | @items('For_each')?['id'] |
Break down the generated expression and explain each function call, its arguments, and what it returns. Use clear language and provide the expected output for sample input data.
Warn about frequent mistakes:
? (safe navigation) or coalesce() to handle null values. triggerBody()?['name'] is safe; triggerBody()['name'] will fail if name is missing.int(), float(), or string() to convert before comparing.utcNow() always returns UTC. Use convertTimeZone() for local time. Date strings must be ISO 8601 format.@{expression} inside strings, but @expression when the entire value is the expression. Do not mix: "@concat('a', 'b')" is correct, "prefix @concat('a', 'b') suffix" is NOT — use "@{concat('a', 'b')}" inside strings.first(), last(), or bracket notation [0]. Arrays are zero-indexed.@equals(triggerBody()?['status'], 'active').Show how the expression fits in a workflow.json action:
{
"Compose_Result": {
"type": "Compose",
"runAfter": {},
"inputs": "@if(greater(length(triggerBody()?['items']), 0), concat('Found ', string(length(triggerBody()?['items'])), ' items'), 'No items found')"
}
}
Or in a condition action:
{
"Condition_Check_Status": {
"type": "If",
"runAfter": {},
"expression": {
"and": [
{
"equals": [
"@triggerBody()?['status']",
"approved"
]
},
{
"greater": [
"@triggerBody()?['amount']",
1000
]
}
]
},
"actions": {},
"else": { "actions": {} }
}
}
If --validate is provided with an expression:
? for null-safe property accessWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
8 commands in this plugin
/la-connector-configConfigure Logic App connectors — built-in, managed, custom, and on-premises data gateway/la-createCreate a new Logic App workflow with trigger selection (Request, Recurrence, Service Bus, Blob, Event Hub)/la-deployDeploy Logic App to Azure via CLI, ARM/Bicep, or generate CI/CD pipeline/la-integration-accountSet up B2B integration account — create account, add partners, agreements, schemas, maps/la-migrate-iseMigrate Logic Apps from ISE to Standard — inventory, assess, export, convert, validate/la-setupSet up Azure Logic Apps development — install VS Code extension, Azure CLI, configure local dev environmentnpx claudepluginhub thelobbi/claude-m --plugin azure-logic-appsOther plugins' commands for the same job