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 15, 2022 1:42 AM - edited Jan 15, 2022 2:14 AM
Hello,
My current scenario requires triggering an email through my custom code. The normal "Send Email" action is not applicable in my scenario as this is a deal based workflow and i am fetching an email address from the deal so i can send him an email.
Noting : I have to use deal-based workflow as my email contains personalized tokens from the Deal object.
So far my custom code is working great. I am able to fetch the email addresses from the enrolled deals and i am storing them in variables in the code.
My question is, is there a way or a specific hubspot API that i can call in my code to trigger a "send email" action from my custom code to the fetched contact ?
(Ideally if contact-based workflow accepted emails with personalized tokens from deals, my scenario would be simple, but i need a workaround for this to work.)
I read about the Single Send API, but how is it possible to pass the to email address and email template id as parameters to this API ?
Thank you in advance !
Jan 19, 2022 6:02 AM - edited Jan 19, 2022 6:03 AM
Jan 18, 2022 8:19 PM
Thanks for the tag @JenWeiss ! A few of my team members have been digging into APIs recently so I'll tag them in to see if they have advice:
@jamesle @jspencerdav
Thanks! |
Jen Bergren |
Sr. Operations Manager |
Remotish -- A HubSpot RevOps and WebOps Agency |
![]() |
Jan 18, 2022 6:43 AM
Hi @ChrisChiha,
Thank you so much for reaching out to us!
I would like to tag some of our experts into this since they would be able to provide further insight @JenBergren , @warrendavey , and @Drew_Cohen.
Best,