Automations
Create powerful backend processes and workflows to orchestrate your AI applications
Automations are the core server-side processes that power your AI Builder applications. They define what to do and when to do it, allowing you to create sophisticated workflows, integrate with external systems, and build intelligent applications.
Understanding Automations
In simple words, automations describe what to do and when:
- What to do: A sequence of instructions that process data and perform actions
- When to do it: Triggers that activate the automation when specific conditions are met
Example:
A HubspotDealsOnSlack automation might send a notification message on Slack every time a new Hubspot deal is created:
- The what would be a fetch instruction calling Slack API to send a message
- The when would be a URL (webhook) trigger that Hubspot calls whenever a new deal is opened
In simple words, automations describe what to do and when:
- What to do: A sequence of instructions that process data and perform actions
- When to do it: Triggers that activate the automation when specific conditions are met
Example:
A HubspotDealsOnSlack automation might send a notification message on Slack every time a new Hubspot deal is created:
- The what would be a fetch instruction calling Slack API to send a message
- The when would be a URL (webhook) trigger that Hubspot calls whenever a new deal is opened
Automations function within an event-driven architecture:
- Triggers: Define when the automation runs (events, endpoints, schedules)
- Instructions: Sequential steps that perform specific tasks
- Variables: Store and manage data during automation execution
- Memory Scopes: Different persistence layers for data (run, session, user, global)
- Output: Final result returned to the caller or next automation
This architecture enables complex workflows while maintaining flexibility and scalability.
Triggers
Automations can be activated through different types of triggers, configured at the top of the automation graph:
Memory Architecture
Automations can use and modify data across different memory scopes:
Except for $workspace, all these contexts can be written to using the set
instruction. Written data will be persisted and available in subsequent requests. However, when setting variables inside session/user contexts from an unauthenticated webhook, they will not be persisted.
Working with Variables
Inside your automation instructions, dynamic data can be injected by surrounding a variable name with double braces: {{some.variable.name}}
.
Variables can be created and modified using the set instruction and removed using the delete instruction.
For objects or arrays, you can access specific properties:
If session.myObjectVariable
equals {"mickey": "house"}
and item.field
equals mickey
, the entire expression resolves to house
.
Instructions
Once triggered, automations execute a sequence of instructions in order. Here are the available instructions:
Logic Instructions
Data Instructions
Integration Instructions
Other Instructions
Condition and Expression syntax
Conditions allow you to execute different instructions based on contextual information. You can use a powerful expression syntax in conditions and anywhere with {% ... %}
delimiters.
Basic Operators
Logical Operators
Regular Expressions
MongoDB-like Conditional Matches
Example condition:
Date Functions
Parsing and Access
Note: Tested values are UTC based, and day starts on 0 for Sunday (so 3 is Wednesday).
Formatting
See all formatting options on Day.js documentation.
Math Functions
Operators
Functions
String Functions
Arguments
When calling a native instruction or another automation, different arguments can be transmitted. These graphical inputs are not reserved to native instructions, but can also be configured for your own custom automations by specifying expected arguments and their types.
The someToken
argument defined with secret: true
is automatically redacted from native runtime events to avoid accidental leaks of sensitive information.
Arguments Validation
Automation arguments can be validated during execution by enabling validateArguments: true
:
Arguments support various validation formats including date, url, time, password, etc. Validation errors immediately stop current and parent automations.
Advanced Automation Patterns
Implement secure webhook endpoints for third-party integrations:
Implement secure webhook endpoints for third-party integrations:
Create multi-stage data processing workflows:
Coordinate multiple AI models for complex tasks:
Supported Native Events
Workspaces can listen to a specific subset of native events:
Best Practices
Next Steps
Was this page helpful?