Hi Asana,
I created a Webhook to be notified whenever I create a task in a particular project. However, I receive four events after creating a task, please see the events:
[
{
user: { gid: '...', resource_type: 'user' },
created_at: '2023-04-08T18:41:52.410Z',
action: 'added',
resource: {
gid: '...',
resource_type: 'task',
resource_subtype: 'default_task'
},
parent: { gid: '...', resource_type: 'project' }
},
{
user: { gid: '...', resource_type: 'user' },
created_at: '2023-04-08T18:41:52.596Z',
action: 'added',
resource: {
gid: '...',
resource_type: 'task',
resource_subtype: 'default_task'
},
parent: { gid: '...', resource_type: 'project' }
},
{
user: { gid: '...', resource_type: 'user' },
created_at: '2023-04-08T18:41:52.696Z',
action: 'added',
resource: {
gid: '...',
resource_type: 'task',
resource_subtype: 'default_task'
},
parent: { gid: '...', resource_type: 'section' }
},
{
user: { gid: '...', resource_type: 'user' },
created_at: '2023-04-08T18:41:52.704Z',
action: 'added',
resource: {
gid: '...',
resource_type: 'task',
resource_subtype: 'default_task'
},
parent: { gid: '...', resource_type: 'section' }
}
]
Also, modifying the name of an existing task sends two events to the Webhook server. And finally, clicking add task on my Asana account sends two events to the Webhook server. See the snippet for creating the Webhook:
{
"data": {
"resource": "<project-gid>",
"target": "https://.../receiveWebhook",
"filters": [
{
"action": "added",
"resource_type": "task"
}
]
}
}
I would want to know how to configure the Webhook so that I receive exactly one event after creating a task in the project. Also, I do not want to receive any event after modifying or clicking the add task button.