Automation Rules
Create no-code "when X happens, do Y" rules for your chatbots
Automation Rules
Automate repetitive tasks with rules that trigger on chatbot events. No code required.
How It Works
Each rule reads like a sentence: If something happens and conditions match, then do something. Build rules in Settings → Automations with the guided if → then builder, or start from a quick start (for example, "Hand over when the visitor asks for a person").
- Trigger: what event starts the rule
- Conditions: optional filters. All conditions must match (AND)
- Actions: what to do when they match
Rules run in priority order (higher first). Rules created without a chatbot apply to all your chatbots.
Triggers
| Trigger | Fires when | Condition fields |
|---|---|---|
message.received | A visitor sends a message (runs before the AI answers) | message.text |
session.created | A new conversation starts | locale, deviceType |
lead.captured | A lead is collected | lead.name, lead.email |
ticket.created | A ticket is opened | ticket.subject, ticket.priority, ticket.email |
handoff.escalated | The AI (or a rule) escalates to a person | reason |
During a handover (queued or human) the widget stores visitor messages
without calling the AI, so message.received rules do not run for those.
Conditions
| Operator | Example |
|---|---|
contains | message.text contains "refund" |
not_contains | lead.name not_contains "test" |
equals | locale equals "pt-BR" |
starts_with | lead.email starts_with "test@" |
ends_with | lead.email ends_with "@bigcustomer.com" |
regex | message.text matches refund|invoice (case-insensitive) |
Actions
| Action | What it does |
|---|---|
escalate | Hands the conversation to a person (queued). Value: optional reason |
assign_agent | Assigns the conversation to a team member (value: their user id; the builder shows a picker) |
auto_reply | Shows the visitor a fixed message. On message.received it replaces the AI answer |
add_label / remove_label | Adds or removes a label by name (created if it doesn't exist) |
set_priority | Sets a ticket's priority (ticket.created only) |
resolve | Marks the conversation resolved |
When a message.received rule escalates, assigns or replies, the AI is skipped
for that message and the visitor sees the rule's reply (or a default "connecting
you with our support team" line). escalate is not offered on handoff.escalated
to avoid loops, but assign_agent is, which is how you route escalations to a
specific person (for example VIP customers).
Hand over when the visitor asks for a person
The quick start Hand over when the visitor asks for a person is a
message.received rule with a regex over common phrases ("talk to a human",
"falar com um atendente", "hablar con un agente", ...) and an escalate
action. Unlike the AI's own escalateToHuman tool, it is deterministic: it
doesn't depend on the model deciding to escalate.
Example Rule
"Auto-resolve short-lived sessions from a locale"
{
"name": "Auto-resolve pt-BR sessions",
"trigger": "session.created",
"conditions": [
{ "field": "locale", "operator": "equals", "value": "pt-BR" }
],
"actions": [
{ "type": "resolve", "value": "" }
]
}API
| Method | Endpoint | Action |
|---|---|---|
GET | /api/automations | List all rules |
POST | /api/automations | Create rule |
PATCH | /api/automations | Update rule |
DELETE | /api/automations | Delete rule |
Disable a rule by setting active: false.
Last updated on