Webhooks filters

Hi!

I need some assitance to make work a webhook with two different filters.

  • Comments added in a specific task --> IITS WORKING
  • Due date change in specific task (The same taks as before) --> NOT WORKING

I receive added storys via webhooks, but not the event of that the due date change, how can achieve this?

{
“data”: {
“resource”: “1191784326921361” ------> TASK ID,
“filters”: [
{
“resource_type”: “story”,
“resource_subtype”: “comment_added”,
“action”: “added”
},
{
“resource_type”: “task”,
“resource_subtype”: “due_on”,
“action”: “changed”,
“fields”:[
“due_on”
]
}
],
“target”: TARGET
}
}

Thanks a lot for the help!

Another detail: if i create different webhooks with those filters, both work separated but not together

Right! You can’t combine two different resource_types in one filter. Why not? Because when you specify the first filter of “resource_type”: “story”, that filters out events from other resource types including task. That is, you’ve filtered out all task events by specifying the first filter.

Doing them as separate webhooks is the only way to get both types of events.

Thanks Phil, but the problem that i found is that i cant create both webhooks simunstaniously. I mean, what i did was:

Create a webhook for comments, tested and it work
Delete the webhook
Create a webhook for due date, tested and it work

If i try to stablish both webhooks i receive a error that says that for that resource (the task) there is a already stablish a webhook. I cant make it work both webhooks at the same time.

If you can give me any help with this it would be great.

Thanks a lot.

I get to solve this.

I create the 2 webhooks separatly and use an especifi URL with diferent path.

Thanks.