Before you start
This feature is available on the AI Pack and above. You can subscribe to the AI Pack in your account's billing page if you’re not already subscribed.
It also helps to know what field aliases are. A field alias is your own name for a field, so the data you send to Anvil matches the way your system already names things. Normally you set aliases one field at a time in the template editor. HubSpot sets them all at once, using the property names from a HubSpot object.
An admin needs to set up your organization’s connection to HubSpot. Once the connection exists, everyone one else in the organization with Editor role or above can use the same connection when creating templates later on.
What Anvil pulls from HubSpot
You choose one HubSpot object type per template. HubSpot offers four standard objects, plus any custom objects you've defined. Anvil pulls whichever ones exist in your connected account:
- Contacts
- Companies
- Deals
- Tickets
Anvil reads that object's properties and turns each one into a field alias:
- The property's internal name, for example
firstNameoremail- The field alias on your template
- The property's HubSpot description
- The hint the AI uses to recognize the field on the document
Additional notes
Properties HubSpot marks as hidden or archived are skipped. Everything else comes through, including HubSpot-managed hs_ properties such as hs_lead_status, since many of those are genuinely user facing. Properties that mean nothing on a PDF simply won't match anything.
Property types don't come across. HubSpot's field types don't line up with Anvil's, so Document AI infers the type from the document instead. You can adjust any field's type in the template editor afterwards.
Descriptions matter, and HubSpot often leaves them blank. Anvil always includes the property's group name alongside its description, but a group name alone gives the AI much less to work with than a real description. If matching comes out thin, filling in descriptions on your HubSpot properties is usually the highest-leverage fix.
One object type per template. Selecting Contacts pulls contact properties only. Support for combining multiple objects will come later.
Connect HubSpot and choose an object type
- Navigate to your Document templates dashboard
-
+ Create templateand choose Standardized Template - Upload a file
- Leave Document AI selected
- This is what finds and labels your fields. The schema step is only available when Document AI is enabled.
- Click Connect a data source
- From the dropdown menu, choose HubSpot.
- Click Connect to HubSpot
- A HubSpot window opens. Follow on screen steps to select and authorize your account.
- Select an object type
- Upload to create the template
If your organization has connected HubSpot before, you'll skip steps 5-7 and go straight to picking an object type.
Check the results
Open the new template in the editor and look at the fields. Fields the AI matched to a HubSpot property will carry that property's name as their field alias. Fields it couldn't match keep AI-generated names.
It's normal for the match to be partial. A HubSpot object usually has far more properties than any one document has fields, and the AI only applies an alias where it's confident. Some fields on the document won't be mapped, and most properties won't be used. Anything left over you can set by hand in the editor, exactly as you would normally.
If a lot of fields went unmatched, the fix is usually on the HubSpot side. In HubSpot, go to your property settings and give the properties you care about a clear description of what the field is, then create the template again.
Reconnect HubSpot
A connection can stop working if it's revoked in HubSpot, the access token expires, or the permissions granted to Anvil change. When that happens you'll see the message This integration connection needs to be re-established along with a Reconnect to HubSpot button in place of the object type dropdown.
Click Reconnect to HubSpot, authorize again in the window that opens, and the object type list comes back.
Back to Help Center