Upcoming webhook improvements [Updated: Launched!]

Hi @Gijs,

You can’t ask for tasks at the workspace level (it’s potentially too big of a firehose of data).

Above the project level, you can only filter in one of the following ways:

  • "resource_type": "workspace_membership", "action": "added"
  • "resource_type": "workspace_membership", "action": "removed"
  • "resource_type": "team_membership", "action": "added"
  • "resource_type": "team_membership", "action": "removed"
  • "resource_type": "project", "action": "added"
  • "resource_type": "project", "action": "removed"
  • "resource_type": "project", "action": "deleted"
  • "resource_type": "project", "action": "undeleted"
  • "resource_type": "project", "action": "changed"
1 Like

Thank you @Phil_Seeman for the quick reply.
This was not completely clear as I continuously got the message “Webhooks for larger scoped resources must have at least one filter and all filters must be in our whitelist.”
This will work perfectly for our purpose though.

Even on the task level however, I still am not able to get the filter working. The webhook is created successfully, but there is no filter in the response. Also the webhook is called on other events except the completed_at field.
“filters”: [
{
“resource_type”: “task”,
“resource_subtype”: “deafult_task”,
“action”: “changed”,
“fields”: [
“completed_at”
]
}
]

Can you post the exact request you’re sending?

Also, just to make sure, are you returning the X-Hook-Secret as discussed in the The webhook “handshake” part of the webhooks documentation?

Yes, sure. The webhook is created, and gets called on updates successfully. But it gets called on every event and so the filter is not applied:
I want to only get notified when the task gets completed.
When I try the following in postman:
{
“data”: {
“resource”: “12936891283649”, #task_id (not a real one)
“target”: “https://mydomain/asana-workspace-webhook/”,
“filters”: [
{
“resource_type”: “task”,
“resource_subtype”: “default_task”,
“action”: “changed”,
“fields”: [
“completed_at”
]
}
]
}
}

Actually, it seems to work now. It’s just not passing the filter in the response. Not either when getting the webhook by id at webhooks endpoint.
I was getting other updates from a different larger scope webhook.

1 Like

Ah, good news!

@Ross_Grambo or @Joe_Trollo, is that a bug that it’s not echoing back the filter? It does show in the documentation that the filter should be part of the returned data.

Yes, prior to 100% rollout (which only occurred last week) this field was only available by selecting it with opt_fields. In the next day or so it should be included by default in responses.

1 Like