Notes:
The CRM integration feature / Personalization module are available on our Professional and Unlimited plans. Please contact support if you want to upgrade your plan.
The following solution requires automation permission in HubSpot, which is available in HubSpot’s Marketing Hub Professional or Enterprise plan.
Personalized content can only be created for Contacts in HubSpot, not Companies or any other object type.
You can use the data within your HubSpot CRM to automatically create personalized Turtl Docs when contacts take a certain action - we call this using HubSpot as a data source. Once a personalized Doc has been created in Turtl, we can pass the Doc information back to HubSpot so it can be used in various processes or campaigns. This article will walk you through how to achieve this.
Within this example, we’ll follow the scenario where a visitor submits a form on your website. When that action happens, we want to automatically create a personalized Doc with the visitor’s name on the front cover and email it out to them via a HubSpot email. Your use case might be slightly different, but this should give you an idea of what’s possible and how to achieve it.
1. Account prerequisites
This process requires you to have a working integration between HubSpot and Turtl. When logged into your account, go to "Manage Integrations" to see if you have a working HubSpot integration setup. If you don’t already have this enabled or you’re not sure if it’s enabled correctly, please contact support@turtl.co to get this set up.
2. Prepare your master Doc for personalization
Before you can create personalized content, you need to have a completed Turtl Doc which is set up for personalization and includes a personalization form. We call this a master Doc. If you’re new to this process, see our guide on how to set up a Doc for personalization.
In this example, we have a simple personalization form that has three form fields for the contacts:
First name
Last name
Company name
These form fields will be mapped to three HubSpot properties so the data can be automatically pulled in to personalize the Doc.
Navigate to the personalization form of the Doc you’d like to set up for automatic personalization.
On your first form field, configure the "Prefill Value" so that it is mapped to the HubSpot property you’d like to use data from to personalize your Doc. To do this:
Select the lightning icon next to the Prefill Value field.
Select HubSpot as the data source.
Choose the HubSpot property to map to your form field.
Test that this has worked by adding in a contact ID from HubSpot.
Select OK to save changes.
Mapping a Turtl form field with a HubSpot property
Repeat this process for your remaining form fields. Once all form fields are mapped to an appropriate HubSpot property, publish your Doc.
Within the Share options of your Doc, select the API tab and note the Automation URL (you’ll need this later on when creating your HubSpot workflow).
Notes:
Each Turtl Doc you create has a unique automation URL.
You can access this URL again at any time by going to the Share options.
3. Prepare HubSpot for data import
Once a personalized Doc has been created in Turtl, the API passes several bits of information back to HubSpot including:
Property | Purpose |
Master Doc information |
|
Document ID | The ID of the master Doc |
Document Title | The Title of the master Doc e.g. Turtl Overview for %FirstName% |
Personalized Doc information |
|
Document URL | The unique URL of the personalized Doc |
Personalization ID | The unique ID of the personalized Doc |
Personalized Title | The title of the personalized Doc e.g. “Turtl Overview for John” |
Personalized Cover Image URL | A link to the cover page image in a .jpg format |
Personalized Cover Teaser URL | A link to the cover page image in an animated .gif format |
Personalized Facebook Image URL | A link to the cover page image in a .jpg format with optimized dimensions for a Facebook post |
Personalized X-post Image URL | A link to the cover page image in a .jpg format with optimized dimensions for an X post |
Personalization Tag | You have the option to add a "tag" to your automation webhook URL to help you track and report on groups of personalized Docs within HubSpot e.g. you could group those which are part of the same campaign.
For example, in the automation URL "https://company.turtl.co/webhook/63207XXX11a872d42a53/summercampaign", "/summercampaign" is the personalization Tag. You can manually add this tag when setting up your HubSpot workflow later on. |
In order to use the data for campaigns (such as emailing a contact a personalized Doc), this information needs to be copied onto the HubSpot contact record using a workflow. To prepare for this, we need to create new contact properties in HubSpot.
To achieve our example use case, we’re going to use the Document URL and the personalized cover teaser URL (which links to the GIF of the cover page), so we’ll need two new contact properties in HubSpot to hold this information.
Create new contact properties in HubSpot:
A single-line text field to hold the personalization URL.
For this example, we’ll name the field "Turtl Overview personalization URL".
A single-line text field to hold the Teaser image (GIF) URL.
For this example, we’ll name the field "Turtl Overview Teaser GIF URL.
Note: You will need to create new fields for each personalized email campaign you run from HubSpot in the future. We’ll cover this more later on when we set up our HubSpot workflow.
4. Your contact properties are now ready for use in your email template and workflows.
4. Prepare HubSpot email template
In our example scenario, we’d like to send a contact an email containing a personalized Turtl Doc once they’ve submitted a form on our website. To achieve this, we’ll need to create an email template in HubSpot that can be used as part of the workflow.
For this example, we’ll have two points of personalization within the email template:
A hyperlink in the body of the email text that links off to the personalized Doc
An image of the personalized GIF cover page which will be hyperlinked to the personalized Doc.
Start by creating an "Automated" email within HubSpot. This will enable you to use the email in a workflow later on in this process.
Add a personalized Doc URL
1. Start designing your email and identify where you’d like to hyperlink to your personalized Doc. In our example template, we’ll link the text "personalized overview Doc" to the personalized Doc URL.
2. Copy the token below into the URL to link to each contact’s personalized Doc.
{{ contact.turtl_overview_personalization_url }}
The "turtl_overview_personalization_url" text should be replaced with the internal name of the field you created for the personalization URL. You can get the internal name from the property settings in HubSpot.
How to get the internal name of a field
3. If you also want to track Known Readers within Turtl’s analytics dashboard, add the following to your personalization URL:
&lead[store]=hubspot&lead[id]={{ contact.hs_object_id }}
We refer to this method of tracking as a lead capture URL.
The final URL would then look like this:
{{ contact.turtl_overview_personalization_url }}&lead[store]=hubspot&lead[id]={{ contact.hs_object_id }}
Adding a personalized cover GIF
Within HubSpot’s email builder, select the "HTML - Email" module and place it within your email. We’ll use the HTML module to pull in the personalized Doc’s cover page in a GIF format and hyperlink the GIF to the personalized Doc URL.
Add the following HTML to the "Edit HTML" section of the module.
The "turtl_overview_personalization_URL" and "turtl_overview_teaser_gif_url" text should be replaced with the internal name of the fields you created for the personalization URL and Teaser GIF. You can get the internal name from the property settings in HubSpot (as covered in this step).
<a href="{{ contact.turtl_overview_personalization_url }}&lead[store]=hubspot&lead[id]={{ contact.hs_object_id }}"><img src="{{ contact.turtl_overview_teaser_gif_url }}" style="width: 100%; height: auto;"/>
</a>
The href attribute of the anchor (<a>) tag will link the Teaser GIF to the URL of each personalized Doc. If you don’t want to track known readers in Turtl’s analytics dashboard when a reader clicks on the GIF image, remove the lead capture segment of the snippet.
&lead[store]=hubspot&lead[id]={{ contact.hs_object_id }}
The src attribute of the image (<img>) tag will pull in the Cover PNG or GIF depending on which field you reference. In this case, we’ve referenced the Teaser GIF.
The style attribute ensures that the GIF sits neatly within the email boundary.
3. Once your HTML is added, you can return to your email design.
4. Finalize your email design as you normally would. Make sure to save and publish the email template for automation, otherwise it will not be available in the workflow.
5. Create a HubSpot workflow to automate
Now you’ve set up new contact properties and prepared your email, it’s time to bring it all together using a HubSpot workflow. In our example, the workflow will:
Enroll any contacts who submit a specific form on our website.
Send a trigger to Turtl to create a personalized Doc (created in step 2).
Copy the Doc info over to the new fields on the contact record (created in step 3).
Send the personalized Doc to the contact using the new email template (created in step.
Create a workflow: In HubSpot, navigate to Workflows and create a new Contact Workflow
Set enrollment triggers: Set up your enrollment triggers for the workflow. In this example, we want to create a personalized Doc in Turtl when a contact fills in a form.
Add a "Personalize Turtl Doc" action: This action will send a trigger to Turtl to create a personalized Doc.
Select from the "Connected apps" section and choose the "Personalized Turtl doc for contact v1.2" action under the Turtl app. (Make sure to select the v1.2 version from the list).
Add the Automation URL from your Turtl Doc (as covered in this step) and save. Adding the automation URL lets HubSpot know which Turtl Doc to personalize as part of the workflow.
8. Add a "Copy property value" action: Once the personalized Doc has been created in Turtl, this action will copy the personalization URL and the teaser image (GIF) URL over to the contact record so they can be referenced within our email campaign (as covered in this step).
Within the "Copy property value" settings, select the output field and choose which contact property you want to copy the information over to. In our example, we will:
Copy the "Document URL" output to the "Turtl Overview Personalization URL" contact property.
Copy the "Personalized Cover Teaser URL" output to the "Turtl Overview Teaser GIF URL" contact property.
You will need two "copy property value" actions to configure the two steps above.
Copy the Document URL output over to the Contact record
9 Add a "Send email" action: This will queue up an email to the contact with the personalized Doc.
10. Add the "Send email" step and select the template that we created in this step.
6. Test and launch
Once you’ve completed the steps above, you’re ready to test and launch your workflow. To test everything is working correctly, we recommend that you:
Manually enroll a test contact into the HubSpot workflow and review the output. Ensure that:
A personalized Doc has been created in Turtl and the data from HubSpot has pulled through correctly (e.g. the contact’s name).
The test contact’s record in HubSpot has been populated with Doc info (in this case URL and Teaser GIF URL).
An email has been sent which includes the correct personalized GIF and URL to the Turtl Doc.
Once you feel comfortable that everything is working as expected, you can go ahead and turn your workflow on.