Hello everyone,
When I am doing changes in custom field named as status (of Type enum) in asana tasks. The webhook responds to the server only for the first time when i change it ,next time when i try to do it again , did’t get the webhook response to the server OR sime time too later .I was working fine before 2 days but now missing the changes (Hook) from the custom field.
I am not sure why it is happening.Is there any changes in the API or webhook process from the asana.
Here the webhook registration process i have used to track the custom field changes
url - https://app.asana.com/api/1.0/webhooks
body- {
"data": {
"filters": [
{
"action": "changed",
"resource_type": "task",
"fields": ["custom_fields", "due_at", "due_on", "dependencies"]
}
],
"resource": "1204191280633472",
"target": "https://dff9-111-118-241-68.ngrok.io/api/receive-webhook-other hook/1204191280633472"
}
}
Please help me to set the process so that i could get the custom field changes hook on my server.
1 Like
Hi @VideoMS,
When you get the initial event, are you responding with a 200 and sending that response back within a couple of milliseconds of receiving the event? If not, Asana is probably deactivating the webhook because they didn’t hear back, which would explain the behavior you’re seeing.
Hi @Phil_Seeman ,
whenever we are getting webhook from the asana ,immediately sending response with 200 status code and process is handshaked properly with asana .Once this process is completed.We start changing the custom field status from the asana and from there sometimes we get the webhooks. Some times the hooks are in bulk after a long delay & some times missing the custom field hooks .
We have seen one pattern that when field is changed for the time time ,we get the hook most of the time but when we change it for other values (seconds or third time) the hooks are always missing OR reach too late.
we have verified the project webhook using postman (For which we are getting random hooks) which says (last_failure_at as null)
Check complete response below -
{
"data": {
"active": true,
"created_at": "2023-03-16T13:24:30.330Z",
"last_failure_at": null,
"last_failure_content": "",
"last_success_at": "2023-03-16T20:32:29.586Z",
"is_workspace_webhook": false,
"resource_type": "webhook",
"target": "[https://dff9-111-118-241-68.ngrok.io/api/receive-webhook-other-
hook/1204194374394006"](https://dff9-111-118-241-68.ngrok.io/api/receive-
webhook-other-hook/1204194374394006%22),
"filters": []
}
}
The above response shows that there is no failed webhooks from the asana but these hooks are not reachable to the server or reach to the server in bulk after a long delay (approx 20 min).
Can you please suggest ?
I’ll bet those are heartbeat events. You need to make sure you’re responding to those with 200’s just like a regular webhook event; are you? If not, that webhook will get deactivated.
It is true that webhooks sometimes arrive delayed; they are not always real-time. @JFrentz you have the best metrics monitoring for this; are you seeing many delays these days that might explain what @VideoMS is seeing?
While I would expect some delays, you should not be failing to receive a webhook at all when you change a field that in your filter. I’m afraid I can’t explain that and you might need to contact Asana support (api-support@asana.com) for that issue.
1 Like
Hi @VideoMS @Phil_Seeman , how are you?
We are having the same problem… seems like Asana is not sending some “task changed” events (or sending with a big delay… 4 minutes in some cases). It is being like this since last friday (17)… do you have any news reggarding this question?
Hi @João_Valente, welcome to Asana’s developer community. As @Phil_Seeman has mentioned, our webhook events are not always in real time. You may experience delays by several minutes depending on if Asana is experiencing heavy usage. Give it a few days and let us know if you are still experiencing these delays.
2 Likes
As you said , we are also facing this issue from last week and we are waiting for the solution.
1 Like
Ok @John_Vu ! Thanks for your answer
1 Like