I have built a natural language processing reminder integration for Asana, and it’s working great!
There’s been two issues I haven’t been able to overcome thus far:
Creating a webhook for all tasks in a workspace. This may not be possible? The responses are a bit confusing, but after piecing together information from around the forum, I believe the answer here is: “You can’t get events for all story changes (tasks) in a workspace. Instead, you can only listen to project level changes.” - is that correct? Or is there a way to listen to story changes at the workspace level?
How to create a webhook that triggers for personal, private tasks (story events). When I create a task quickly (tab+q in the web app or tap the plus to add a task in the iOS/Android app), it has no default project set. It’s a private task visible only to me. Is there a way to have a webhook trigger on that? I haven’t found a way due to question #1 - I’ve only been able to add webhooks for projects.
Please let me know if I can add any more details or information!
tldr; Is there a webhook event for tasks added with tab+q with no project set?
At the story and task level, this is correct - you can only subscribe to those changes at the project level.
There are higher-level webhooks available, like at the team and workspace level, but those return higher-level events, not task and story events. The Asana folks were concerned that task/story events at a team or workspace level would sometimes produce too big of a firehose of data (remember that the Asana API has to support all Asana customers including ones with tens of thousands of projects in a workspace).
Every user has a User Task List (UTL) which corresponds to their “My Tasks” list in the UI. Your UTL behaves very similarly to a project. You can use the API to get the ID of your UTL and then you can set a webhook on it, which should get you those tasks that have no project but are assigned to you and thus are in your UTL. (If you have any troubles getting data from this webhook, let us know, as it is supposed to be possible but I think I recall never fully testing it myself.)
If you really are focusing on stories (as opposed to tasks) then I do want to caution you that story webhooks will not provide a 100% accurate representation of changes on a task. Asana stories undergo what they call “story consolidation” - in short, if a given user changes a data element on a task multiple times within a 24-hour period, then only the most recent change is kept as a story. In terms of webhooks, this means that you might see two things you don’t expect: a story change event changing an earlier story, or a story delete/story add event pair deleting an earlier story and then adding the new one. (Unfortunately there’s some inconsistency; on some data elements you’ll see the change event, or others you’ll see the delete/add pair.)