CMS Development

jgranados
Member

Send email from inside custom code action

SOLVE

Hello, 

 

We created a custom code action which is used in different workflows in our production environment. Every time this scripts fails we want to notify some users at HubSpot about it. Is there a notification mechanism we can use for it from inside a custom code action? Can we send email messages from inside a custom code action?

 

Thanks in advance for your help with this!

 

0 Upvotes
1 Accepted solution
jgranados
Solution
Member

Send email from inside custom code action

SOLVE

We implemented a workaround by creating and connecting to an external service which sends the email.  I have created an "idea" suggesting HubSpot to allow using AWS S3 SES from inside the custom code actions in order to send emails: https://community.hubspot.com/t5/HubSpot-Ideas/Send-email-from-inside-custom-code-action/idi-p/42092... 

View solution in original post

0 Upvotes
5 Replies 5
MeganLegge
HubSpot Product Team
HubSpot Product Team

Send email from inside custom code action

SOLVE

Hi @jgranados ,

 

My name is Megan and I'm a product manager for the workflows tool. Your post caught my attention, because we've just launched a new type of branch in workflows, that lets you branch on outputs from previous workflow actions, called Simple Branch. This means, you could add your own unique outputs to your custom code action for error handling, and/or leverage our default action output for the success/fail state of an action. You could use this branching to split off the workflow and go to a notification action next, if there's a failure.  If you'd like to check this feature out and don't yet have access, please send me a message with your HubID and I'd be glad to have you try it out and give feedback.

 

Best,

Megan

jgranados
Solution
Member

Send email from inside custom code action

SOLVE

We implemented a workaround by creating and connecting to an external service which sends the email.  I have created an "idea" suggesting HubSpot to allow using AWS S3 SES from inside the custom code actions in order to send emails: https://community.hubspot.com/t5/HubSpot-Ideas/Send-email-from-inside-custom-code-action/idi-p/42092... 

0 Upvotes
CP-BWG
Contributor

Send email from inside custom code action

SOLVE

@jgranados ming sharing a screenshot?  I haven't be able to find a way to do it in a workflow - they do not have ability to select the code execution result as an if/then branch.  We have tried to do things like create a custom property, set that property with the copy value function, then trigger... but what a hassle.  You just doing it inside the code as another API call?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Send email from inside custom code action

SOLVE

Cosnider it upvoted 👍

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Send email from inside custom code action

SOLVE

Hello @jgranados .

Throwing @kierana at this for some of his sage advice 😀

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes