# Custom Card Integration

**URL:** <https://community.hubspot.com/t/custom-card-integration/121663>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [November 30, 2024, 8:15pm UTC](https://community.hubspot.com/t/custom-card-integration/121663 "2024-11-30T20:15:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashwinj](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@Ashwinj](https://community.hubspot.com/u/Ashwinj)\
**Post date:** [November 30, 2024, 8:15pm UTC](https://community.hubspot.com/t/custom-card-integration/121663/1 "2024-11-30T20:15:04Z")

</div>

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](https://d2qpr2jzcazej7.cloudfront.net/original/2X/e/e251bf6230b2d9e06e57fa0533db250f638f7f91.png)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 2, 2024, 6:44pm UTC](https://community.hubspot.com/t/custom-card-integration/121663/2 "2024-12-02T18:44:54Z")

</div>

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](https://community.hubspot.com/t5/user/viewprofilepage/user-id/673740) [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811) @Teun do you have any thoughts on workarounds for @Ashwinj?

Thank you very much for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [December 3, 2024, 6:01am UTC](https://community.hubspot.com/t/custom-card-integration/121663/3 "2024-12-03T06:01:00Z")

</div>

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](https://developers.hubspot.com/beta-docs/reference/ui-components/overview). 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](https://developers.hubspot.com/beta-docs/reference/api/library/files#post-%2Ffiles%2Fv3%2Ffiles%2Fimport-from-url%2Fasync)).
3. Set the given File as an attachment ([via the creation of a Note](https://developers.hubspot.com/beta-docs/guides/api/crm/engagements/notes) 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.

---

<div class="post-metadata">

**Author:** ![Danielle\_J](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danielle_j/32/16530_2.png) [@Danielle\_J](https://community.hubspot.com/u/Danielle_J)\
**Post date:** [December 3, 2024, 12:10pm UTC](https://community.hubspot.com/t/custom-card-integration/121663/4 "2024-12-03T12:10:42Z")

</div>

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](https://developers.hubspot.com/beta-docs/guides/api/library/files) 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](https://developers.hubspot.com/beta-docs/guides/api/crm/engagements/engagement-details) 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
