# Association Label between Custom Objects and Notes

**URL:** <https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553>\
**Category:** APIs & Integrations\
**Tags:** zapier\
**Created:** [April 18, 2023, 3:49pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553 "2023-04-18T15:49:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RLeonard](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@RLeonard](https://community.hubspot.com/u/RLeonard)\
**Post date:** [April 18, 2023, 3:49pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553/1 "2023-04-18T15:49:51Z")

</div>

I am using a webhook in Zapier that based on a trigger, makes a put request that creates a note and associates it to a deal. I also want to associate that note with a custom object but am finding a difficult time doing so. For creating the note and associating it to the deal, I used [Accounts Dashboard | HubSpot](https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview) to find the association type id of 12 for deals but was wondering if there was a way I could do something similar to associate it with a custom object, or if there are any workarounds that people know of. Not sure if it makes any difference, but we do not have Operations Hub.

Any help/guidance would be greatly appreciated,

Thanks!

---

<div class="post-metadata">

**Author:** ![RLeonard](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@RLeonard](https://community.hubspot.com/u/RLeonard)\
**Post date:** [April 18, 2023, 3:51pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553/2 "2023-04-18T15:51:08Z")

</div>

Also - I meant “post” request, not put.

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [April 18, 2023, 6:49pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553/3 "2023-04-18T18:49:34Z")

</div>

Hey @RLeonard

First check your custom object’s schema using:

```lia-code-sample
GET
/crm/v3/schemas/{objectType}

```

If the association to notes is present, it will list the association direction ids.

If not you’ll want to update the schema to include the NOTES associtaion by patching the schema:

```lia-code-sample
POST
/crm/v3/schemas/{objectType}/associations

```

Hope this gets you moving!

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [April 18, 2023, 6:50pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553/4 "2023-04-18T18:50:32Z")

</div>

A note: You’ll want to do the above using a tool like Postman not Zapier

---

<div class="post-metadata">

**Author:** ![RLeonard](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@RLeonard](https://community.hubspot.com/u/RLeonard)\
**Post date:** [April 19, 2023, 1:46pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553/5 "2023-04-19T13:46:30Z")

</div>

Hi Kevin - thank you for the feedback and guidance. I did the get request for my custom object and was given the following:

{

“fromObjectTypeId”: “2-13328406”,

“toObjectTypeId”: “0-46”,

“name”: “flip\_projects\_to\_note”,

“cardinality”: “ONE\_TO\_MANY”,

“inverseCardinality”: “ONE\_TO\_MANY”,

“id”: “79”,

“createdAt”: null,

“updatedAt”: null

},

{

“fromObjectTypeId”: “0-46”,

“toObjectTypeId”: “2-13328406”,

“name”: “flip\_projects\_to\_note”,

“cardinality”: “ONE\_TO\_MANY”,

“inverseCardinality”: “ONE\_TO\_MANY”,

“id”: “80”,

“createdAt”: null,

“updatedAt”: null

}

My objective is to post a note to my custom object. I tried the following post request:

{

“properties”: {

“hs\_timestamp”: “2023-04-17T15:48:22Z”,

“hs\_note\_body”: “Here’s my sample note. This is just a test.”,

“hubspot\_owner\_id”: “349248903”

},

“associations”: [

{

“to”: {

“id”:13042541752

},

“types”: [

{

“associationCategory”: “HUBSPOT\_DEFINED”,

“associationTypeId”: 12

}

]

},

{

“from”: {

“objectTypeId”: “0-46”

},

“to”: {

“objectTypeId”:“2-13328406”,

“id”: 6018585414

},

“types”: [

{

“associationCategory”: “HUBSPOT\_DEFINED”,

“associationTypeId”: 80

}

]

}

]

}

Whether I use the association type ID of 79 or 80, I always get a resposne similiar to this (here is my response using the association type ID of 80):

{

“status”: “error”,

“message”: “invalid from object type 0-46 for associations to be created. expected: 0-15”,

“correlationId”: “f59d5055-d8f7-42b1-90f5-0fb80573033a”,

“category”: “VALIDATION\_ERROR”

}

I’m by no means proficient in this space as I am recently self-taught, so I’m sure I have a handful of errors. Any help would be greatly appreciated. Thanks!

> * * *
> 
> @Kevin-C wrote:
> 
> Hey @RLeonard
> 
> First check your custom object’s schema using:

```lia-code-sample
GET
/crm/v3/schemas/{objectType}

```

If the association to notes is present, it will list the association direction ids.

If not you’ll want to update the schema to include the NOTES associtaion by patching the schema:

```lia-code-sample
POST
/crm/v3/schemas/{objectType}/associations

```

Hope this gets you moving!

* * *

---

<div class="post-metadata">

**Author:** ![RLeonard](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@RLeonard](https://community.hubspot.com/u/RLeonard)\
**Post date:** [April 25, 2023, 12:45pm UTC](https://community.hubspot.com/t/association-label-between-custom-objects-and-notes/79553/6 "2023-04-25T12:45:07Z")

</div>

Hi Kevin - thank you for the feedback and guidance. I did the get request for my custom object and was given the following:

{

“fromObjectTypeId”: “2-13328406”,

“toObjectTypeId”: “0-46”,

“name”: “flip\_projects\_to\_note”,

“cardinality”: “ONE\_TO\_MANY”,

“inverseCardinality”: “ONE\_TO\_MANY”,

“id”: “79”,

“createdAt”: null,

“updatedAt”: null

},

{

“fromObjectTypeId”: “0-46”,

“toObjectTypeId”: “2-13328406”,

“name”: “flip\_projects\_to\_note”,

“cardinality”: “ONE\_TO\_MANY”,

“inverseCardinality”: “ONE\_TO\_MANY”,

“id”: “80”,

“createdAt”: null,

“updatedAt”: null

}

My objective is to post a note to my custom object. I tried the following post request:

{

“properties”: {

“hs\_timestamp”: “2023-04-17T15:48:22Z”,

“hs\_note\_body”: “Here’s my sample note. This is just a test.”,

“hubspot\_owner\_id”: “349248903”

},

“associations”: [

{

“to”: {

“id”:13042541752

},

“types”: [

{

“associationCategory”: “HUBSPOT\_DEFINED”,

“associationTypeId”: 12

}

]

},

{

“from”: {

“objectTypeId”: “0-46”

},

“to”: {

“objectTypeId”:“2-13328406”,

“id”: 6018585414

},

“types”: [

{

“associationCategory”: “HUBSPOT\_DEFINED”,

“associationTypeId”: 80

}

]

}

]

}

Whether I use the association type ID of 79 or 80, I always get a resposne similiar to this (here is my response using the association type ID of 80):

{

“status”: “error”,

“message”: “invalid from object type 0-46 for associations to be created. expected: 0-15”,

“correlationId”: “f59d5055-d8f7-42b1-90f5-0fb80573033a”,

“category”: “VALIDATION\_ERROR”

}
