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.
Are you sure it works this way or this is intended functionality?
The description of filters says
An array of WebhookFilter objects to specify a whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
Shouldn’t any event that matches a filter pass? It doesn’t mention that all filters needed to be matched for an event to pass.
Haha. Honestly, that’s how I feel too . My understanding is that the whitelist works as @Integromat_Dev quoted. Meaning multiple filters should provide data that fits either. I’m going to file this as a bug and I’ll give an update here if it’s not suppose to work that way.
Combining filters seems to work (I was able to copy the opening post and it worked just perfectly fine for me).
Filtering purely on a resource_subtype does not do anything. In the above example (opening post), the filtering on task due_on merely works because the user added fields: [“due_on”]. Once you remove the fields variable and keep resource_subtype = “due_on” the webhook triggers on any task event.
Combining filters seems to work (I was able to copy the opening post and it worked just perfectly fine for me).
Filtering purely on a resource_subtype does not do anything. In the above example (opening post), the filtering on task due_on merely works because the user added fields: [“due_on”]. Once you remove the fields variable and keep resource_subtype = “due_on” the webhook triggers on any task event.
Additionally: I checked all the resources below and not all of them work as a resource for webhook:
Attachment → doesn’t work (not a valid object error)
Portfolio
Project
Project Membership → doesn’t work (not a valid object error)
Section → doesn’t work (not a valid object error)
Story
Tag
Task
Team
Team Membership → doesn’t work (not a valid object error)
Workspace
Workspace Memberships → doesn’t work (not a valid object error)
Sections are still not working. It gives a “Not a valid object” error although we checked that the section exists from API Explorer. Could you help me?