We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Feb 18, 2022 3:20 PM
I am trying to generate marketing emails where emails to each contact have a URL that is specific to that contact.
For example 20 contcats may be associated with one company and that company uses a specific URL or ours.
10 other contacts are associated with a different company and different URL ... for example ... First 20 are from ABCD Comany and the URL is https://ourdomain.net/abcd and the Next 10 are associated with 1234 Company and the URL is https://ourdomain.net/1234
I have a custom field for each contct that lists our URL for them/their company URL.
However when that fied is inserted in a Marketing Email it loses the Hyperlink and becomes plain text?
How do I generate a Marketing Email that provides the URL as a Hyperlink?
Thank you
Solved! Go to Solution.
Feb 22, 2022 12:52 AM - edited Feb 22, 2022 12:54 AM
Hi @ecdyson83,
This can be done via the source code of a rich text module in the email editor of HubSpot. Click into your text module and find this option in the menu bar:
You should then see an HTML editor which can look a bit intimidating but should look less scary once you get a bit used to it.
If you're new to this, I'd recommend capitalizing the text you want to hyperlink before opening this HTML editor. Additionally, add a random hyperlink to it, for example linking to www.google.com.
When you open the HTML editor, this will automatically stand out:
Now the thing you want to do is find the line and the link, line 3 in my case. You can now replace http://www.google.com with the link created from the personalization token and the link text, too.
From:
<p style="margin-bottom: 10px;"><a href="http://www.google.com" rel="noopener">YES, THIS LINK RIGHT HERE, OFFICER</a></p>
To:
<p style="margin-bottom: 10px;"><a href="{{ contact.yourproperty }}" rel="noopener">Link text</a></p>
{{ contact.property }} is the syntax for personalization tokens in HubSpot. The first part refers to the object (ours is a contact property, hence "contact"), the second part, after the dot, refers to the internal name of your property. You can find this internal name by navigating to Settings > Properties > searching your property > clicking on it > clicking the </> icon:
I'm not aware of a faster, easier way to do this, unfortunately.
Once you created this link, always make sure to preview/test your email for at least one contact to see if the link works.
Let me know if you have follow-up questions!
Karsten Köhler |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Feb 22, 2022 4:09 AM - edited Feb 22, 2022 4:23 AM
Happy to help @ecdyson83 . You can send me the name of the property you're trying to use as a link, as well as the link text, and I will send you the code. But seems like you managed 🙂
Regarding your question, you can do it by selecinng the text you want to link to the company URL, and in the URL field enter the personalization token.
Insert a link:
Insert personalization token as URL:
Feb 22, 2022 12:52 AM - edited Feb 22, 2022 12:54 AM
Hi @ecdyson83,
This can be done via the source code of a rich text module in the email editor of HubSpot. Click into your text module and find this option in the menu bar:
You should then see an HTML editor which can look a bit intimidating but should look less scary once you get a bit used to it.
If you're new to this, I'd recommend capitalizing the text you want to hyperlink before opening this HTML editor. Additionally, add a random hyperlink to it, for example linking to www.google.com.
When you open the HTML editor, this will automatically stand out:
Now the thing you want to do is find the line and the link, line 3 in my case. You can now replace http://www.google.com with the link created from the personalization token and the link text, too.
From:
<p style="margin-bottom: 10px;"><a href="http://www.google.com" rel="noopener">YES, THIS LINK RIGHT HERE, OFFICER</a></p>
To:
<p style="margin-bottom: 10px;"><a href="{{ contact.yourproperty }}" rel="noopener">Link text</a></p>
{{ contact.property }} is the syntax for personalization tokens in HubSpot. The first part refers to the object (ours is a contact property, hence "contact"), the second part, after the dot, refers to the internal name of your property. You can find this internal name by navigating to Settings > Properties > searching your property > clicking on it > clicking the </> icon:
I'm not aware of a faster, easier way to do this, unfortunately.
Once you created this link, always make sure to preview/test your email for at least one contact to see if the link works.
Let me know if you have follow-up questions!
Karsten Köhler |
![]() | Did my post help answer your query? Help the community by marking it as a solution. |
Nov 17, 2022 4:49 PM
How can we get this to work with custom Transactional Email properties? ie. using {{ custom.property }} does not work with either of the examples below
Sep 8, 2022 12:12 PM
Hi! This solution is great, I'm trying to to the same with a deal property and it's not working, can u help me with that?
Feb 20, 2022 5:41 AM
Hi @ecdyson83 !
You can insert this property as a hyperlink by adding the following HTML to your email source code:
<a href="{{personalization_token}}">hyperlink text</a>.
You can get the personalization token by inserting the property into your email, and then copying the property token name from the email source code. e.g. the "website URL" property, when viewed in the source code, is "{{ company.website }}". So, if I were using this property as my link, I would insert the following HTML into my email source code: <a href="{{ company.website }}">company website URL</a>.
Essentially, your link will be the value of the property you created (e.g.https://ourdomain.net/abcd).
Feb 21, 2022 5:41 PM
elanashama,
Thank you VERY MUCH for the reply. Unfortunately I still can't figure out how to do this from your notes.
I think I got this to work. Just sent an email to a couple of internal co-workers. I could be back for more help.
Quick question ... I entered it all manually in source code. Is that the only way to do it?
Thanks,
ecdyson83
Feb 22, 2022 4:09 AM - edited Feb 22, 2022 4:23 AM
Happy to help @ecdyson83 . You can send me the name of the property you're trying to use as a link, as well as the link text, and I will send you the code. But seems like you managed 🙂
Regarding your question, you can do it by selecinng the text you want to link to the company URL, and in the URL field enter the personalization token.
Insert a link:
Insert personalization token as URL: