APIs & Integrations

HubSpotMaster
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Lookup HubSpot User ID and Copy respective email to property - Company Object

Use Case:

I need a property on the company object that displays the email of the "Company Owner". I have created a new property "Company Owner Email" but when you copy the company owner to the company owner email it displays the company User ID. The Allbound integration requires you have the Company Owners Email Address

 

Question:

(1) Is it possible to lookup the user Id and copy the user's email address into this property? 

 

I know I can create a workflow that is an IF/Then HubSpot User ID and then have it set to the users email however this would have to be constantly maintained and updated. So hoping we can automate it with code. 

 

(2) How long would it take to complete something like this? 

 

Thanks!

 

 

0 Upvotes
1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

Lookup HubSpot User ID and Copy respective email to property - Company Object

Hey @HubSpotMaster,

 

Love your handle name! 😂

 

When looking to get owner ID's email, you can use this HubSpot endpoint - Get a list of owners | Owners API. For your use case, I would recommend using these three endpoints:

 

1. Retrieve and store portal's owners ID and their respective email by using this endpoint - Get a list of owners | Owners API.

2. Next, retrieve all the companies owner and id by using this endpoint - Get all companies | Companies API.

3. Lastly, using this endpoint - Update a group of companies to batch update the company property - `Company Owner Email`.

 

Hope this helps to shed some lights!

0 Upvotes