Skip to main content
Solved

Help with formula to extract first name only from email 'sender' field.

  • July 14, 2026
  • 3 replies
  • 80 views

Forum|alt.badge.img+10

Hi everyone, I hope you can help.

I have an create record automation that enters the full name from the ‘sender’ field in email headers. I then have a formula field to display their firstname only. The formula looks like this:

LEFT(TRIM({FullName}), FIND(" ", TRIM({FullName})) - 1)
 
This is great when the ‘sender’ name field has the format:
“Joe Bloggs” (Firstname[space]Lastname).
 
However, some emails have the ‘sender’ name as “Bloggs, Joe”
(Surname[comma][space]Lastname)
or ... 
“Bloggs, Joe (Acme Ltd)”
Surname[comma][space]Lastname[space][open-bracket)Company[closed-bracket]”
 
I’m wondering if there is an IF formula (or similar) that would be able to deal with these specific differences, allowing me to extract only the first name?
Very many thanks in advance. 🙏🏼

Best answer by TheTimeSavingCo

Here’s a formula you can try:

IF(
{Name},
IF(
FIND(",", {Name}),
REGEX_EXTRACT({Name}, ",\\s*([^\\s(]+)"),
REGEX_EXTRACT(TRIM({Name}), "^[^\\s]+")
)
)

Might also be worth trying a Field Agent for this so that you don’t have to worry as much about weird data breaking the formula too, and my prompt here was ‘Extract name from this field’

 

3 replies

Tag
  • New Participant
  • July 14, 2026

Yes, you can do that. You will need nested "if" statements. In the first "if" condition, use "find()" to search for ""("". If it finds a match, you are in the third option. In the nested "if" statement, use "find()" to search for "","". If it exists, you are in the second option; otherwise, you have the first option.


TheTimeSavingCo
Forum|alt.badge.img+32

Here’s a formula you can try:

IF(
{Name},
IF(
FIND(",", {Name}),
REGEX_EXTRACT({Name}, ",\\s*([^\\s(]+)"),
REGEX_EXTRACT(TRIM({Name}), "^[^\\s]+")
)
)

Might also be worth trying a Field Agent for this so that you don’t have to worry as much about weird data breaking the formula too, and my prompt here was ‘Extract name from this field’

 


Forum|alt.badge.img+10
  • Author
  • Inspiring
  • July 16, 2026

Brilliant, thank you! 
You’re right, I must look into field agents as I’m just a user and don’t quite understand all the syntax in a lot of formulas.