How can I use Power Automate from Microsoft to be able to @ mention a user?

Hey Asana!

I am building a flow in Power Automate. It is currently creating a task, but I would like to add a collaborator to that task.

So I have added a couple additions steps,

  • I have the detail’s for the Asana User that I would like to tag (user name, user id, and email)
  • Create a step to create a comment on a task

The part that I cannot for the life of me figure out, is how to format the text so that I can @ mention that user.

Any guidance would be greatly appreciated!

Hi @Katie_Sellers ,

Welcome to the forum! I’m not too experienced in Power Automate, so I’m not sure if you’re setting up your own API calls or if there’s some pre-built Asana connector that does this for you. Hopefully the below is helpful, regardless. For clarity, do you want to:

  1. Create task with user as collaborator
  2. Create task, then comment on the task with an @ mention of the user (which will auto-add them as a collaborator)

If it’s the former, you can just add their ID or email to the followers property of your data object when you call this endpoint.

If it’s the latter, you would call that endpoint (you could just add them as a collaborator in the same way if desired), then after receiving a 201 from that call, grab the GID from the returned data object and call this endpoint to create a comment. In the html_text property of the data object, write your desired message and use an anchor tag to link the person (see this reference for guidelines on acceptable html tags and how to tag Asana objects).