# Workflow Custom Code - Email Address Validation

**URL:** <https://community.hubspot.com/t/workflow-custom-code-email-address-validation/49233>\
**Category:** CRM\
**Tags:** developer, workflows, crm, how-to\
**Created:** [January 5, 2022, 8:09am UTC](https://community.hubspot.com/t/workflow-custom-code-email-address-validation/49233 "2022-01-05T08:09:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisChiha](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/chrischiha/32/90510_2.png) [@ChrisChiha](https://community.hubspot.com/u/ChrisChiha)\
**Post date:** [January 5, 2022, 8:09am UTC](https://community.hubspot.com/t/workflow-custom-code-email-address-validation/49233/1 "2022-01-05T08:09:29Z")

</div>

Hello,

I need to use the custom code action in my workflows to validate email addresses before triggering an email to the contact.

I was going through the knowledge articles on the Hubspot website, and saw that this is possible.

> **[Data Hub Use Case Library](https://www.hubspot.com/data-hub-use-cases)**
>
> A collection of use cases for across data studio and custom code actions in Data Hub.

=\>

> <https://gist.github.com/jackcoldrick90/cfdceb271cf14be70e441c6ee79849ef/revisions>

I tried to implement it on an existing contact in a certain static list, but when i add this custom code to my workflow, it is throwing an error:  
_The custom code threw an error. This could be due to a syntax error in the code, an error being returned by an API, or some other issue with the code. Check the logs in the event details for more information._

Would appreciate some assistance on this as this is my first custom code attempt within my workflows.

Thanks

---

<div class="post-metadata">

**Author:** ![A-Cardenas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/a-cardenas/32/8436_2.png) [@A-Cardenas](https://community.hubspot.com/u/A-Cardenas)\
**Post date:** [January 5, 2022, 8:57pm UTC](https://community.hubspot.com/t/workflow-custom-code-email-address-validation/49233/2 "2022-01-05T20:57:33Z")

</div>

Hi Chris!

Since Kickbox is a paid service, I believe you would need to create an account and an API key with them in order to use the workflow javascript action that you linked above from git.

Here is their pricing/API connection page with more information: [Email Verification API: A Real-Time Email API Service for Developers Kickbox | Kickbox](https://kickbox.com/email-verification-api/)

If this helps, please mark it as a solution. If not, please let me know what further questions you have!

Thank you!

Alicia
