APIs & Integrations

Ashwinj
Member

Custom Card Integration

SOLVE

Hello Team,
I hope you are doing well.
How can we give an add attachment  option in the card anyone have any suggestion please let me know. can anybody have the same issue please let me know. Thank you in advance for your help and support.

image (1).png

0 Upvotes
1 Accepted solution
zach_threadint
Solution
Guide

Custom Card Integration

SOLVE

Hi @Ashwinj 👋

 

I don't think there'll be an easy way for you to offer this kind of functionality using HubSpot's UI Extensions feature. You're more or less limited to the components outlined by HubSpot here. One option you might like to consider:

  1. Use the "Input" component to allow users to submit a URL where the existing document is located.
  2. In your app's backend, upload the file to HubSpot via API (see the "Import a file from a URL into the file manager" endpoint within this documentation).
  3. Set the given File as an attachment (via the creation of a Note with the 'hs_attachment_ids' property populated  + association with the given record)

Obviously this solution would only work if the file(s) are already available online. I don't think there's currently a way to offer this kind of feature via UI Extensions for files stored locally on the user's device (though I could be wrong 🤞).

 

I hope this proves helpful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


View solution in original post

0 Upvotes
3 Replies 3
Danielle_J
Participant | Diamond Partner
Participant | Diamond Partner

Custom Card Integration

SOLVE

Hi, @Ashwinj 👋

To add an "Add Attachment" option within a HubSpot UI extension card, you can perhaps include file upload functionality using HubSpot's Files API and link the uploaded files to specific CRM records via the Engagements API.

A potential solution would be : 

 

Step 1: Upload the File Using the Files API

  • Use the Files API to upload the file to HubSpot's file manager.
  • Once uploaded, the API will return a unique file ID for the file.

Step 2: Create an Engagement and Link the File

  • Use the Engagements API to create a new engagement (such as a note) and attach the file by referencing its file ID.
  • Link this engagement to the relevant CRM record (e.g., contact, company, or deal) to ensure the attachment is displayed in the correct location.

 

I hope this helps !

 

Thanks,

Danielle

 

0 Upvotes
zach_threadint
Solution
Guide

Custom Card Integration

SOLVE

Hi @Ashwinj 👋

 

I don't think there'll be an easy way for you to offer this kind of functionality using HubSpot's UI Extensions feature. You're more or less limited to the components outlined by HubSpot here. One option you might like to consider:

  1. Use the "Input" component to allow users to submit a URL where the existing document is located.
  2. In your app's backend, upload the file to HubSpot via API (see the "Import a file from a URL into the file manager" endpoint within this documentation).
  3. Set the given File as an attachment (via the creation of a Note with the 'hs_attachment_ids' property populated  + association with the given record)

Obviously this solution would only work if the file(s) are already available online. I don't think there's currently a way to offer this kind of feature via UI Extensions for files stored locally on the user's device (though I could be wrong 🤞).

 

I hope this proves helpful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Custom Card Integration

SOLVE

Hi, @Ashwinj 👋 Thanks for the interesting question. I'd like to invite some of our community champions who have related experience to the conversation — hey @coldrickjack @Danielle_J @zach_threadint @Teun do you have any thoughts on workarounds for @Ashwinj?

 

Thank you very much for taking a look! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes