Productivity Tools

soheilhs
Member

how to insert a token to a link as a hyperlink in templates

SOLVE

Hello Everyone,

I was wondering if we could add a personalized token, for instance, {{email}} to a link and then add it as a hyperlink in a template. 

For instance, instead of clicking here 😆 link.com
I want to show Click here, where I added the email into the link.com string.

Can anyone guide me on this?

0 Upvotes
1 Accepted solution
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

how to insert a token to a link as a hyperlink in templates

SOLVE

Hi @soheilhs,

 

Yes, that's possible. The syntax for a spelled personalization token is:

 

{{ object.internal_label_of_property }}

 

For example, for the email address field, this would result in: {{ contact.email }}

(You can find the internal label in the property settings. Open a property, then click the </> next to the name.)

 

If you want to create a mail-to link now, those always start with: mailto:

 

Resulting in a mailto:{{ contact.email }}

 

Adding this to a hyperlink field would be the approach here. HubSpot tries to recognize mailto links and sometimes does not accept parameters to such a link type that are not a spelled out email address. After adding the above, it's just stripped away or simply not accepted. If you run into this issue, there unfortunately isn't anything you can do about it.

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

View solution in original post

2 Replies 2
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

how to insert a token to a link as a hyperlink in templates

SOLVE

Hi @soheilhs,

 

Yes, that's possible. The syntax for a spelled personalization token is:

 

{{ object.internal_label_of_property }}

 

For example, for the email address field, this would result in: {{ contact.email }}

(You can find the internal label in the property settings. Open a property, then click the </> next to the name.)

 

If you want to create a mail-to link now, those always start with: mailto:

 

Resulting in a mailto:{{ contact.email }}

 

Adding this to a hyperlink field would be the approach here. HubSpot tries to recognize mailto links and sometimes does not accept parameters to such a link type that are not a spelled out email address. After adding the above, it's just stripped away or simply not accepted. If you run into this issue, there unfortunately isn't anything you can do about it.

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

soheilhs
Member

how to insert a token to a link as a hyperlink in templates

SOLVE

Thank you for the input. It worked 😉

0 Upvotes