# How to associate custom object in bulk

**URL:** <https://community.hubspot.com/t/how-to-associate-custom-object-in-bulk/28907>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, events, contacts, timeline-and-extensions-apis\
**Created:** [December 8, 2020, 4:38pm UTC](https://community.hubspot.com/t/how-to-associate-custom-object-in-bulk/28907 "2020-12-08T16:38:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spotthehub](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/spotthehub/32/98942_2.png) [@spotthehub](https://community.hubspot.com/u/spotthehub)\
**Post date:** [December 8, 2020, 4:38pm UTC](https://community.hubspot.com/t/how-to-associate-custom-object-in-bulk/28907/1 "2020-12-08T16:38:39Z")

</div>

Hi All,

Let’s say I created a custom object for virtual events. We created a virtual event record and then hosted the event where leads attended.

After the event, we have a lead list with data about attendance. How would we upload a csv that would associate the contact with the virtual event they attended?

I tried creating a temporary field that we could use in a workflow. But the events object doesn’t show any association fields.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [December 9, 2020, 6:31pm UTC](https://community.hubspot.com/t/how-to-associate-custom-object-in-bulk/28907/2 "2020-12-09T18:31:21Z")

</div>

Hey @spotthehub

Thanks for the question!

@MatthewShepherd , @Bryantworks , @lynton -- how would you all approach this?

---

<div class="post-metadata">

**Author:** ![spotthehub](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/spotthehub/32/98942_2.png) [@spotthehub](https://community.hubspot.com/u/spotthehub)\
**Post date:** [December 9, 2020, 6:50pm UTC](https://community.hubspot.com/t/how-to-associate-custom-object-in-bulk/28907/3 "2020-12-09T18:50:34Z")

</div>

I actually figured it out through trial and error:

The following headers are required for an example import of associating contacts with a custom object called virtual events:

**Contact ID**

**Email**

**Virtual Event ID**

**Virtual Event Date**

**Virtual Event Title**

The reason these fields are used for importing is that they are the minimum required fields for creating a new record for each. Other objects will have different fields that will be required and can be found by trying to manually create a new record for that object.

A single spreadsheet is prepared with those headers as a minimum. Additional fields can be added, but it may be easier to import associations separate from new contact data.

**Directions:**

- Import
- Import file from computer
- One file
- Multiple Objects
- Check off Contacts and Virtual Events (or other objects you wish to associate)
- Choose the file
- Check off both IDs as the records to update
- Import the data

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [December 9, 2020, 6:59pm UTC](https://community.hubspot.com/t/how-to-associate-custom-object-in-bulk/28907/4 "2020-12-09T18:59:19Z")

</div>

@spotthehub ,

Thanks for adding the solution (very clearly written at that) to the post!
