Skip to content

vatsaldrc/botpress-integration-hubspot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

HubSpot CRM Integration

This integration allows you to connect Botpress with HubSpot CRM, enabling various CRM operations directly through your chatbot.

Table of Contents

  1. Introduction

  2. Seeing Property IDs

  3. Finding Property IDs

  4. Actions

  5. Search

  6. Using Actions

  7. Properties

  8. Introduction

  9. Seeing Property IDs

  10. Finding Property IDs

  11. Actions

  12. Search

  13. Using Actions

  14. Properties

Introduction

This guide provides instructions on using HubSpot CRM integration to manage various CRM operations, such as creating, updating, deleting, and searching for contacts, companies, and tickets.

Seeing Property IDs

To view the internal property names for HubSpot properties, refer to the following link: Internal HubSpot Property Names.

Finding Property IDs

You can find the properties and their IDs at this link: HubSpot Property Settings.

Actions

Contacts

  • Get a Contact
  • Create a Contact
  • Delete a Contact
  • Update a Contact
  • Search Contacts

Companies

  • Get a Company
  • Create a Company
  • Delete a Company
  • Update a Company
  • Search Companies

Tickets

  • Get a Ticket
  • Create a Ticket
  • Delete a Ticket
  • Update a Ticket
  • Search Tickets

Other

  • Make an API Call

Search

Search for Companies

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "industry",
          "operator": "EQ",
          "value": "Technology"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ],
  "properties": ["name", "industry", "annualrevenue"],
  "limit": 100,
  "after": 0
}

Search for Contacts

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "email",
          "operator": "EQ",
          "value": "[email protected]"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ],
  "properties": ["createdate", "firstname", "lastname", "email"],
  "limit": 100,
  "after": 0
}

Search for Tickets

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "subject",
          "operator": "EQ",
          "value": "Support Needed"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ],
  "properties": ["createdate", "subject", "content", "status"],
  "limit": 100,
  "after": 0
}

Using Actions

Contacts

Get a Contact

To get a contact, simply provide the contact ID.

{
  "contactId": "12345"
}

Create a Contact

When creating a new contact, you should include at least one of the following properties: email, firstname, or lastname. It is recommended to always include email to avoid duplicate contacts in HubSpot.

{
  "properties": {
    "email": "[email protected]",
    "firstname": "Milos",
    "lastname": "Arsik",
    "phone": "(226) 700-0079",
    "company": "HubSpot",
    "hubspot_owner_id": "117816668"
  }
}

Delete a Contact

To delete a contact, simply provide the contact ID.

{
  "contactId": "12345"
}

Update a Contact

Perform a partial update of a contact identified by {contactId}. {contactId} refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored.

{
  "contactId": "12345",
  "properties": {
    "phone": "(226) 700-0080",
    "company": "HubSpot Inc."
  }
}

Companies

Get a Company

To get a company, simply provide the company ID.

{
  "companyId": "67890"
}

Create a Company

When creating a new company, include relevant properties.

{
  "properties": {
    "name": "HubSpot",
    "industry": "Technology",
    "annualrevenue": "1000000"
  }
}

Delete a Company

To delete a company, simply provide the company ID.

{
  "companyId": "67890"
}

Update a Company

Perform a partial update of a company identified by {companyId}. {companyId} refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored.

{
  "companyId": "67890",
  "properties": {
    "annualrevenue": "1500000"
  }
}

Tickets

Get a Ticket

To get a ticket, simply provide the ticket ID.

{
  "ticketId": "54321"
}

Create a Ticket

When creating a new ticket, include relevant properties.

{
  "properties": {
    "subject": "Need help with integration",
    "content": "Details about the issue...",
    "status": "open"
  }
}

Delete a Ticket

To delete a ticket, simply provide the ticket ID.

{
  "ticketId": "54321"
}

Update a Ticket

Perform a partial update of a ticket identified by {ticketId}. {ticketId} refers to the internal object ID. Provided property values will be overwritten. Read-only and non-existent properties will be ignored.

{
  "ticketId": "54321",
  "properties": {
    "status": "closed"
  }
}

Properties

Properties are the specific fields you want to retrieve for each record. You can specify which properties to include in the response. In the examples above, properties like createdate, firstname, and lastname are requested. You can customize this based on the fields available in your HubSpot account.

Example:

"properties": ["createdate", "firstname", "lastname", "email", "phone"]

Example with Multiple Filter Groups (AND/OR logic)

Example 1: Using AND logic within a filter group

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "createdate",
          "operator": "GTE",
          "value": "1622505600000"
        },
        {
          "propertyName": "email",
          "operator": "EQ",
          "value": "[email protected]"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ],
  "properties": ["createdate", "firstname", "lastname"],
  "limit": 100,
  "after": 0
}

Example 2: Using OR logic between filter groups

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "createdate",
          "operator": "GTE",
          "value": "1622505600000"
        }
      ]
    },
    {
      "filters": [
        {
          "propertyName": "email",
          "operator": "EQ",
          "value": "[email protected]"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ],
  "properties": ["createdate", "firstname", "lastname"],
  "limit": 100,
  "after": 0
}

Example 3: Combining AND and OR logic

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "createdate",
          "operator": "GTE",
          "value": "1622505600000"
        },
        {
          "propertyName": "email",
          "operator": "EQ",
          "value": "[email protected]"
        }
      ]
    },
    {
      "filters": [
        {
          "propertyName": "firstname",
          "operator": "EQ",
          "value": "Jane"
        }
      ]
    }
  ],
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ],
  "properties": ["createdate", "firstname", "lastname"],
  "limit": 100,
  "after": 0
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%