APIs & Integrations

PedroTayer
Participant

Read file attached to deal

Hi guys,

I'm trying to read a file attached to a deal but I'm not being successful.

The API call I'm using is a get to:

/crm-associations/v1/associations/{deal_id}/HUBSPOT_DEFINED/11

But it returns just the notes ID, not the uploaded file ID.

 

In some posts I've read things about the file (when uploaded via UI) being hidden=true by default and the only solution to this was using an old HS interface.

 

I need to read a .csv file uploaded and attached to a deal via UI, is that possible?

1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

Read file attached to deal

Hey, Pedro! Thanks for reaching out. Did you get this worked out? If not, I followed the breadcrumbs and found at least one solution. 

 

Resources I used:

Endpoints:

My steps:

  • Created a new deal + added a CSV as an attachment to the deal via the UI 
  • Used the Associations endpoint to find the engagement IDs 
  • Used the Engagement endpoint to find the ID with a value for “attachments”
  • Used the Get signed URL endpoint and the attachment ID to get a URL
  • Used the URL to download the CSV

Requests:

  1. getEng.png
  2. getAsn.png

     

  3. CleanShot 2022-11-14 at 15.57.30.png

Successful download

urlLink.png

 

There isn't another all-in-one solution for this request. I agree, that would be a much more elegant and easier to deal with.

 

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot