⚙ Operations Hub

LDretzolis
Participant

Custom code Workflow - Insert hyperlink inside rich text

SOLVE

Hi Hubspot users, 

 

I'd like to automatically add a hyperlink to a rich text property for my contacts. 

 

For this, I'm using a custom code action inside of a workflow.

 

Nonetheless, I can't seem to find any documentation about how to do this in Python. 

 

The action I want to perform is simple, I just want to add a hyperlink to a rich text like this : rich text

 

thanks a lot for your help 🙂

 

Louis

0 Upvotes
1 Accepted solution
KimM
Solution
Top Contributor

Custom code Workflow - Insert hyperlink inside rich text

SOLVE

Hi @LDretzolis , It depends what you are trying to achieve with this. Is it for the purpose of adding customised hyperlinks to email campaigns? If so, you have to enter the hyperlink as if you were coding it in HTML.

 

So for example, a link is defined with the <a> tag and you would href= to define the destination URL. Then the anchor text would appear between the opening and closing tags. See a sample below:

<a href="https://hubspot.com">This is a link to hubspot</a>

Then this can be used as a personalisation token in email campaigns. You would simply assign this with the 'Set property value' action in Hubspot, no need for custom code.

 

If this isn't what you're trying to achieve, let me know what your purpose is and I can have another look.

View solution in original post

2 Replies 2
KimM
Solution
Top Contributor

Custom code Workflow - Insert hyperlink inside rich text

SOLVE

Hi @LDretzolis , It depends what you are trying to achieve with this. Is it for the purpose of adding customised hyperlinks to email campaigns? If so, you have to enter the hyperlink as if you were coding it in HTML.

 

So for example, a link is defined with the <a> tag and you would href= to define the destination URL. Then the anchor text would appear between the opening and closing tags. See a sample below:

<a href="https://hubspot.com">This is a link to hubspot</a>

Then this can be used as a personalisation token in email campaigns. You would simply assign this with the 'Set property value' action in Hubspot, no need for custom code.

 

If this isn't what you're trying to achieve, let me know what your purpose is and I can have another look.

MiaSrebrnjak
Community Manager
Community Manager

Custom code Workflow - Insert hyperlink inside rich text

SOLVE

Hi @LDretzolis,

 

Thank you for reaching out to the Community! 

 

I wanted to tag in a couple of subject matter experts to see if they have any ideas or input they could share with us: 

Hi @ChrisoKlepke@taran42@christopher-RVO, do you have any advice for @LDretzolis? Thank you!

 

Cheers
Mia, Community Team    

 


Wusstest du, dass es auch eine DACH-Community gibt?
Nimm an regionalen Unterhaltungen teil, indem du deine Spracheinstellungen änderst


Did you know that the Community is available in other languages?
Join regional conversations by
changing your language settings