# GPT Based Email Parser

**URL:** <https://community.hubspot.com/t/gpt-based-email-parser/133520>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [May 28, 2025, 6:10pm UTC](https://community.hubspot.com/t/gpt-based-email-parser/133520 "2025-05-28T18:10:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Shermanati](https://avatars.discourse-cdn.com/v4/letter/t/ccd318/32.png) [@The\_Shermanati](https://community.hubspot.com/u/The_Shermanati)\
**Post date:** [May 28, 2025, 6:10pm UTC](https://community.hubspot.com/t/gpt-based-email-parser/133520/1 "2025-05-28T18:10:41Z")

</div>

Hello all! I have run into a frustrating issue when attempting to associate noted to newly created deals. I am using OpenAI GPT and custom Python code to pull incoming RFQs from our sales email to automatically create HubSpot deals. I have the software communicating enough that I can create deals from the Python code, however, when it attempts to associate the note to the new deal, I get the error  
Failed to associate note : 400 - {“status”:“error”,“message”:“One or more association types in request don’t match specified object types & direction: note → deal”,“correlationId”:“0337e0e3-0c24-4055-b327-bfb2747a2d26”,“contect”:{“HUBSPOT\_DEFINED”:[“280”]}, “category”:“VALIDATION\_ERROR”}.

I have attempted using other “HubSpot Defined” ID’s other than 280, and nothing seems to work. Has anyone else run into this issue and/or have a fix? Thank you!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 28, 2025, 7:08pm UTC](https://community.hubspot.com/t/gpt-based-email-parser/133520/2 "2025-05-28T19:08:00Z")

</div>

Hey, [@The\_Shermanati](https://community.hubspot.com/t5/user/viewprofilepage/user-id/855824) 👋 I’d start with double-checking your Association Type Ids. You can find the full list here. Looking at your example, you listed `280` for Note \> Deal, but `280` is for [**Company to contact (all labels)**](https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4#association-type-id-values:~:text=280,Company%20to%20contact). You can find the full list here — [**Association type ID values**](https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4#association-type-id-values).

Note \> Deal = 214

Deal \> Note = 213

You can test this using Postman pretty quick to verify your association IDs are working as expected.

Have fun testing! — Jaycee
