hubspotClient.crm.objects.basicApi.getById() to get the the custom obejct details and using that to send email to user depending on few critera.
As the above steps calls the same custom object to get the data for each users in the list, it's a repeatative call. So to avoid that, we are planning to store the custom object to contact level. meaning in a workflow before the 'custom code' step, we want to read the custom object data and map it to all the contact property , so that in 'custom code' we can read the data through contact property, not through API . This will reduce the number of API calls.
Is there any way, where We can copy or map the custom object data to a contact property without any API call.
We do have a one more scheduled workflow , which calls a external API and aftermanipulating the response store it in custom object , So here also if I can map the manipulated response directly to contacts properties without API, that also would be good.
I would like to share the solution that you can map custom object data to contact objects without any API Calls. You can use the "Edit Record" Action: Under the CRM menu, you'll find the "Edit Record" action. This allows us to update contact properties with data from associated custom objects. see the screenshot below:
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member. Thanks!
Custom coded actions aside, are you able to explain in a few bullet points and with an example, what it is you want to do?
Right now it's a bit too abstract but my gut feeling is that you've gone down a very complicated route, that might not be necessary in the first place.
Frank
Found my comment helpful? Great! Please mark it as a solution to help other community users.
1. We have a schduled workflow daily morning, which calls a API from our application. The response from the API is manipulated as we need in hubspot and stored in a custom object, for example called its as "CustomObjA".
2. Later in the afternoon, we run another schduled workflow, which reads data from a existing "List" in hubspot (Filters the contact data). This workflow has a custom code as steps. Here in the custom code as of now, we are calling GET API to get the "CustomObjA" and use the contacts filtered the privious step and teh data in "CustomObjA" to send the Email.
Problem is now the GET api to get the "CustomObjA" is calling everytime per user ,which is not necessary. So I'm planning to copy/keep the data in "CustomObjA" contacts so I will skip calling API everytime.