HubSpot

Add a bot to HubSpot using the official integration.

The official HubSpot integration allows your bot to interact with your HubSpot account.

Setup

    1. In Botpress Studio, select Explore Hub in the upper-right corner.
    2. Search for the HubSpot integration, then select Install Integration.
    3. In the Configuration menu, select Authorize HubSpot.
    4. Follow the instructions to connect Botpress to your HubSpot account.

    For advanced use cases, you can use your own HubSpot app with our integration.

    Step 1: Install the HubSpot integration in Botpress

    In Botpress Studio, select Explore Hub in the upper-right corner.
    Search for the HubSpot integration, then select Install Integration.
    In the Configuration menu, select the drop-down menu, then select Manual configuration, use your own HubSpot app.
    Copy the webhook URL—you’ll need it when configuring your HubSpot app.
    Leave the configuration fields empty for now—you’ll come back to them after you’ve setup your HubSpot app.

    Step 2: Create a HubSpot app

    Next, you’ll need to create a HubSpot app for your bot:

    Open a new tab and log into your HubSpot account.
    In the upper-right corner, select your organization name, then select Profile & Preferences.
    Under Account Management, select Integrations, then Legacy Apps.
    Select Create legacy app in the upper-right corner. Then, select Private.

    Step 3: Add scopes to your HubSpot app

    Now, add the required scopes for the HubSpot app to work:

    In the Scopes section, select + Add new scope.

    Add the following scopes:

    • oauth
    • tickets
    • crm.objects.contacts.read
    • crm.objects.contacts.write
    • crm.objects.owners.read
    • crm.objects.companies.read
    • crm.objects.companies.write
    • crm.objects.leads.read
    • crm.objects.leads.write
    • crm.objects.deals.read
    • crm.objects.deals.write
    When you’re done, select Update.

    Step 4: Subscribe to Webhook events (optional)

    Optionally, you can subscribe to Webhook events—these are necessary if you want to use the integration’s Triggers:

    Navigate to the Webhooks tab, then paste the webhook URL you copied earlier into the Target URL field.
    Set Event throttling to 1, then select Create subscription.
    Enable Use expanded object support.

    From the Which object types drop-down, select:

    • Company
    • Contact
    • Ticket
    • Lead

    From the Listen for which events drop-down, select:

    • Created
    • Deleted
    Select Subscribe.
    Select Create app in the upper-right corner. Then, select Continue creating.

    Step 5: Configure the integration in Botpress

    Now you can use your app’s credentials to fill in the configuration fields from Step 1:

    From your HubSpot app’s menu, navigate to the Auth tab.
    Copy the Access token and Client secret.
    Paste them into the integration’s Access Token and Client Secret fields.
    Scroll down and select Save Configuration. This automatically activates the integration.

    Cards

    Create Contact

    Create a contact in HubSpot

    inputobject
    outputobject

    Create Deal

    Create a deal in HubSpot

    inputobject
    outputobject

    Create Lead

    Create a lead in HubSpot

    inputobject
    outputobject

    Create Ticket

    Create a ticket in HubSpot

    inputobject
    outputobject

    Create external user

    Create an end user in the external service and in Botpress

    inputobject
    outputobject

    Delete Contact

    Delete a contact in HubSpot

    inputobject

    Delete Deal

    Delete a deal in HubSpot

    inputobject

    Delete Lead

    Delete a lead in HubSpot

    inputobject

    Get Company

    Get a company from HubSpot by ID

    inputobject
    outputobject

    Get Contact

    Get a contact from HubSpot

    inputobject
    outputobject

    Get Deal

    Get a deal from HubSpot

    inputobject
    outputobject

    Get File URL

    Get a URL to access a file stored in Hubspot Files

    inputobject
    outputobject

    Get Lead

    Get a lead from HubSpot

    inputobject
    outputobject

    Get Owner

    Get a Hubspot owner (user) by ID. Used to resolve owner references on contacts, deals, etc.

    inputobject
    outputobject

    List Contact Properties

    List all available Hubspot contact properties with their metadata

    outputobject

    List Contacts

    List contacts in HubSpot

    inputobject
    outputobject

    Search Company

    Search for a company in HubSpot

    inputobject
    outputobject

    Search Contact

    Search for a contact in HubSpot

    inputobject
    outputobject

    Search Deal

    Search for a deal in HubSpot

    inputobject
    outputobject

    Search Lead

    Search for a lead in HubSpot

    inputobject
    outputobject

    Start new HITL session

    Create a new HITL session in the external service and in Botpress

    inputobject
    outputobject

    Stop HITL session

    Stop an existing HITL session in the external service

    inputobject

    Update Company

    Update a company in HubSpot

    inputobject
    outputobject

    Update Contact

    Update a contact in HubSpot

    inputobject
    outputobject

    Update Deal

    Update a deal in HubSpot

    inputobject
    outputobject

    Update Lead

    Update a lead in HubSpot

    inputobject
    outputobject

    Triggers

    Company Created

    A new company has been created in HubSpot.

    payloadobject

    Company Deleted

    A company has been deleted in HubSpot.

    payloadobject

    Contact Created

    A new contact has been created in HubSpot.

    payloadobject

    Contact Deleted

    A contact has been deleted in HubSpot.

    payloadobject

    hitlAssigned

    payloadobject

    hitlStopped

    payloadobject

    Ticket Created

    A new ticket has been created in HubSpot.

    payloadobject

    Ticket Deleted

    A ticket has been deleted in HubSpot.

    payloadobject