ballerinax/hubspot.marketing Ballerina library

2.3.1

Overview

This is a generated connector from HubSpot OpenAPI specification.

These APIs allow you to interact with HubSpot's Marketing Events Extension.

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 API keys related to your account.

Quickstart

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

Step 1 - Import connector

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

Copy
import ballerinax/hubspot.marketing;

Step 2 - Create a new connector instance

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

Copy
marketing:ApiKeysConfig config = {
    hapikey : "<your apiKey>"
};

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

Step 3 - Invoke connector operation

  1. Create a marketing event
Copy
marketing:MarketingEventCreateRequestParams event = {
    eventName: "<EVENT_NAME>",
    eventOrganizer: "<EVENT_ORGANIZER>",
    customProperties: [],
    externalAccountId: "<EXTERNAL_ACCOUNT_ID>",
    externalEventId: "<EXTERNAL_EVENT_ID>"
};

marketing:MarketingEventDefaultResponse|error bEvent = baseClient->createMarketingEvent(event);

if (bEvent is marketing:MarketingEventDefaultResponse) {
    log:printInfo("Created behavoural event");
} else {
    log:printInfo(msg = bEvent.message());
}
  1. Use bal run command to compile and run the Ballerina program

Import

import ballerinax/hubspot.marketing;Copy

Metadata

Released date: 12 months ago

Version: 2.3.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 2

Current verison: 0


Weekly downloads


Source repository


Keywords

Marketing/Marketing Automation

Cost/Freemium


Contributors

Other versions

See more...