APIs & Integrations

RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

Hi all,

 

I'm trying to add Data to a custom object by the Hubspot NodeJS API Client.

But i don't have an option to add data to a custom object.

 

Is this posible via the provided hubspot connector?

(https://github.com/HubSpot/hubspot-api-nodejs)

 

Thank you,

 

Ronald

0 Upvotes
2 Accepted solutions
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

Hey @RMones 

Welcome to the Community!

Are you still working in this issue?

I did notice that there was a new release 3 days ago.  Wonder if what you need was included

View solution in original post

0 Upvotes
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

Thanks for confirming!

View solution in original post

5 Replies 5
robertainslie
HubSpot Employee
HubSpot Employee

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

For future posterity on this thread:
When using the HubSpot nodejs API client, if you want to access custom object data, the notation is like this:

hubspotClient.crm.objects.basicApi.getById('object-name',objectId,['propertyOne,'propertyTwo'])

 Note that you access methods on the 'crm.objects' package, and then specify the custom object to access by passing the object name as a parameter argument.
Here's a bigger code sample, in which the code is accessing a custom object with the 'fully qualified object name' of p203693_product_incident'

 

 

hubspotClient.crm.objects.basicApi.getById('p203693_product_incident',event.object.objectId, ["product_name", "product_sku"])
.then(results => {
console.log(results.body)
let product_name = results.body.properties.product_name;
let product_sku = results.body.properties.product_sku;

callback({
outputFields: {
productSku: product_sku,
productName: product_name
}
});
})
.catch(err => {
console.error(err);
});
}

 

 

 

RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

@dennisedson that did the trick..
Thank you!

dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

Thanks for confirming!

RMones
Contributor | Platinum Partner
Contributor | Platinum Partner

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

Hi,

 

Thx @dennisedson !
I see that its updated with objects..

I'll give it a try!

 

Thank you! 🙂

dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Add Data to Custom Objects by NodeJS Hubspot Client

SOLVE

Hey @RMones 

Welcome to the Community!

Are you still working in this issue?

I did notice that there was a new release 3 days ago.  Wonder if what you need was included

0 Upvotes