Comments webhook

Set up and manage webhooks to improve your Comments integration. Common use cases for Comments webhooks include:

  • Sending notifications when a thread is created, resolved, updated, or deleted.
  • Notifying users when comments are added, updated, or deleted.
  • In conjunction with the mention extension, sending emails or notifications to users when they are mentioned in comments.

Enable comment events

For accounts created after March 1, 2024, Comments webhooks are enabled by default. Otherwise, you could still be using an older version of the webhook system and need to manually upgrade:

  1. In case you’ve previously implemented Collaboration webhooks, check the type and trigger fields when processing incoming webhooks. (Documentation)
  2. Navigate to your Collaboration settings.
  3. In the Webhooks section, click Upgrade.

This upgrade is necessary to accommodate the introduction of multiple new events being routed to the same webhook endpoint, distinguished by a new type and trigger field.

Configure webhooks

To configure webhooks for Comments notifications:

  1. Navigate to the Collaboration settings in your account.
  2. In the Webhooks section, add your desired endpoint URL.

After adding your URL, the webhook is immediately live. You'll start receiving notifications for the specified events without any delay.

Webhook events

Comments webhooks trigger notifications for a variety of events related to threads and comments within the Comments extension. These events are triggered immediately as soon as their associated action occur within the comments.

  • comment.added
  • comment.updated
  • comment.deleted
  • thread.created
  • thread.resolved
  • thread.updated
  • thread.deleted

Example payloads

Below are example payloads for different types of webhook events:

Thread/comment created

{
  "trigger": "comment.added",
  "thread": {
    "id": "128ba3a9-c684-4956-8c9f-fe5dc147c7e5",
    "createdAt": "2024-03-02T22:17:51.304Z",
    "comments": [
      {
        "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
        "createdAt": "2024-03-02T22:17:51.307Z",
        "updatedAt": "2024-03-02T22:17:51.307Z",
        "data": {
          "userName": "Cyndi Lauper",
          "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
        },
        "content": "Threaderstellungskommentar"
      }
    ],
    "updatedAt": "2024-03-02T22:17:51.305Z"
  },
  "comment": {
    "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
    "createdAt": "2024-03-02T22:17:51.307Z",
    "updatedAt": "2024-03-02T22:17:51.307Z",
    "data": {
      "userName": "Cyndi Lauper",
      "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
    },
    "content": "Threaderstellungskommentar"
  },
  "appName": "",
  "user": "",
  "name": "documentName",
  "type": "THREAD"
}

Comment updated

{
  "trigger": "comment.updated",
  "thread": [
    {
      "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
      "createdAt": "2024-03-02T22:17:51.307Z",
      "updatedAt": "2024-03-02T22:18:04.246Z",
      "data": {
        "userName": "Cyndi Lauper",
        "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
      },
      "content": "Threaderstellungskommentar (bearbeitet)"
    }
  ],
  "comment": {
    "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
    "createdAt": "2024-03-02T22:17:51.307Z",
    "updatedAt": "2024-03-02T22:18:04.246Z",
    "data": {
      "userName": "Cyndi Lauper",
      "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
    },
    "content": "Threaderstellungskommentar (bearbeitet)"
  },
  "appName": "",
  "user": "",
  "name": "documentName",
  "type": "THREAD"
}

Comment deleted

{
  "trigger": "comment.deleted",
  "thread": {
    "id": "128ba3a9-c684-4956-8c9f-fe5dc147c7e5",
    "createdAt": "2024-03-02T22:17:51.304Z",
    "comments": [
      {
        "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
        "createdAt": "2024-03-02T22:17:51.307Z",
        "updatedAt": "2024-03-02T22:18:04.246Z",
        "data": {
          "userName": "Cyndi Lauper",
          "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
        },
        "content": "Threaderstellungskommentar (bearbeitet)"
      }
    ],
    "updatedAt": "2024-03-02T22:17:51.305Z"
  },
  "comment": {
    "id": "1841e650-2202-42b6-a868-907fee42ccf7",
    "createdAt": "2024-03-02T22:18:20.974Z",
    "updatedAt": "2024-03-02T22:18:20.975Z",
    "data": {
      "userName": "Cyndi Lauper",
      "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
    },
    "content": "Zweites Kommentar, selber Thread"
  },
  "appName": "",
  "user": "",
  "name": "documentName",
  "type": "THREAD"
}

Thread deleted

{
  "trigger": "thread.deleted",
  "thread": {
    "id": "128ba3a9-c684-4956-8c9f-fe5dc147c7e5",
    "createdAt": "2024-03-02T22:17:51.304Z",
    "comments": [
      {
        "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
        "createdAt": "2024-03-02T22:17:51.307Z",
        "updatedAt": "2024-03-02T22:18:04.246Z",
        "data": {
          "userName": "Cyndi Lauper",
          "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
        },
        "content": "Threaderstellungskommentar (bearbeitet)"
      }
    ],
    "updatedAt": "2024-03-02T22:18:52.050Z",
    "resolvedAt": null
  },
  "appName": "",
  "user": "",
  "name": "documentName",
  "type": "THREAD"
}

Thread resolved

{
  "trigger": "thread.resolved",
  "thread": {
    "id": "128ba3a9-c684-4956-8c9f-fe5dc147c7e5",
    "createdAt": "2024-03-02T22:17:51.304Z",
    "comments": [
      {
        "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
        "createdAt": "2024-03-02T22:17:51.307Z",
        "updatedAt": "2024-03-02T22:18:04.246Z",
        "data": {
          "userName": "Cyndi Lauper",
          "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
        },
        "content": "Threaderstellungskommentar (bearbeitet)"
      }
    ],
    "updatedAt": "2024-03-02T22:18:48.531Z",
    "resolvedAt": "2024-03-02T22:18:48.531Z"
  },
  "appName": "",
  "user": "",
  "name": "documentName",
  "type": "THREAD"
}

Thread updated (i.e., Unresolved)

{
  "trigger": "thread.updated",
  "thread": {
    "id": "128ba3a9-c684-4956-8c9f-fe5dc147c7e5",
    "createdAt": "2024-03-02T22:17:51.304Z",
    "comments": [
      {
        "id": "0259e4cb-43ad-4eb2-a7e9-a7a7d5207a76",
        "createdAt": "2024-03-02T22:17:51.307Z",
        "updatedAt": "2024-03-02T22:18:04.246Z",
        "data": {
          "userName": "Cyndi Lauper",
          "userAvatar": "https://api.dicebear.com/7.x/lorelei/svg?seed=Cyndi Lauper"
        },
        "content": "Threaderstellungskommentar (bearbeitet)"
      }
    ],
    "updatedAt": "2024-03-02T22:18:52.050Z",
    "resolvedAt": null
  },
  "appName": "",
  "user": "",
  "name": "documentName",
  "type": "THREAD"
}