ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

This node allows you to add a new automation rule to a specified account in ChatWoot. Automation rules help automate actions based on specific events and conditions within the ChatWoot platform, such as labeling messages or triggering workflows when certain criteria are met.

Common scenarios include:

  • Automatically tagging incoming messages containing specific keywords.
  • Triggering notifications or workflows when conversations are created or updated.
  • Enabling or disabling automation rules dynamically for better control over message handling.

For example, you can create a rule that adds a "support" label to any message that contains the word "help," which helps your support team quickly identify and prioritize relevant conversations.

Properties

Name Meaning
Account Id The numeric ID of the ChatWoot account where the automation rule will be added.
Name The name of the automation rule, e.g., "Add label on message create event".
Description A description explaining what the automation rule does and the actions it performs.
Event Name The event that triggers the automation rule. Options: Conversation Created, Conversation Updated, Message Created.
Active Boolean flag to enable or disable the automation rule.
Actions JSON array defining the actions to perform when conditions match. Example: adding labels like "support".
Conditions JSON array defining the conditions under which the automation rule applies. Example: message content contains "help".

Output

The node outputs JSON data representing the newly created automation rule as returned by the ChatWoot API. This typically includes details such as the rule's ID, name, description, event trigger, active status, actions, and conditions.

If the node supports binary data output (not indicated here), it would represent related files or attachments, but this node primarily deals with JSON data.

Dependencies

  • Requires an API key credential for authenticating with the ChatWoot API.
  • The base URL of the ChatWoot instance must be configured in the node credentials.
  • The node depends on the ChatWoot REST API to create automation rules.

Troubleshooting

  • Invalid Account Id: Ensure the provided account ID exists and is accessible with the given API credentials.
  • Malformed JSON in Actions or Conditions: The actions and conditions properties expect valid JSON arrays. Invalid JSON will cause errors.
  • API Authentication Errors: Verify that the API key and base URL are correctly set in the node credentials.
  • Event Name Not Supported: Use one of the allowed event names ("conversation_created", "conversation_updated", "message_created").
  • Rule Creation Fails: Check if the account has permissions to add automation rules and that all required fields are provided.

Links and References

Discussion