Skip to main content

โšก 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โ€‹

TriggerFires When
message_receivedAn inbound message arrives
conversation_createdA new conversation is opened
conversation_status_changedA conversation's status is updated
contact_createdA new contact is created

Conditions (optional)โ€‹

Each condition has a Field (channel_type, status), Operator (eq or neq), and Value.

Actionsโ€‹

ActionEffect
add_tagAdds a tag to the conversation
set_statusChanges conversation status
assign_agentSets assigned agent
send_messageSends an automated reply

Creating an Automation Ruleโ€‹

  1. Go to Automations โ†’ New Rule
  2. Fill in a Rule Name
  3. Select a Trigger
  4. Click + Add Action and configure each action
  5. 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;