APIs & Integrations

johannes-m
Contributor

Download deal attachement

SOLVE

Hi,

 

How can I download a file from a deal attachment?

With the file id, I can get the metadata from 

/filemanager/api/v2/files/FILE_ID

The documentation says under 'url': The URL to access the file

(https://developers.hubspot.com/docs/methods/files/get_files_file_id)

 

However, the url is inaccessible.

So, this seems like either a bug, or misleading documentation. Did you foget to include the S3 token into the URL, or how can I actually access the file?

 

Regards,

Johannes M.

0 Upvotes
2 Accepted solutions
JasminLin
Solution
HubSpot Employee
HubSpot Employee

Download deal attachement

SOLVE

Hey @johannes-m , what you are currently seeing is expected as of now. File attachments on records or files attached to engagements have a field hidden set to true. This prevents them from appearing in the file manager UI and from being visible by their public URL. The only way to views hidden files is through the UI of the object they’re attached to. 

View solution in original post

SwivelDev
Solution
Member

Download deal attachement

SOLVE

The problem is if you upload files from outside the hubspot file manager (from your local machine for example),  the hidden field is set to true in the api response, as mentioned above, which results in a 404 when you hit the url and doesn't line up with the way the api documentation reads.  To make this work, you first have to upload files via the hubspot file manager, then attach those to deals, notes, etc. 

View solution in original post

12 Replies 12
Franci
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Download deal attachement

SOLVE

Hi Everyone,

 

I work for a HubSpot Diamond Partner. We have developed an app for the marketplace that helps identify objects with attached files and provides a live count of the associated attachments, continuously updated in real-time.

 

We are seeking beta testers who can try our app at no cost, provide valuable feedback, and assist us in enhancing the product's overall usability.

 

👉 Join the Beta Test -> Installation link 🔗

👉 How it works document -> PDF

 

While you're here, don't forget to check out our other apps in the HubSpot Marketplace for more helpful solutions!

 

Cheers!

Francesco Collacciani

HubSpot Specialist @ Exelab

#1 HubSpot Diamond Partner in Italy

emailAddress
francesco.collacciani@exelab.com
website
https://www.exelab.com/en/
Get in touch with us!
0 Upvotes
anthony_n
Participant

Download deal attachement

SOLVE

Also wondering if there is any update on this issue?

 

The workflow requiring users to first upload through the file manager and then attach to the object is cumbersome. It would be great if we could access the "hidden" attachments via the files API.

 

Thanks!

0 Upvotes
Clearsite
Member

Download deal attachement

SOLVE

I was wondering, since this has been dormant for over a year, if there is a solution yet for this issue?

I have many issues with the method of implementation of the hubspot api (official v2 hubspot/api-client using composer), but in the end, the ability to somehow download the attachment will be a deal-breaker for the project.

Kry
Member

Download deal attachement

SOLVE

Hi,

Did you find a solution to download a file from a deal attachment?

 

Thanks

Best Regards

akaiser
Member

Download deal attachement

SOLVE

when you use the

GET /filemanager/api/v2/files/:file_id

method, u get in the reuslt a property called "URL", try to access the file, using this url

0 Upvotes
SwivelDev
Solution
Member

Download deal attachement

SOLVE

The problem is if you upload files from outside the hubspot file manager (from your local machine for example),  the hidden field is set to true in the api response, as mentioned above, which results in a 404 when you hit the url and doesn't line up with the way the api documentation reads.  To make this work, you first have to upload files via the hubspot file manager, then attach those to deals, notes, etc. 

gprestes
Participant

Download deal attachement

SOLVE

@SwivelDev, the problem now is that HubSpot recently had a product update where you can't upload a file to the file manager straight inside the deal/ticket.

This is not good at all in our case, because now our agents have to go out the deal/ticket, upload the file to the file maganer, and then go back to the deal/ticket to select it. It added an unnecessary and time consuming step to the process. 😞

lucasverra
Participant

Download deal attachement

SOLVE

so if i understand correctly; hubspot restrict authorized API access to Attachments files (considering i've never used the file manager, i just upload from email or contact UI)

Is there a plan for allowing us the access to our own data ? thanks

0 Upvotes
akaiser
Member

Download deal attachement

SOLVE

show us your request, do you also send your api key to the api? 

0 Upvotes
JasminLin
Solution
HubSpot Employee
HubSpot Employee

Download deal attachement

SOLVE

Hey @johannes-m , what you are currently seeing is expected as of now. File attachments on records or files attached to engagements have a field hidden set to true. This prevents them from appearing in the file manager UI and from being visible by their public URL. The only way to views hidden files is through the UI of the object they’re attached to. 

cimar007
Participant

Download deal attachement

SOLVE

I used the filemanager to retrieve the info for the attachment.

 

It has the cloud_key_hash, hubspot should let us be able to retrieve it if we pass that parameter . 

 

Why is not possible and what solution should we take to retrieve the attachment ? 

 

Thanks

0 Upvotes
johannes-m
Contributor

Download deal attachement

SOLVE

Hi JasminLin,

 

Thanks for your answer. So there is currently no way to get a file associated from a deal, right?

If so, it would be great for future developers, if you could update the documentation, since it mislead me into thinking that this is possible.

 

Regards,

Johannes M.