Two events are generated when a new task is created.

Hi,

I have created a webhook to subscribe for the new task when it is created.
Payload having like this :

‘data’: {
‘resource’: ProjectId,
‘target’: https://targeturl.com,
‘filters’: [{
‘resource_type’: ‘task’,
‘resource_subtype’: ‘default_task’,
‘action’: ‘added’
}]
}
}

But I am receiving two events like this

[
{
“user”: {
“gid”: “1205735503417300”,
“resource_type”: “user”
},
“created_at”: “2024-01-10T14:06:56.340Z”,
“action”: “added”,
“resource”: {
“gid”: “1206308356089450”,
“resource_type”: “task”,
“resource_subtype”: “default_task”
},
“parent”: {
“gid”: “1206308035920542”,
“resource_type”: “project”
}
},
{
“user”: {
“gid”: “1205735503417300”,
“resource_type”: “user”
},
“created_at”: “2024-01-10T14:06:56.422Z”,
“action”: “added”,
“resource”: {
“gid”: “1206308356089450”,
“resource_type”: “task”,
“resource_subtype”: “default_task”
},
“parent”: {
“gid”: “1206308035920543”,
“resource_type”: “section”
}
}
]
Getting two events for the parent project and section, I want the event only the parent project. How can I solve this issue?

Hi @Prem1,

(FYI I moved your post to the API forum section.)

I’m afraid there’s not a way to filter that event out; you’ll have to deal with it on your end.

1 Like