HubSpot

HubSpot Functions & Syntax

Overview

HubSpot is a popular web-based customer relationship management (CRM) tool for managing all your company’s relationships and interactions with customers and leads. With this spreadsheet integration for Google Sheets and Microsoft Excel, you can import and query current data from your HubSpot account, like contacts, companies, leads, deals and activities.

What you can do

With this integration, you can:

  • Interactively search and filter your HubSpot data
  • Query and analyze your sales pipeline
  • Lookup and track current deals and activity
  • Lookup information for a list of contacts
  • Enrich your spreadsheet with your HubSpot data

What you need

You need to have a HubSpot account to use this integration. Also, if you haven't already installed the Flex.io add-on for Excel or Google Sheets, you need to set this up as well.

Functions and Syntax

This integration for Microsoft Excel or Google Sheets includes the following functions:

HubSpot Activity

Returns a list of activity from HubSpot.

Syntax

=FLEX("YOUR_TEAM_NAME/hubspot-activity", [properties], [filter])

Sample Usage

=FLEX("YOUR_TEAM_NAME/hubspot-activity")
=FLEX("YOUR_TEAM_NAME/hubspot-activity", "*")

Parameters

Property Type Description Required
properties array The properties to return (defaults to all properties). See "Returns" for a listing of the available properties. false
filter string Filter to apply with key/values specified as a URL query string where the keys correspond to the properties to filter. false

Returns

Property Type Description
portal_id integer The portal id for the engagement
owner_id integer The id of the owner of the engagement
owner_first_name string The first name of the owner of the engagement
owner_last_name string The last name of the owner of the engagement
engagement_id integer The id for the engagement
deal_id integer The deal id for the engagement
company_ids string A delimited list of company ids associated with the engagement
type string The type of the engagement
activity_type string The activity type associated with the engagement
activity_date string The date of the engagement
status string The status of a particular activity for the engagement
title string The title of a particular activity for the engagement
subject string The subject of a particular activity for the engagement
active string The status of the engagement; true if the engagement is active and false otherwise
created_by integer The id of the creator of the engagement
created_at string The creation date of the engagement
updated_at string The date the engagement was last updated

HubSpot Contacts

Returns a list of contacts from HubSpot.

Syntax

=FLEX("YOUR_TEAM_NAME/hubspot-contacts", [properties], [filter])

Sample Usage

=FLEX("YOUR_TEAM_NAME/hubspot-contacts")
=FLEX("YOUR_TEAM_NAME/hubspot-contacts", "*")
=FLEX("YOUR_TEAM_NAME/hubspot-contacts", "first_name, last_name, phone, email")

Parameters

Property Type Description Required
properties array The properties to return (defaults to all properties). See "Returns" for a listing of the available properties. false
filter string Filter to apply with key/values specified as a URL query string where the keys correspond to the properties to filter. false

Returns

Property Type Description
portal_id integer The portal id for the contact
vid integer The id for the contact
first_name string The first name of the contact
last_name string The last name of the contact
email string The email address of the contact
phone string The phone number of the contact
phone_mobile string The mobile phone number of the contact
job_title string The job title of the contact
address string The address of the contact
city string The city in which the contact is located
state string The state in which the contact is located
zip string The zip code in which the contact is located
country string The country in which the contact is located
linkedin_bio string The biography of the contact on LinkedIn
created_at string The date the record for this contact was created
updated_at string The last date the record for this contact was modified

HubSpot Deals

Returns a list of deals from HubSpot

Syntax

=FLEX("YOUR_TEAM_NAME/hubspot-deals", [properties], [filter])

Sample Usage

=FLEX("YOUR_TEAM_NAME/hubspot-deals")

Parameters

Property Type Description Required
properties array The properties to return (defaults to all properties). See "Returns" for a listing of the available properties. false
filter string Filter to apply with key/values specified as a URL query string where the keys correspond to the properties to filter. false

Returns

Property Type Description
portal_id integer The portal id for the deal
owner_id integer The id of the owner of the deal
owner_first_name string The first name of the owner of the deal
owner_last_name string The last name of the owner of the deal
deal_id integer The deal id for the deal
deal_name string The deal name
deal_stage_id string The deal stage id
deal_stage_label string The deal stage label
deal_type string The deal type
amount integer The deal mount
amount_in_home_currency integer The deal amount in home currency
closed_lost_reason string The closed lost reason
closed_won_reason string The closed won reason
forecast_close_date string The forecasted close date; this is a placeholder for an example of a custom field
close_date string The close date
description string The deal description
pipeline string The pipeline
num_notes integer The number of notes
num_associated_contacts integer The number of associated contacts
num_contacted_notes integer The number of contact-related notes
notes_last_contacted string The last contacted date associated with the notes
notes_last_updated string The date the notes were last updated
notes_next_activity_date string The next notes activity date
created_at string The date the deal was added to the system

Need help?

Have questions? Need help getting started? Need other HubSpot templates or functions for Microsoft Excel or Google Sheets? Chat with us; we're happy to help!