question

VBS Development avatar image
VBS Development asked VBS Development answered

Team Messaging webhook not returning attachment when a Task is marked Complete/Incomplete

I'm attempting to set up a webhook that can be used to keep the status of RingCentral (glip) Tasks in sync with an external system. I am using the /restapi/v1.0/glip/posts filter (https://developers.ringcentral.com/api-reference/Team-Messaging-Post-Event).

When a new task is created the task is sent to the webhook in the Attachments field as expected but when the task is marked Complete or Incomplete the webhook does not contain any data related to the task.


Webhook data for task creation (good):

"body":{
      "id":"<>",
      "groupId":"<>",
      "type":"TextMessage",
      "text":"",
      "creatorId":"<>",
      "addedPersonIds":null,
      "creationTime":"2023-03-07T22:46:02.710Z",
      "lastModifiedTime":"2023-03-07T22:46:02.710Z",
      "attachments":[
         {
            "id":"<>",
            "assignees":[
               {
                  "id":"<>"
               }
            ],
            "chatIds":[
               "<>"
            ],
            "completenessCondition":"Simple",
            "color":"Green",
            "creationTime":"2023-03-07T22:46:02Z",
            "creator":{
               "id":"<>"
            },
            "lastModifiedTime":"2023-03-07T22:46:02Z",
            "recurrence":{
               "schedule":"None",
               "endingCondition":"None"
            },
            "status":"Pending",
            "subject":"webhook test",
            "type":"Task"
         }
      ],
      "activity":null,
      "title":null,
      "iconUri":null,
      "iconEmoji":null,
      "mentions":null,
      "eventType":"PostAdded"
   }


Webhook data for task completion (data missing):

"body":{
      "id":"<>",
      "groupId":"<>",
      "type":"TextMessage",
      "text":"",
      "creatorId":"<>",
      "addedPersonIds":null,
      "creationTime":"2023-03-07T22:48:05.714Z",
      "lastModifiedTime":"2023-03-07T22:48:05.714Z",
      "attachments":null,
      "activity":null,
      "title":null,
      "iconUri":null,
      "iconEmoji":null,
      "mentions":null,
      "eventType":"PostAdded"
   }


Is this the expected behavior? Is there perhaps a different filter I should be using? Or is there a recommended work around that doesn't involve polling for task updates? Thanks.

developer sandboxmessagewebhooks
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

Sorry for the delayed response.

Just to confirm that the event when a task is updated or completed does not include the attachment. While the attachment can be missing from those events (one can use the attachment id when a task is created), but I would expect that those events should have a task id and some meaningful task status. I will check with the platform team to see how they can improve it.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

VBS Development avatar image
VBS Development answered

Thanks @Phong Vu yes the webhook that is triggered on task completion does not include an attachment and thus it doesn't seem to be possible to determine which task was completed based on the information included in the webhook. Thanks for looking into this.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys