The Userflow-HubSpot integration syncs HubSpot contact/company properties to Userflow users/groups in real-time. This allows you to personalize onboarding content in Userflow based on data from HubSpot.
Userflow-generated events, such as Flow Started and Checklist Task Completed, are continuously streamed into HubSpot as Timeline Events, which you can see on contacts’ profile pages and use in automated workflows. This way you can e.g. send emails from HubSpot based on how your users interact with Userflow content.
How it works
HubSpot contact properties are synced to Userflow users. HubSpot company properties can either be synced to Userflow groups, or to all the Userflow users who are contacts of the company.
The mapping between HubSpot contacts/companies and Userflow users/groups can either work via email address or via an ID property (a HubSpot property that matches the same ID you use in Userflow.js - typically these IDs come from your own backend’s database).
Contacts/companies are immediately synced in 3 cases:
- When they are created in HubSpot.
- When their properties are updated in HubSpot.
- When they are seen by Userflow for the first time.
The sync happens in real-time! This means that any user seen by Userflow, will always have up-to-date properties synced from HubSpot (usually with a delay of less than 1 second). There’s no periodic job that you have to wait for.
Contacts/companies are only synced to Userflow if they have been seen by Userflow before. This means if you e.g. have a large number of newsletter-only contacts in HubSpot, then we won’t sync these into Userflow.
HubSpot properties can be seen on user profiles in Userflow and are marked with the HubSpot sprocket icon:
You can use them in auto-start conditions to target users based on properties from HubSpot:
When certain events are tracked by Userflow, such as when a flow is started or a checklist task is completed, they’ll be posted on the contact’s Activity tab in HubSpot. First enable Userflow activity via the Filter activity button:
Then they’ll appear like this:
You can also use these events in workflows, for example to send an email when a user completes a checklist task:
You can even filter on event attributes, such as the name of the checklist task that was completed:
Quick note about HubSpot accounts and Userflow environments
A Userflow-HubSpot integration is between a single Userflow environment and a single HubSpot account. You have to run the below setup guide for each environment.
We recommend only integrating your Main/Production HubSpot account with your Production Userflow environment.
If you have a Staging Userflow environment, where you want to test the HubSpot integration, then make sure to create a different HubSpot account. Otherwise the Userflow Staging environment may post timeline events in your main HubSpot account.
- Sign into Userflow and navigate to the environment you want to integrate with HubSpot:
- Go to Settings -> Integrations. Then click Add integration:
- Find and click HubSpot in the list:
- Click Add HubSpot (activate/upgrade your plan if you don’t yet have access):
- Click Connect with HubSpot. In the popup window that opens, pick the HubSpot account you want to sync with the current Userflow environment.
- Next, we have to tell Userflow how to map HubSpot contacts/companies to Userflow users/groups. This is how we know which user/group in Userflow is the same contact/company in HubSpot.
We support 2 ways of mapping contacts to users:
Via a HubSpot ID property, which must match the user ID your Userflow.js installation passes to
userflow.identify(userId). This requires your own integration between your own backend and HubSpot to store this user ID as a contact property in HubSpot.
- Via email address, where a HubSpot contact’s email address must match a Userflow user’s email address.
- Via a HubSpot ID property, which must match the user ID your Userflow.js installation passes to
For HubSpot company properties, you can choose between:
Syncing them to Userflow groups, which requires your Userflow.js installation to call
userflow.group(groupId), and the selected HubSpot Company ID property must match this same
- Syncing them to Userflow users, in which case we’ll consider all contacts of the company and map them the same way as above (either via contact ID property or via email address). All users belonging to the company will get the HubSpot company properties applied in Userflow.
- Syncing them to Userflow groups, which requires your Userflow.js installation to call
- Next, tell Userflow which contact and company properties you want to sync from HubSpot to Userflow:
- Flip the sync switch to ON for all properties you want to sync. By default, Userflow will use the same naming as HubSpot, but you can choose to edit the attribute name in Userflow.
- If you want Userflow to post timeline events to HubSpot contacts’ Activity tab, when e.g. flows are started or checklist tasks are completed, then switch Stream events from Userflow to HubSpot to ON.
- Userflow will now sync from HubSpot every time a contact/company is created/changed in HubSpot, or when Userflow sees a user/group for the first time. But! Existing users have not yet been synced. Click Run full sync to start an initial full sync of all contacts/companies.
- The UI shows you a running progress, and a green checkmark when it’s done. If you change your property mappings later, we recommend running a full sync again to make sure all existing users are in sync. We also run this full sync periodically (currently every ~24 hours), just to make sure we didn’t miss any updates from HubSpot.
Stopping the integration
- Find your HubSpot integration in Userflow under Settings -> Integrations.
- Click the three-dot button in the top right.
- Click Disconnect.
- Event streaming and property sync will stop immediately.