githubEdit

Adding HubSpot Properties to Your Template

Hubspot records contain data as properties and these properties are used to retrieve and display your data. Each property is a key-value pair. The key is an identifier shared by all records that contain that property. The value is the value unique to that specific record. So, all records of a particular object type will have the same keys (e.g. contacts will having "lastname", "firstname", "email", etc.), but their values will be unique (e.g. "John", "Rachel", "Andrew", etc.). In order to get your Hubspot data to merge with your Documint templates you will need to find the property names (keys) and paste them into your template. The Documint Hubspot extension contains an easy table where you can see and copy all your record's properties.

The Documint app can access property data for these objects:

  • Contacts

  • Companies

  • Deals

  • Tickets

  • Custom Objects

Viewing Properties

To search and view the available properties, just click the View Properties button near the bottom of the dashboard.

You can filter and view all properties for your object as well as the properties for associated objects.

The properties table also show the properties' types and group identifiers as well as if they are custom or Hubspot defined

Primary properties

Primary properties are properties that belong to the object type that is currently selected.

circle-info

See Working with Custom Object Data on how to change the selected object.

Copy a proprety by highlighting it and pressing "Ctrl+C". Then paste it into your template.

Copy a token.
Paste it!
  1. Open the schema

  2. Add a field

  3. Paste the property

  4. Delete the curly braces

  5. Save it

  6. Drag the token to the template

Learn more (fields editor)

Association properties

Association properties are the properties of associated objects. For example, your selected object is contacts and its associations are contacts (other contacts), companies, deals, and tickets.

Because associations are lists/arrays of data for related records (see array data type), you can either display the values for associations by looping over each record, or you can just display data for a singe record from the list (This is useful when an associations list only contains a single associated record).

circle-info

The Documint app does not currently provide association data for custom objects.

Displaying values for Associations' Lists

To display values from an associated list, let's start with the schema.

  1. Create a collection field

  1. Its name will be the name associated list in snake casearrow-up-right format

List
Field Name

Line Items

line_items

Companies

companies

Contacts

contacts

Deals

deals

Tickets

tickets

In this example, we will use Line Items

  1. Go to the properties in HubSpot and access that list. In Use Type, select 'All items'. Copy the property associated with that list

  1. In the schema, click on 'Add Collection Field', paste the property, and delete the curly braces

  1. Don't forget to check its field type. In this case, it's a number

  1. Save the chema

circle-exclamation
circle-info

Adding only the fields you are going to use on the template will be best to manage

Single Value

If you'd like to display values from a single record, here is how it's done:

  1. Place the token on your template and double-click it

  1. On Edit Token, in the 'return type' section, you'll be able to select the position of the item in that list you want to display. By default, it will display the first one

  1. But if you want to display an item in another position, just select custom from the dropdown options and inform its index

Essentially, to display only the first item, you'll just need to drag the template from that list into the template builder.

All values

You can also display all items in the associated list. For that, you'll need to set up a loop.

First, drag the tokens into the template

In your Documint template, select the parent element that will be repeated for each item in the list, then click "Edit logic"

Select the associated list name from the List Field dropdown.

You're all set to generate your document!

Last updated

Was this helpful?