Hi , @JonathanL82
You may try to use this code :
Lower( Proper( First( Split(ThisItem.'Employee Name'," ") ).Value)& If(CountRows(Split(ThisItem.'Employee Name'," "))=1,"", ".")) & Concat( LastN( Split(ThisItem.'Employee Name'," ") , CountRows( Split(ThisItem.'Employee Name'," ") )-1) ,Value ,"") & "@companyname.com"
Or update your code to this:
Text(
Lower(Substitute(Proper(
If(Find(" ",Label3.Text) <> Blank() ,
Left(Label3.Text,
Find(" ",Label3.Text)-1) , "" )
&
If(Find(" ",Label3.Text) <> Blank() ,
"." , "")
&Proper(Mid(Label3.Text,Find(" ",Label3.Text)+1,Len(Label3.Text)-Find(" ",Label3.Text)))), " ", "")) & "@companyname.com"
)

Your error code will exist when the Name without sapce like this:
AniyahahaZhang
If this reply can help you , you can click mark this reply as solution, thanks in advance!
Best Regards,
Yueyun Zhang