Create scenario that splits name and updates Hubspot contact

Hi all.

I am currently creating a scenario which is running successfully, but doesn’t seem to be working.
On the website, there is an input called “full name” - once submitted this contact is then added to Hubspot, however the full name is added to the Hubspot ‘first name’ field.
To fix this, I am looking to split the first name and second name and then update the contact in Hubspot accordingly.

I also only want this to trigger when a user submits a form (new contact is added to Hubspot). I have added my current setup below, any help greatly appreciated!

2 Likes

Hi @abm

To split the name, you can use split() function like below:

Apart from this, you need some correction in the scenario, you should use “search for contacts” module in place of “search for CRM objects”. Also, make a habit to add filters for failsafe.

Like if you are mapping an id in next module, you should use filter “if “id” exists”. And, I guess you will be needing to create a contact if the contact does not found.

Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation

1 Like

Hello @Msquare_Automation — thank you for your response.

Currently I am splitting the name like the below:

I have updated to search contacts also in the next step, but currently no luck.
Thanks, Adam.

1 Like

Thank you for the info. When a person has more then 2 names this scenario would not work properly. Therefore I use the below solution for splitting a hypothetical name “John Sebastian Doe” as an example.

Hey @abm

What issue are you facing now??? Is it with middle name?? if so, you can use remove() function in first name bewteen first() and split(), In remove(), put what you are putting in last name. You should be able to get.

Regards,
Msquare Automation - Platinum Partner of Make
@Msquare_Automation