Task Completed + Webhooks API

I have web hooks setup and getting events of the project but when a task is completed, there is no obvious information to signify the task was completed. All I can see is that I get a task changed status and then when requesting the task the Completed property is true, but there is now way for me to tell if that is new or not and in most cases I am getting multiple events of the task has changed in this case which is not good? Am I missing something? Any advise or information on how to capture the completed event of a task would help. Thanks!

So I was able to accomplish what I needed to do by watching the events to new stories and watching for the system story of the task being completed. Not sure if this is the recommended way though it works. Any advice is appreciated.

Hey, James, I moved this over to the Platform Feedback subcategory.

Yeah, our webhooks could be a little bit more explanatory, and we’ve identified this as a potential improvement. And you aren’t alone in simply monitoring the stories of a task as well; for some flows that’s really the only way to do it. It’s not ideal, because stories are designed to be informative and weren’t created as an audit log (for instance, you can delete them), but if you’re OK with that risk it works.

Finally, the only other thing I want to warn you about is internationalization: if you never change locale, you probably won’t have any issues, but if a user in a different locale uses your integration, the phrase might become translated - we’re not sure quite yet what to do about that. So keep an eye out!

On the bummer side, there really isn’t a better way than either re-fetching the task or reading the story :frowning: but we definitely have identified both as API opportunities!

1 Like

May I suggest the same request for task deletion.

Would be nice to have action=removed or action=deleted in the event payload, instead of having to query for a non-existing task and handling the “not found” response.

Thanks

1 Like

Hey Just a question on if this has been updated?

My use case is that I have a workflow that needs to be triggered whenever a task is completed.

Right now I run the risk of misfiring that workflow because someone updated a description or tagged the task after completion.

What would be amazing would be to add add a category to the action called completed for tasks

Any plans on a solution like this in the near future?

Any update on this guys ?? I would like to achieve the same. @Rafael1 @James_Keichinger @Eyal_Ronel

Currently I’m getting event object as below
{
“resource”: *****434718,
“user”: *****702907924,
“type”: “task”,
“action”: “changed”,
“created_at”: “2018-11-10T17:55:20.760Z”,
“parent”: null
}

And somehow events are firing multiple times so it’s not worth call one more API to check for status, whether it’s completed or not.

No, there’s no update in this area.

Also please be aware that, as Matt said, stories are not a reliable way to get information on events. As he stated. they were never designed to be an audit trail. In addition to the fact that they can be deleted as he mentioned, it’s also the case that story events are not sent in all cases. If multiple changes to a particular property of a particular object are made by the same user within a 24-hour period, without any intervening changes to that property by another user, then no story events are sent for any of the changes after the first one.

What is it useful for if not an audit trail then? :thinking:

That’s an excellent question! It does provide a history of many activities/changes on a task, but not all. In my personal view, if you can’t count on it to report on all, then its data is suspect. But I guess you could take the counter view - which apparently Asana does - that some data is better than none.

To be clear, their goal is sensible: they’re concerned that if they reported on ALL changes, the history list would be looooooooooong and thus unwieldy. I get that. But I think that their decision to make the cutoff point about 24 hours - i.e. all consecutive changes by one user within 24 hours are skipped, only the most recent is included - is too large a timeframe. I could see maybe 1 minute or 5 minutes at most.

3 Likes