GPT Based Email Parser

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!

Hey, @The_Shermanati :waving_hand: 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). You can find the full list here — 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