Getting a user's "My Tasks" Project ID


#1

I understand per this discussion item that it’s not currently possible to programmatically obtain the Project ID for a user’s “My Tasks” project, correct?

Are there any plans to support this ability in the future?

My use case is that I want to get the order of tasks that the user has set in their My Tasks list. I don’t think there’s any way to get this other than querying the tasks in that project. (I know I can get the Project ID in the UI from the URL when looking at My Tasks, but that doesn’t help for my use case.)


How do I Sort by Assignee Priority
How can I construct the URL for a task in My Tasks?
#2

Side question: you want to guess the sorting from the task list, is that correct?

Bastien
Asana consultant, author and developer


#3

Correct!

If I grab the Project ID of “My Tasks” from the browser’s URL string and use the Asana API Explorer to retrieve a list of the tasks in that project, the order of tasks returned matches what I’ve set in the “My Tasks” UI view (taking Assignee_Status into account as the section grouping), as one would hope and expect.

So the ability to programmatically retrieve the ID of the “My Tasks” project is all that’s missing.


#4

Here you go: Cannot create a webhook for "My Tasks"

Not possible sorry :frowning:


#5

Right, understood, that’s the discussion I linked to - my question for the Asana API Team is what they think of the possibility of adding that capability? I can ask… :pray:


#6

I need it too. There is no (easy) way to mention someone in a comment without the My Tasks list id.


#7

@Joe_Trollo @Jeff_Schneider

Hi guys,
What do you think - any chance we could get a way to obtain a user’s “My Tasks” project ID via the API?


#8

Hey @Phil_Seeman, @Diakoptis, @Bastien_Siebman – thank you guys for all of your help and support in the Asana dev community!

Based on community feedback, it’s clear that devs would benefit from improvements to both MyTasks and @mentions. While we don’t yet know exactly when we’ll get to it, we do plan to make it easier to work with MyTasks and @mentions in the API. We’ll post in the community as soon as we have something to share.

Cheers!
Jeff


Cannot create a webhook for "My Tasks"
#9

Yay, that’s good to hear - thanks!


#10

Any updates on this?


#11

Good to hear. My Tasks is the default screen when users login, it’s unfortunate that we can programmatically access all the other great stuff via API but not this critical list.


#12

Did anybody find any good workarounds to fetch new tasks a user maybe have recently added in My Tasks?

I’m currently getting tasks via:
GET /projects/project-id/tasks
(this doesn’t work to get My Tasks because as discussed we don’t know project-id for My Tasks)

The only way I can find to locate tasks in My Tasks is via:
GET /tasks?workspace=workspace-id&assignee=me

But is an extra API call for each workspace and it returns a lot of duplicate data that is already being fetched by the first request. I can deduplicate the tasks easily enough, it just seems like a waste of bandwidth.


#13

Just trying to help aggregate the usecases… related issues: