Overview
Validations determine whether an automation should execute. They act as gatekeepers - if a validation fails, the automation’s actions are skipped entirely. This helps you create conditional logic without complex action blocks.Pre-Execution Check
Validate before any actions run
Multiple Types
Expression, REST API, or Location checks
Short-Circuit
Skip all actions if validation fails
Custom Messages
Show user-friendly error messages
How Validations Work
false, all action blocks are skipped and an optional error message is shown to the user.
Validation Types
1. Expression Validation
Write JavaScript expressions that returntrue or false.
Use for:
- Checking data field values
- Comparing dates or numbers
- Complex conditional logic
2. REST API Validation
Call an external API to validate. The automation proceeds only if the API returns a successful response matching your criteria. Use for:- Verifying data with external systems
- Credit checks or inventory availability
- Third-party validation services
| Field | Description |
|---|---|
| URL | API endpoint to call |
| Method | HTTP method (GET, POST, etc.) |
| Headers | Request headers (auth, content-type) |
| Body | Request payload with data field placeholders |
| Success Condition | Expression to evaluate the response |
3. Location Validation
Verify the user is at or near a specific location before allowing the automation to proceed. Use for:- Ensuring field workers are on-site
- Geo-fenced task completion
- Delivery verification
| Field | Description |
|---|---|
| Target Location | Data field containing the expected location |
| User Location | Current user’s GPS coordinates |
| Radius | Maximum allowed distance (meters) |
Adding a Validation
1
Open Automation
Navigate to the automation you want to add validation to
2
Click Add Validation
In the automation editor, click Add Validation
3
Select Type
Choose Expression, REST API, or Location
4
Configure
Enter your validation logic based on the type
5
Set Error Message
Enter the message to show users when validation fails
6
Save
Save the automation
Error Messages
When validation fails, you can display a custom error message to the user:{{field}} syntax.
Best Practices
Keep Validations Simple
Keep Validations Simple
Complex logic is better handled in action block conditions. Validations should be clear pass/fail checks.
Use Descriptive Error Messages
Use Descriptive Error Messages
Help users understand why the validation failed and what they can do about it.
Consider Performance
Consider Performance
REST API validations add network latency. Use expression validations for local checks.
Handle API Failures
Handle API Failures
Decide whether API errors should fail validation (safe default) or pass through.
Validation vs Conditions
| Aspect | Validation | Condition |
|---|---|---|
| Scope | Entire automation | Single action block |
| On Failure | Skip all actions | Skip that block only |
| Error Message | Can show to user | Silent skip |
| Use Case | Pre-flight checks | Branching logic |
Common Validation Patterns
Required Fields
Required Fields
Business Hours Only
Business Hours Only
User Permission Check
User Permission Check
Data Format Validation
Data Format Validation
For AI Agents
Validation Structure
Available Variables
| Variable | Description |
|---|---|
task | Current task object with all data fields |
task.data | User-defined data field values |
loggedInUser | Current user information |
loggedInUser.role | User’s role |
loggedInUser.team | User’s team |
loggedInUser.location | User’s current GPS location |
response | REST API response (for API validations) |
secrets | Stored secret values |
UI Components
| Component | Location | Purpose |
|---|---|---|
| ValidationEditor | /src/views/automations/ValidationEditor/ | Validation configuration |
| ExpressionEditor | /src/components/LowCode/ | JavaScript editor |
| ApiConfigEditor | /src/views/automations/ApiConfig/ | REST API setup |
| LocationPicker | /src/components/LocationPicker/ | Location selection |