We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jan 11, 2022 10:30 AM - edited Jan 11, 2022 12:37 PM
Hello,
I want to do an API call from a custom code inside a deal based workflow to look for the contact in this deal that has a certain contact type.
Will use this get api :
https://api.hubapi.com/contacts/v1/search/query?q=testingapis&hapikey=demo
How can i call this api from my custom code action and add the property to it ?
Thanks,
Chris
Solved! Go to Solution.
Jan 14, 2022 5:15 AM
I was able to fetch a contact by adding his email as a property in the deal, and then calling this property from the enrolled deal using my custom code. This way i didn't require any sort of API to fetch the contact email. Stored the email in a variable and will use this variable as a parameter in the enroll API.
My next step will be to figure out how to enroll this email that i fetched in a new workflow using the enroll API.
Jan 14, 2022 5:15 AM
I was able to fetch a contact by adding his email as a property in the deal, and then calling this property from the enrolled deal using my custom code. This way i didn't require any sort of API to fetch the contact email. Stored the email in a variable and will use this variable as a parameter in the enroll API.
My next step will be to figure out how to enroll this email that i fetched in a new workflow using the enroll API.