Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk Upload Contacts #35

Open
B4Dmonkey opened this issue Nov 24, 2024 · 2 comments
Open

Bulk Upload Contacts #35

B4Dmonkey opened this issue Nov 24, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@B4Dmonkey
Copy link

Is your feature request related to a problem? Please describe.
I'm looking to set up some automations for bulk upserting contacts. I need to get contacts from multiple data sources, map them to my contacts and upsert them to hubspot. Hubspot currently supports this in their api

Describe the solution you'd like
I was hoping for something like this
`req := []*hubspot.Contact{
{
Email: hubspot.NewString("[email protected]"),
FirstName: hubspot.NewString("John"),
LastName: hubspot.NewString("Doe"),
},
{
Email: hubspot.NewString("[email protected]"),
FirstName: hubspot.NewString("Jane"),
LastName: hubspot.NewString("Smith"),
},
}

// Call create contact api.
res, err := client.CRM.Contact.Upsert(req)`

Describe alternatives you've considered
I'm currently exploring alternatives. Based on the current implementation of this package I think its possible to implement this in my code by defining a custom contact and creating my own implementation of upsert.

Additional context
I was wondering if this package is still being maintained. I could try implementing on my own and raising a pr. I need this functionality for a project im working on. The project requirements will grow in the coming months and I can make future contributions as I find gaps.

@kk-no kk-no added the enhancement New feature or request label Nov 26, 2024
@kk-no kk-no self-assigned this Nov 26, 2024
@kk-no
Copy link
Member

kk-no commented Nov 26, 2024

@B4Dmonkey

As you said, I think similar functionality can be implemented using Bulk Upsert API https://api.hubapi.com/crm/v3/objects/contacts/batch/upsert.

req := []*hubspot.Contact{
{
Email: hubspot.NewString("[email protected]"),
FirstName: hubspot.NewString("John"),
LastName: hubspot.NewString("Doe"),
},
{
Email: hubspot.NewString("[email protected]"),
FirstName: hubspot.NewString("Jane"),
LastName: hubspot.NewString("Smith"),
},
}
// Call create contact api.
res, err := client.CRM.Contact.Upsert(req)

The examples you suggested looks good to me.
This library is subject to maintenance and we can work on its implementation, but a pull request would be very helpful.

I have added an enhancement label as a feature request.
We will consider whether to include it as an implementation in the next release, etc.

Thank you.

@B4Dmonkey
Copy link
Author

Just incase anyone runs into this, I was able to get something working, I need to do a bit more testing on my end but when I'm happy with it I can send over a pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants