# Custom Code - Get firstname & lastname from email address

**URL:** <https://community.hubspot.com/t/custom-code-get-firstname-lastname-from-email-address/88815>\
**Category:** Data Hub\
**Created:** [September 1, 2023, 3:15pm UTC](https://community.hubspot.com/t/custom-code-get-firstname-lastname-from-email-address/88815 "2023-09-01T15:15:56Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Maciek-Magic](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Maciek-Magic](https://community.hubspot.com/u/Maciek-Magic)\
**Post date:** [October 4, 2023, 12:53pm UTC](https://community.hubspot.com/t/custom-code-get-firstname-lastname-from-email-address/88815/7 "2023-10-04T12:53:11Z")

</div>

Above script is for Node.js and your error have .py extenson which indicates that you are using Python.  
Change Language to node.js (drop down at very top of Custom code window)

---

_[View the full topic](https://community.hubspot.com/t/custom-code-get-firstname-lastname-from-email-address/88815)._
