@@ -4,30 +4,55 @@ title: HubSpot integration with Ory Actions
44sidebar_label : HubSpot
55---
66
7- [ HubSpot] ( https://www.hubspot.com ) is an inbound marketing, sales, and customer service platform. It provides a suite of tools and
8- services that allow businesses to manage and optimize their online presence, including website content, email marketing, social
9- media, lead generation, and analytics.
7+ [ HubSpot] ( https://www.hubspot.com/ ) is a CRM platform that can be used to manage data from marketing, sales, content management,
8+ and customer service. The HubSpot API in combination with Ory Actions makes it possible to integrate any of the Ory self-service
9+ flows with HubSpot. A common use case is to integrate via the
10+ [ HubSpot Contacts API] ( https://developers.hubspot.com/docs/api/crm/contacts ) with the Ory registration flow, so that new contacts
11+ are automatically created in the HubSpot contacts list whenever a new user signs up to our service.
1012
11- Ory can synchronize user data with HubSpot via the [ HubSpot Contacts API] ( https://developers.hubspot.com/docs/api/crm/contacts ) .
13+ The advantage of integrating Ory with HubSpot is that users signing up automatically become available to the CRM platform,
14+ facilitating lead generation and marketing campaigns (provided that users give the appropriate consents).
1215
13- To integrate HubSpot with your Ory Network project:
16+ ## How Ory integrates with HubSpot
1417
15- 1 . Create a HubSpot account and set up the necessary
16- [ contact lists] ( https://knowledge.hubspot.com/lists/create-active-or-static-lists ) for your customer data.
17- 2 . Create a [ private app access token] ( https://developers.hubspot.com/docs/api/private-apps ) in HubSpot.
18- 3 . In your Ory Network project, set up an Ory Action trigger that sends data to HubSpot destination when a specific event, such as
19- successful registration, occurs.
18+ The following diagram illustrates how Ory integrates with HubSpot. In this example, we consider the case where the registration
19+ flow in Ory triggers an API call to HubSpot, automatically creating a new contact in HubSpot. In other words, a new record is
20+ created simultaneously in the Ory Identities database and in the HubSpot contacts list.
21+
22+ ![ Registration flow with HubSpot integration] ( ./_static/hubspot-reg-flow.png )
23+
24+ In this example, the API call to HubSpot is triggered as follows:
25+
26+ 1 . The end user signs up to a new account using Ory Identities, completing the registration self-service flow.
27+ 2 . Upon completion, the registration flow triggers any actions registered under the ` flows.registration.after.hooks ` section of
28+ Ory Identities configuration.
29+ 3 . The hook for the HubSpot CRM platform, registered under ` flows.registration.after.hooks ` , is now triggered, and Ory evaluates
30+ the Jsonnet template to construct the body of the API call.
31+ 4 . The Ory action invokes the ` /com/v3/objects/contacts ` HubSpot API endpoint to create a new contact in HubSpot.
32+
33+ ## Create a HubSpot webhook
34+
35+ ![ Configuring HubSpot integration] ( ./_static/hubspot-config.png )
36+
37+ To set up the integration follow these steps
38+
39+ 1 . Set up the necessary [ contact lists] ( https://knowledge.hubspot.com/lists/create-active-or-static-lists ) for your customer data.
40+ Creates a new private app for this integration in the Hubspot settings. For details of how to create a private app in HubSpot,
41+ see the [ Private apps] ( https://developers.hubspot.com/docs/api/private-apps ) page in the HubSpot documentation.
42+ 2 . Copies the access token from the new private app.
43+ 3 . Using the access key from the previous step, create and register an Ory Action for triggering a HubSpot API call whenever a
44+ user completes the registration flow.
20454 . Test the integration to ensure that data is routed correctly from your application to HubSpot.
2146
22- ## Configuration
47+ ### Configuration
2348
2449Follow these steps to configure an integration that adds every newly registered user to your HubSpot contacts:
2550
26- :::info
51+ ``` mdx-code-block
52+ import JsonnetInfo from './_common/jsonnetinfo.mdx'
2753
28- Not sure what Jsonnet is? Read the [ Ory Actions webhook guide] ( ../../guides/integrate-with-ory-cloud-through-webhooks.mdx ) .
29-
30- :::
54+ <JsonnetInfo />
55+ ```
3156
32571 . Create a Jsonnet file. It transforms the identity data from Ory to a format HubSpot understands.
3358
@@ -91,7 +116,7 @@ Not sure what Jsonnet is? Read the [Ory Actions webhook guide](../../guides/inte
91116
92117:::tip
93118
94- Read [ this document] ( ../../kratos/hooks/01_configure-hooks.mdx#triggers-based-on-authentication-methods ) to learn more about
95- choosing the authentication/registration method that triggers the action.
119+ Read [ this document] ( ../../kratos/hooks/01_configure-hooks.mdx ) to learn more about choosing the authentication/registration
120+ method that triggers the action.
96121
97122:::
0 commit comments