Vanity links are now in the API

Hello all! Some of you may have noticed that Asana has recently added “vanity hyperlinks,” i.e., links that can have text that is different from the target, of the form <a href="some location">different text</a>. We recently finished rolling out this feature to all users of the web app, and we can now announce that it’s available in the API as well. It works exactly as you’d expect: the API will no longer ignore the contents of <a> tags when you write to any HTML text field, and you can populate the tags with any text you like.

Some notes about the integration with “automatic hyperlinks,” i.e., links that point to objects within Asana that had automatically-generated text:

  • To disambiguate between “a link that Asana has automatically created a name for” and “a vanity link with a custom name” there’s a new attribute in our rich text: data-asana-dynamic
    • <a data-asana-dynamic="true" ...>Title</a> means that “Title” is the canonical name of the object in Asana (the name of the task, project, user, etc.)
    • <a data-asana-dynamic="false" ...>Title</a> means that “Title” is a custom name that a user has given to the link
  • If you want to create a vanity link to an Asana object, you must include data-asana-dynamic="false" in the tag, or else the API will replace the contents of the tag with the canonical name of the object.



Thanks for the update @Joe_Trollo! Are you able to pass on this related behavior for me?

Automatic hyperlinks that are included in the description of a task via a CSV import do not recognize the automatically-generated text of the Asana item when viewing from mobile

In order for the automatically-generated text to show on mobile, you have to re-link the Asana item from the web. Essentially recreate the automatic hyperlink from the web instance. When viewing from the web, the automatically-generated text appears. It just don’t convert via mobile unfortunately.