ChatWoot Application icon

ChatWoot Application

Interact with ChatWoot Application APIs

Actions112

Automation Rule → Add a New Automation Rule

AI-generated

Summary

Create a new automation rule for a specified ChatWoot account, defining when it triggers and what actions to perform.

Inputs

  • Account ID (required) — The numeric ID of the ChatWoot account where the automation rule will be created.
  • Name — The name to assign to the automation rule.
  • Description — A description of the automation rule and its actions.
  • Event Name — The event that triggers the automation rule, such as conversation creation or message creation. Defaults to 'conversation_created'.
  • Active — Boolean flag to indicate whether the automation rule should be enabled upon creation.
  • Conditions — A JSON array specifying the conditions under which the automation rule applies (e.g., message content contains specific text).
  • Actions — A JSON array defining the actions to perform when the conditions match (e.g., adding a label to the conversation).

Output shape

a JSON object representing the newly created automation rule, including its ID, name, conditions, actions, and status

The creation request will return details of the automation rule that was added. Optional fields are sent in the request body only if provided. Errors during creation will typically be returned via node error handling.

Examples

Example 1: Create and enable an automation rule that triggers on message creation, checks for specific content, and performs labeling.

Set 'Account ID' to target the account, provide 'Name', set 'Event Name' to 'message_created', include relevant 'Conditions' and 'Actions' JSON arrays, and set 'Active' to true.

Links

Discussion