Hubspot Newsletter Integration
Synchronize HubSpot Communication Subscriptions with Unidy.
Requirement: Hubspot App and Hubspot Plugin must be setup by your CSM at Unidy
To integrate your newsletter subscription into Unidy, follow these steps:
1. Create Newsletter, Preferences, and Preference Groups
- Set up your newsletter within Unidy.
- Define Newsletter Preferences to manage subscription options.
- Organize these preferences into Preference Groups for better structuring.
For detailed instructions, refer to Newsletter documentation.
2. Create Communication Subscription
Create communication subscriptions in Hubspot (if not already existent). Each communication subscription in Hubspot is equivalent to a newsletter in Unidy.
- Go to Settings β Tools β Marketing β E-Mail
- Click on the Subscription Types tab

- Click on Create subscription type button
- Fill in all the fields and click Create

- Communication subscription was successfully created.
3. Connect Subscription and HS Communication Subscription
In this step, you need to connect each Unidy newsletter with its corresponding HubSpot communication subscription. This connection ensures seamless synchronization between both systems, allowing user preferences to be accurately reflected across platforms.
- Go to Admin β Superadmin β Plugins and choose Hubspot plugin
- Click on Newsletter Sync Configs button
- Click New button in the top right corner.

- Choose Unidy newsletter and Hubspot communication subscription you would like to link and click Create Newsletter sync config
In the next step, you will see all internal field names for the newsletter sync in HubSpot. Ensure they do not contain any β-β as this prevents their creation in HubSpot.

- Newsletter sync config was created and newsletter are now linked.
4. Use Preference Tokens
For every Newsletter subscription, Unidy generates a preference token, which can be used to manage the newsletter preferences without being logged in or even having a user account in unidy. This token is synchronized to Hubspot as a contact property which can be configured in the Unidy admin: Superadmin β Plugins β Hubspot β Newsletter Sync Configs. In the example below, the configured field is called unidy__newsletter_preference_token. This token can be used when accessing the logged-out newsletter page in unidy. For example: https://BRAND.unidy.de/newsletter?token=a2zoRbqcKzHukwuLPjrxpmo2

4.1. Adding a preference link to marketing emails
In order to add an redirect to a newsletter preference page, you have to add a link to the email template.
- Click the content element you want to add the link to, then select More β Source code

- Add a link as follows:
<a href="https://BRAND.unidy.de/newsletter?token={{ personalization_token('contact.unidy__newsletter_preference_token', '') }}">Manage Your preferences</a>
https://BRAND.unidy.de/newsletter?token=
and contact.unidy__newsletter_preference_token
. You can chose the link text freely, as long as the url to the unidy instance and the name of the token are correct. 
- Click Save changes.
5. Workflow setup
This chapter guides you in setting up workflows for seamless HubSpot-Unidy newsletter integration, ensuring accurate data sync and efficient campaign management.
Newsletter subscription creation in Unidy
This HubSpot workflow is designed to manage the synchronization of newsletter subscriptions.
Trigger:
The workflow enrolls contacts if:
- The contacts are members of the specific list.
Action
- Once enrolled, the workflow sends a POST request to a webhook URL to create a newsletter subscription in Unidy. The workflow supports re-enrollment, ensuring updates are consistently applied for any changes in list membership.
This workflow can also be used for newsletter subscription migration to Unidy. Please contact your CSM Team before migrating.

Sending the DOI email
This workflow handles Double Opt-In (DOI) email delivery, ensuring accurate subscription records and compliance with valid user consent.
Trigger:
The workflow enrolls contacts if:
- The Newsletter preference token is known.
- The Newsletter opt in at field is unknown, meaning the subscription hasn't been previously confirmed.
- The contact has opted into Hubspot newsletter subscription.
OR
- Unidy newsletter doi resend requested atΒ is known, meaning the contact requested another DOI email in Unidy interfaceΒ
- The Newsletter opt in at field is unknown, meaning the subscription hasn't been previously confirmed.
Actions:
- The contact is set as a marketing contact to enable communication.
- A DOI confirmation email is sent to validate the contact's consent for receiving further communications.

Setting the opt-in
This workflow manages subscriptions for contacts who engage with a specific Double Opt-In (DOI) email, ensuring accurate records and resolving opt-out conflicts.
Trigger:
The workflow enrolls contacts if:
- They have clicked a link in the DOI email.
- The Newsletter opt in at in at field is unknown, indicating that the DOI date has not yet been recorded.
Actions:
- Clears the Newsletter opt out at field to reset any previous opt-out status.
- Sets the Newsletter opt in at field to the date the action is executed, confirming the opt-in timestamp.
