Skip to main content

Hey, I came across an issue.

I need to make loop, to make experience better for users as they requested.

I need to read e-mail adressess from api: fwd_emails from /tickets or “to_emails” from /conversations


I would like to put it in other place through API but in those 2 fields when I try to read the e-mail I get both name and email and I need only e-mail, which would be ok.

But I cannot find a way to extract what is inside <> I always get name and surname. I tried indexOf, substring, regex replace and everything gives me name and surname not the email address. Is there any way to strip this? Even though in expression builder “test expression” gives me email addres then in the result of workflow I still get name and surname.

 

 

Hi ​@Finski , you can try this expression and check if you are able to extract only the email ID.

 

Expression: 

if( indexOf('{{ticket.fwd_emails}}','<',0) >= 0, substring('{{ticket.fwd_emails}}', indexOf('{{ticket.fwd_emails}}','<',0)+1, indexOf('{{ticket.fwd_emails}}','>',0)), '{{ticket.fwd_emails}}')


Reply