Tag task based on who commented last


I’m getting ready to write a script that will take a given task, look at its stories (comments), look at who posted last to the comment, and create a tag of a certain color based on whether the user is a member of the development team or not. My current questions are:

  • is it possible to sort by date so that I can get only the most recent story?
  • is there an easy way to identify the poster as a member of our development team or not?



Welcome to the community!

I’d say you need to get all the stories and order them yourself https://asana.com/developers/api-reference/stories#get-all

I am surprised to not find an endpoint to get a user team. Maybe you need to get all the teams and find out yourself https://asana.com/developers/api-reference/teams#users

@Phil_Seeman @lpb @Diakoptis any idea?


Hi @Paul_Clerc and thanks @Bastien_Siebman,


returns an array of objects for user “me” that include a name property which is the team name, so if one of them matches “Development” the user is a team member.

@Joe_Trollo, I think the API documentation is missing mention of the need for the parameter organization=:gid, right?



:champagne: thanks a lot Larry


Thanks so much for the replies gents. Much appreciated!