- Create an account at hubspot.com
- Create a private app: Settings->Integrations->Private Apps
- Create a private app
- Set the scopes to:
- crm.objects.contacts.write
- crm.schemas.contacts.write
- crm.objects.contacts.sensitive.read
- crm.objects.contacts.sensitive.write
- crm.schemas.contacts.read
- crm.objects.contacts.read
- Add custom fields to Contacts: Settings->Properties
- Select Contact properties
Create Property- Property label:
Auth0 ID - Internal name:
auth0_id - Group:
Contact Information - Field Type:
Single-line text
- Property label:
Create Property- Property label:
Auth0 Last Event Timestamp - Internal name:
auth0_last_event_timestamp - Group:
Contact Information - Field Type:
Single-line text
- Property label:
Create Property- Property label:
Auth0 Locale - Internal name:
auth0_locale - Group:
Contact Information - Field Type:
Single-line text
- Property label:
- Create your own repo with the contents of this directory
- Create a new project from Vercel, choose the repo you just created
- Build and Output Settings
- Output Directory (override):
dist
- Output Directory (override):
- Environment Variables
- IGNORE_DATE: Set this to the time at which you want to start processing events
- HUBSPOT_TOKEN: Copy the accessToken from the Private App you created in hubspot
- API_TOKEN: A random string that you will need for the initialization sync script, it must be the same in the environment and the settings for the event stream
- Build and Output Settings
You can exercise this webhook by manually creating events in the tenant, or you can use this initialization scriptto simulate how you would initialize this system.
If you are struggling to get this working, you can run locally and use postman to send a couple of test events to make sure your integration with hubspot is working.
npm i- Copy the
env.sampleto.env- IGNORE_DATE: Set this to the time at which you want to start processing events
- HUBSPOT_TOKEN: Copy the accessToken from the Private App you created in hubspot
- API_TOKEN: A random string that you will need for the initialization sync script, it must be the same in both places
npm run dev
[] Add organizations events to create companies and associate contacts with those companies