HubSpot | Orwel Docs
Docs

HubSpot

Send every converted lead to HubSpot as a contact.

When a visitor converts on your site, Orwel creates or updates a contact in your HubSpot account, so sales can follow up from the CRM they already use.

Connect

HubSpot retired API keys, so Orwel uses a Private App token.

  1. Create a Private App in HubSpot

    In HubSpot open Settings, Integrations, Private Apps and create an app (for example "Orwel").

  2. Grant the contact scopes

    In Scopes, enable crm.objects.contacts.write and crm.objects.contacts.read.

  3. Copy the token

    Create the app and copy its access token (it starts with pat-).

  4. Paste it in Orwel

    In the Orwel dashboard go to Integrations, open HubSpot, click Configure, paste the token in Private App token and save.

What is sent

Each new conversion creates a contact with these fields, taken from the conversion properties or the visitor's identify traits:

HubSpot property Orwel field
email email (required)
firstname firstName, or name
lastname lastName
phone phone
company company

If a contact with that email already exists, Orwel updates it instead of failing, so a returning lead does not create a duplicate.

When it runs

  • Once per conversion. The same conversion retried by the SDK has the same conversionId and is not sent twice.
  • Only for conversions that carry an email. A conversion without one is stored in Orwel but skipped for HubSpot.
  • Never for conversions sent with the development key. Test leads stay in Orwel.
ts
await orwel.conversion('demo_request', {
  email: 'ada@acme.com',
  name: 'Ada Lovelace',
  phone: '+52 55 1234 5678',
  company: 'Acme'
})

Troubleshooting

Problem What to do
No contacts arrive Check that the conversions include email and were sent with the production API key, not the development key.
HubSpot rejects the token The token is wrong or the Private App lacks the contact scopes. Create a new token with crm.objects.contacts.write and crm.objects.contacts.read, and paste it again.
Name lands in the wrong field Send firstName and lastName separately. With only name, the full name goes to firstname.