Chat icon

Chat

Interact with the Chat API

Actions253

Automation Rule → Create

AI-generated

Summary

Creates a new automation rule in an Approach/Chatwoot account.

Inputs

  • Account (required) — The account in which to create the automation rule. Choose from the account list or enter a numeric account ID.
  • Name (required) — Name of the automation rule.
  • Event Name (required) — The event that triggers the automation: conversation_created, conversation_opened, conversation_resolved, conversation_updated, message_created, or scheduled_message_created. Defaults to message_created.
  • Conditions (required) — One or more conditions that must be true for the automation to trigger. Each condition selects an attribute, a comparison operator, and one or more values. The attribute determines which value selector is shown. Operators include contains, days_before, does_not_contain, equal_to, is_greater_than, is_less_than, is_not_present, is_present, not_equal_to, and starts_with. Status, priority, message type, boolean, and scheduled-message conversation status attributes use predefined multi-select options; other attributes use a multi-value text field.
  • Condition Logic — How to combine multiple conditions: AND (all conditions must match) or OR (any condition can match). Defaults to AND.
  • Actions (required) — One or more actions to run when the event fires and the conditions match. Available actions: Add Label, Assign Agent, Assign Team, Change Priority, Mute Conversation, Pending Conversation, Remove All Participants, Remove Label, Reopen Conversation, Resolve Conversation, Send Attachment, Send Email to Team, Send Email Transcript, Send Message, Send Private Note, Send Webhook Event, Snooze Conversation, Update Contact Origin, Update Conversation Custom Attributes, and Wait for Seconds. Action-specific parameter fields appear only for the selected action.
  • Additional Fields — Optional settings: Active (boolean, default true) controls whether the rule is active immediately; Description adds an optional multi-line description to the rule.

Output shape

Created automation rule object

The exact returned object is the automation rule payload returned by the API for the selected account. The source builds the rule body with parseConditions and parseActions before creating the rule.

Examples

Example 1: You want new messages in open conversations to be assigned automatically to a specific agent and labeled.

Create an automation rule that triggers on message_created, matches open conversations, and assigns the conversation to an agent while adding a label.

Links

Discussion