Chatwoot icon

Chatwoot

Interact with Chatwoot API

Overview

This node integrates with the Chatwoot API to manage contacts within a Chatwoot account. Specifically, the Contact - Create operation allows users to create new contact records in their Chatwoot account. This is useful for automating customer management workflows, such as adding new leads or customers from external systems into Chatwoot for further engagement and support.

Typical use cases include:

  • Automatically creating a contact when a new user signs up on a website.
  • Importing contacts from CRM or marketing platforms into Chatwoot.
  • Adding contacts programmatically based on events or triggers in other applications.

The node supports two modes of sending data: using structured form fields for common contact attributes or providing a custom JSON payload for full control over the request body.

Properties

Name Meaning
Send How to send the data: either via Structured Fields (using predefined form inputs) or Custom JSON (providing a raw JSON payload).
Custom JSON A JSON object representing the entire contact payload. This overrides all structured fields if used.
Additional Attributes Key-value pairs for additional contact attributes in JSON format (e.g., {"city": "San Francisco", "country": "United States"}).
Avatar URL URL to a JPG or PNG image to set as the contact's avatar.
Blocked Boolean flag indicating whether the contact is blocked.
Custom Attributes Key-value pairs for predefined custom attributes in JSON format (e.g., {"user_type": "premium", "subscription": "active"}).
Email The email address of the contact.
Identifier A unique identifier string for the contact from an external system.
Inbox ID Numeric ID of the inbox to associate the contact with.
Name The name of the contact.
Phone Number The phone number of the contact.
Continue on Fail Whether to continue processing subsequent items if this operation fails.
Debug Logging Enables detailed debug logging of HTTP requests and internal state to the console. Useful for troubleshooting.

Output

The node outputs the JSON response returned by the Chatwoot API after creating the contact. This typically includes the newly created contact's details such as its ID, name, email, phone number, associated inbox, and any custom or additional attributes set.

The output structure is:

{
  "json": {
    "id": 123,
    "name": "John Doe",
    "email": "john@example.com",
    "phone_number": "+1234567890",
    "inbox_id": 1,
    "avatar_url": "https://example.com/avatar.jpg",
    "blocked": false,
    "identifier": "unique_id_123",
    "additional_attributes": { ... },
    "custom_attributes": { ... },
    ...
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Chatwoot API.
  • The node expects the base URL of the Chatwoot instance and an account ID to be configured in the credentials.
  • The node uses HTTP requests to communicate with the Chatwoot REST API endpoints.

Troubleshooting

  • Invalid JSON errors: When using the Custom JSON mode or entering JSON in Additional Attributes or Custom Attributes fields, invalid JSON syntax will cause errors. Ensure that all JSON inputs are well-formed.
  • API authentication errors: If the API key or base URL is incorrect or missing, the node will fail to authenticate. Verify the API credentials configuration.
  • Missing required fields: Some fields like inbox ID may be required depending on your Chatwoot setup. Make sure to provide all mandatory fields.
  • Continue on Fail: Enable this option if you want the workflow to proceed even if creating a contact fails for some items.
  • Debug Logging: Enable this to get detailed logs in the console which can help identify issues with request construction or API responses.

Links and References

Discussion