โก Automations
Automations let you define rules that fire automatically when specific events occur. Each rule has a trigger, optional conditions, and one or more actions.
Triggersโ
| Trigger | Fires When |
|---|---|
message_received | An inbound message arrives |
conversation_created | A new conversation is opened |
conversation_status_changed | A conversation's status is updated |
contact_created | A new contact is created |
Conditions (optional)โ
Each condition has a Field (channel_type, status), Operator (eq or neq), and Value.
Actionsโ
| Action | Effect |
|---|---|
add_tag | Adds a tag to the conversation |
set_status | Changes conversation status |
assign_agent | Sets assigned agent |
send_message | Sends an automated reply |
Creating an Automation Ruleโ
- Go to Automations โ New Rule
- Fill in a Rule Name
- Select a Trigger
- Click + Add Action and configure each action
- Click Save Rule
Example Rulesโ
Auto-tag all new WhatsApp messagesโ
- Trigger:
message_received - Actions: Add Tag โ
whatsapp
Auto-reply on after-hoursโ
- Trigger:
message_received - Actions: Send Message โ "Thanks for reaching out! We'll reply during business hours."
Debugging Automationsโ
Check the automation_events table for failed events:
SELECT * FROM automation_events WHERE status = 'failed' ORDER BY created_at DESC LIMIT 20;