APIs & Integrations

thulani
Member

Attaching files to object via the APIs

SOLVE

How can one attach files to objects (deals, contacts, companies etc) using the APIs. I am seeing some activity on this question in the community with no definete answers.

The Files API documentation hints at this being possible via the engagemetns API

 

a.png

Looking however at engagements, it appears as though there is no support for files

 

b.png

How can this be achieved?

 

Thanks

 

0 Upvotes
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Attaching files to object via the APIs

SOLVE

Hi, @thulani 👋 I have an example here — Attach file to deal record using API

 

The quick version — 

  • Upload the file
  • Create a Note
  • Associate the File to the Note
  • Associate the Note to the Object

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

View solution in original post

0 Upvotes
4 Replies 4
Franci
Top Contributor | Diamond Partner
Top Contributor | Diamond Partner

Attaching files to object via the APIs

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
Jaycee_Lewis
Solution
Community Manager
Community Manager

Attaching files to object via the APIs

SOLVE

Hi, @thulani 👋 I have an example here — Attach file to deal record using API

 

The quick version — 

  • Upload the file
  • Create a Note
  • Associate the File to the Note
  • Associate the Note to the Object

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
lstepany
Contributor | Elite Partner
Contributor | Elite Partner

Attaching files to object via the APIs

SOLVE

Hi @Jaycee_Lewis 

 

This solution is indeed working well and I have used it, however it seems like there is a limit for uploading files into the file manager. I have about 3000 files but I am able to upload olny 250 files.

I have noticed that if I attach an external file to the object it doesn't go to file manager  but stays attached to the object. And if I attach a file using API I have to upload to filemanager first which has a limit then if I delete thefile from the file manager it disapears from attached object as well. Is there any  solution for attaching big amount of files to objects via API?

 

thulani
Member

Attaching files to object via the APIs

SOLVE

Thanks for the quick response. I will give this a try and mark this as the solution if all goes well. 

 

I really appreciate how quick you responded here 😄