Workflow conditions accept JavaScript expressions wrapped in double curly bracesDocumentation Index
Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
Use this file to discover all available pages before exploring further.
(`{{ ... }}`) to dynamically evaluate logic. These expressions are enclosed in double curly braces (`{{ ... }}`) and evaluated at runtime.
Expressions can access:
- Data from previous steps (
$json,$prev, etc.) - The loop context
- Built-in functions and utility libraries
"active":
Expression inputs
You can access the following contextual data inside expressions:| Token | Description |
|---|---|
$json | The JSON object from the current or previous step |
$prev | Data from the previous node |
DateTime | Utility for working with dates and times (Luxon) |
Type conversion tip
Some values (such as “true” or “false”) are returned as strings. To ensure your conditions behave as expected, you can enable “Convert types where required” in the Condition node settings. Without type conversion:Example: Remove addon from a subscription
At the end of a billing period, remove a specific addon from a subscription if it exists.- Run this workflow on a schedule or based on a billing-related event.
- Use the List Subscriptions action to retrieve active subscriptions.
- Use a loop node to iterate through the returned subscriptions.
-
For each subscription, loop through its
addonsarray. - Condition Check
- Update Subscription
- Subscription ID: Pass from the previous loop context
- Addons: Supply a filtered list that excludes the unwanted addon
[].
Using Luxon for date manipulation
TheDateTime object is available for date handling inside expressions.
Examples: get dates
Get today’s ISO date:Multi-line code blocks and variable declarations are not allowed in expressions.
Invalid (multi-line code block)
Valid (single-line expression)
Example: Extract nested JSON values
If your input JSON contains nested fields, you can access them like this:Troubleshooting common issues
| Issue | Solution |
|---|---|
| Condition fails unexpectedly | Enable “Convert types where required” or check your type comparisons |
| Expression returns undefined | Make sure the key path is correct; use optional chaining (?.) |
| Cannot reference a value | Confirm the value exists in the current execution context ($json) |
| Date math errors | Use ISO-formatted strings and the DateTime library |
