Hubspot Pack
Updated over a week ago

Installing the Pack

Before installing the Hubspot pack in your Coda doc you’ll need to make sure that:

  1. the “App Marketplace Access” setting in Hubspot is toggled on: toggling this on enables users to install apps from the HubSpot Marketplace. Coda is considered one of these apps.

  2. The user installing the app has access to all requested scopes of the Pack. If not, the installation will fail and they will be directed to an error page. If the user sees this permissions error page, you’ll need to have a user with a Super Admin role install the Pack.

    1. oauth_2_grant_prompt.png

    2. To see the requested scopes, see the HubSpot Pack’s security tab on its Pack listing page, under Security features > Data categories.

After these settings are enabled, you can install the HubSpot Pack using the same steps for installing packs generally. The quickest way to do this is by typing “/HubSpot” in the canvas, and clicking on the HubSpot Pack by Coda.

Pulling in data from Hubspot

The HubSpot Pack allows you to pull in different kinds of data from HubSpot.

The full list of available tables are:

  • Companies

  • Contacts

  • Deals

  • Products

  • Quotes

  • Tickets

Custom object

You may also want to pull in data about custom object into your Coda doc. To do so, navigate to the Insert panel > Packs > HubSpot. Under Pack tables, click CustomObject. All available custom objects will appear in the dropdown. You can add the custom object table to your doc by dragging and dropping it to the canvas, selecting the fields you want to pull in by filtering in the insert panel, and then pressing the blue sync button.

To pull one of these tables in, simply drag the table you want in from the right side panel, select the fields you want to pull in, and then press the blue sync button.

You can always change what fields you want to pull in later by navigating to the table options, then the sync specific settings and then selecting which fields you want:

You can then add in the newly selected fields by adding them in as a new column:

Sending data from Coda to HubSpot

Note: this section presumes that the maker is familiar with HubSpot’s approach to objects having properties.

Coda’s HubSpot Pack supports two-way sync—meaning that in addition to syncing in data from HubSpot to Coda, you can also send data from Coda to HubSpot.

To do this, you’ll use Coda buttons*. You’ll find a both a ‘create’ and an ‘update’ button for each type of object available in the HubSpot Pack used for editing the data stored in your HubSpot instance. For example, the Pack contains both a ‘Create contact’ and ‘Update contact’ button.

How to configure sending data from Coda to HubSpot

The below example demonstrates how to set up two-way sync in your Coda doc using a button column.

Each object (e.g. company, contact, deals, product, etc.) has a slightly different needs to configure the button. This example below will walk through how to set up the ‘Update company’ button.

You can also follow the written instructions in the section to help configure your doc.

To set up the update company button:

  1. Select the formula relevant to the object you are trying to create or update. For example, if you want to create a new company in HubSpot from your Coda doc, drag and drop the button ‘Create company’ to the canvas.

  2. Before you can send data to HubSpot, Coda needs to know what data to send. To configure the button, you’ll need to enter the fields below.

    1. Account: which HubSpot account to use to perform the update? In most cases, you’ll select User’s private HubSpot account.

    2. Company ID or URL: the URL or ID of the object you wish to update.

      1. This can be found by either:

        1. Pulling in the table of objects—in this case the Companies table—hovering over the chip, and finding the value under the ID field. In the button settings, you can reference the ID by using the formula editor, typing =thisrow.company.Id

        2. Navigating to the object in HubSpot and grabbing the string at the end of the URL

      2. Note, if you are creating a net new object, you do not need to provide an ID or URL for an existing object.

    3. Additional options

      1. Property name and value: In the button settings, you can designate which specific properties of the HubSpot object you wish to update (for both creating or updating an object) by clicking Add more > Additional options > then selecting the property you wish to edit.

      2. You will also need to designate the new value you wish to write to that property. If you’re adding a button as a column in a table, use the formula language to reference a column in a table, so that you can send the latest update to HubSpot.

        image.png

    4. You may also click the cursive “f” in the action section to switch to the formula editor to write the action to create/update the object. There are some syntax points about this that we cover below. You can learn more about adding formulas to buttons here.

      1. Syntax notes when using a formula:

        1. Property names should be lowercase

        2. If the field has a space, use an underscore in its place. For example, “About us” becomes “about_us”

With the button being configured, you can now press the button to send an update on the company back to HubSpot. We recommend testing on a non-sensitive object first before creating/updating live objects.

Tip: If you set up this button as a button column in a table, you can leverage data from the table in writing back to HubSpot (like other columns from the same row using thisrow).

Did this answer your question?