APIs & Integrations

RMones
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Add Data to Custom Objects by NodeJS Hubspot Client

解決

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 いいね!
2件の承認済みベストアンサー
dennisedson
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

Add Data to Custom Objects by NodeJS Hubspot Client

解決

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 いいね!
dennisedson
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

Add Data to Custom Objects by NodeJS Hubspot Client

解決

Thanks for confirming!

元の投稿で解決策を見る

5件の返信
robertainslie
HubSpot Employee
HubSpot Employee

Add Data to Custom Objects by NodeJS Hubspot Client

解決

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
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Add Data to Custom Objects by NodeJS Hubspot Client

解決

@dennisedson that did the trick..
Thank you!

dennisedson
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

Add Data to Custom Objects by NodeJS Hubspot Client

解決

Thanks for confirming!

RMones
投稿者 | Platinum Partner
投稿者 | Platinum Partner

Add Data to Custom Objects by NodeJS Hubspot Client

解決

Hi,

 

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

I'll give it a try!

 

Thank you! 🙂

dennisedson
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

Add Data to Custom Objects by NodeJS Hubspot Client

解決

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 いいね!