ballerinax/hubspot.crm.property Ballerina library

Deprecated2.4.0

Deprecation Notice: This connector is deprecated and will no longer be maintained or updated. Use ballerinax/hubspot.crm.properties instead.

Overview

The HubSpot connector(https://www.hubspot.com/) OpenAPI specification.

All HubSpot objects store data in default and custom properties. These endpoints provide access to read and modify object properties in HubSpot.

Key Features

  • Programmatic access to create and manage resources via REST API
  • Manage user accounts and profiles
  • Support for webhooks and event-driven workflows
  • Secure authentication with API key or OAuth support

Prerequisites

Before using this connector in your Ballerina application, complete the following:

  • Create a HubSpot developer account
  • Obtain tokens
    • Use this guide to obtain the credentials which are needed to create the <CLIENT_ID> and <CLIENT_SECRET>

Quickstart

To use the HubSpot CRM Properties connector in your Ballerina application, update the .bal file as follows:

Step 1 - Import connector

First, import the ballerinax/hubspot.crm.property module into the Ballerina project.

Copy
import ballerinax/hubspot.crm.property;

Step 2 - Create a new connector instance

You can now make the connection configuration using the access token.

Copy
property:ClientConfig clientConfig = {
    auth : {
        token: <ACCESS_TOKEN>
    }
};

property:Client baseClient = check new Client(clientConfig);

Step 3 - Invoke connector operation

  1. Create a property instance
Copy
property:Property property = {
    groupName: "contactinformation",
    hidden: false,
    displayOrder: 0,
    options: [
            {
                label: "Option A",
                description: "Choice number one",
                value: "A",
                displayOrder: 1,
                hidden: false
            } 
    ],
    label: "My Contact Property",
    description: "",
    fieldType: "select",
    name: "name",
    'type: "enumeration"
};

property:Property|error bEvent = baseClient->create("deals", property);

if (bEvent is property:Property) {
    log:printInfo("Created the property" + bEvent.toString());
} else {
    test:assertFail(msg = bEvent.toString());
}
  1. List properties
Copy
property:CollectionResponseProperty|error bEvent = baseClient->getAll("deals");

if (bEvent is property:CollectionResponseProperty) {
    log:printInfo("Property list" + bEvent.toString());
} else {
    log:printError(msg = bEvent.message());
}
  1. Use bal run command to compile and run the Ballerina program

Import

import ballerinax/hubspot.crm.property;Copy

Other versions

See more...

Metadata

Released date: 3 months ago

Version: 2.4.0

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.8.0

GraalVM compatible: Yes


Pull count

Total: 23

Current verison: 0


Weekly downloads


Source repository


Keywords

Type/Connector

Vendor/HubSpot

Area/CRM & Sales

Sales & CRM/Customer Relationship Management

Cost/Freemium


Contributors