ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions117

Automation Rule → Add New Automation Rule To Account

AI-generated

Summary

Create a new automation rule in a specified ChatWoot account to trigger actions based on event conditions.

Inputs

  • Account Id (required) — The numeric ID of the ChatWoot account where the automation rule will be created.
  • Name — The name of the automation rule.
  • Description — A description detailing the purpose and actions of the automation rule.
  • Event Name — The event that triggers the automation rule, such as message creation, conversation creation, or update.
  • Active — Boolean flag to enable or disable the automation rule.
  • Actions — A JSON array defining actions to perform when conditions match, for example adding a label if the message content includes specific text.
  • Conditions — A JSON array specifying conditions that must be met to apply the automation rule, such as filtering messages containing certain keywords.

Output shape

a single record representing the created automation rule

Returns the newly created automation rule object from the ChatWoot API. Ensure JSON inputs for actions and conditions are correctly formatted. Operation requires valid ChatWoot credentials and an existing account ID.

Examples

Example 1: Add an automation rule to label incoming messages containing 'help' in content

Set Account ID; provide Rule Name and Description; set Event Name to 'Message Created'; enable Active; specify Actions and Conditions JSON arrays.

Discussion