Links not working when creating task with API

Hello,

Links not working when creating task with API.

Hi @Sunny_Techo,

We’ll need more detail than that to be able to provide any feedback or help.

How are you creating the link? What does one look like once you’ve created it? Exactly what happens - what is the result in your browser - when you click on it? Etc.

1 Like

Hello Phil,
Thanks for your response.

So, I’m sending link as a text without any anchor tag and It’s automatically created in links. Today, When I checked it’s seems links no longer automatically applied anchor tag on it.

Please see shared image.

screenshot-app.asana.com-2020.09.25-00_14_42

So, here more detailed description:
-> Creating task using API and sending all description information with html_notes.
Description include text and some tags but I’m sending link as a text without any anchor link on them.
-> In Asana, task created successfully and Initially, I’t converting text link into anchor tag link but when we observe today. It seems it’s not working that way.

To confirm this, when I tried to edit same task with my Asana mobile app. It’s seems to be working fine their means all link text will be converted into anchor tag link and they are clickable.

But, this is not working in browser.

I think what I would do is format your link tag as indicated here:

Yes, I got it but It’s automatically converted before and this a tag is introduced recently?

Make sure you’re not being caught by what I believe is a typo in the docs:


It was introduced on March 13 of this year:

This is really strange. It’s working for us till yesterday but suddenly stopped.

Hmm, afraid I’m stumped on that one then.

@Ross_Grambo you guys didn’t just change anything with rich-text link formatting, right?

Soooo something did change here and I’ll explain my understanding.

There was a change at the beginning of the year where the API stopped auto-formatted hyperlinks for you (the link @Phil_Seeman mentioned). This meant when you send https://example.com in html_notes we no longer automatically turn that into <a href="https://example.com">https://example.com</a>. I believe the reasoning was because html_notes is explicit and gives the dev the power to determine what should be linkify-ed and what shouldn’t (meaning if you pass https://example.com in notes, we will linkify it for you).

The yesterday part is that the team that handles how text is displayed in Asana the product, was auto-linkifying items on read still until yesterday. So developers didn’t see their integrations break back in March and are instead seeing it break now.

In summary: If you want auto-linkifying, you should use notes instead of html_notes, or explicitly declare the link inside of your html_notes.

2 Likes

Thanks Ross, for your explanation but it’s also affected task already created and not updated recently. Do you confirm it’s work like that?

So If I start using notes, do I rely on them or start adding link explicitly?

Also one more observation, when I tried to edit using mobile app then it’s working like before but not in browsers.

Any task created since we rolled out vanity links in March could have unlinkified notes (due to that API change). The web app was automatically adding <a> tags around www.example.com on read (but no longer does), and the mobile app continues to do that.

I would recommend sticking with html_notes but explicitly setting <a> tags around things you want linked. That way, if you want to use other features of html_notes in the future, you’re good to go.

2 Likes

Thanks Ross_Grambo,
I’ll make changes and unfortunately I’ve to stick with html_notes because we are using some other html tags too.
I believe that’s answer my question. So, I marked it as a solution.

Thanks for your response.
Have a good day and stay safe.

1 Like