Skip to main content

I’m hoping to follow up on my question in this post:

I think the solution Danvers suggested will work. I just don’t have the knowledge to execute it. What I need is a way to extract an email address from the text of an email. Thank you in advance for any assitance. 

 

This is my original question:

 

“Has anyone come up with a way to automatically forward email replies to Clio matters? Clio provides maildrop addresses for each matter that allow the user to send or forward emails directly to the matter. When I send an email regarding a case I CC the maildrop address so that the matter receives a copy. I'd like to set up a zap so that the response is also automatically sent to the matter. I could also include the maildrop address within the body of the email.” 

 

This is Danvers reponse: 

 

“Hi @JLO!

Formatter by Zapier is a really handy tool for pulling out pieces of text from a field. The most efficient way to do it is by using the Extract Pattern function, which is under the Text events. Extract pattern allows you to use Regex to extract specific parts of a piece of text, Regex is a sort of code that tells an app which pieces of information you need. Using Extract pattern will allow you to pull out the the matter from Clio using only one additional step, but you’ll need to work out the correct regex to do that. If you want to learn more about Regex, I like the site Regexr as it allows you to test different expressions, and a quick Google will find you lots of resources.

Another option is to use a few different Formatter Split Text steps. For example, your first split text step would split email address where there’s a + sign, so you would have just ‘matterXXXXXXXXXXX@maildrop.clio.com’ The second step would split the text at the @ sign, leaving you with just matterXXXXXXXXXXX. 

 

I hope that makes sense, do you think you could use one of those methods to do what you need?”

 

Hi @JLO 

Good question.

Try using Formatter > Text > Extract Email


Thank you Troy, 

 

The problem I’m having with that approach is that the email I need to extract is always the third email in the text of the email body (because the it’s a reply email and the body text always includes the text of the sent message, which includes the From email (me); the To email (original recipient); then, in the Cc: field, the Clio matter email (because I CC’d it when I sent the message)).  If I could split the text immediately before the Clio email it would work. I’ve played around with Split Text in formatter, but I don’t understand it well enough to get it to work.  


Hi Troy, 

Thanks for your response. I tried to respond before, but apparently, I closed the window without posting it. The problem is that the email I need to extract is the third one in the body of the email. My understanding is that Split Text would allow me to divide the text immediately before the email I want to extract, but I can’t figure out how it works.

Happy for any help anyone can offer. 


@JLO 

Help article about using Formatter > Text > Split: https://help.zapier.com/hc/en-us/articles/8496030096013#using-split-text-0-3


Hey there @JLO , were you able to use the split formatter with any success? Let us know, or if you run into any other issues with your setup. 

-Rachael


Hey there @JLO , were you able to use the split formatter with any success? Let us know, or if you run into any other issues with your setup. 

-Rachael

 

Hi Rachael, 

I got it working.

 

I ended up changing my approach. Rather than copying the Clio Matter on the original message, I now just paste it into the email body, and I have one zap to forward all sent emails to Clio and another to forward all responses.

 

Thanks for all the help everyone.  


Hi @JLO!

I’m glad you were able to find a way to make this work, and it sounds like you were able to do it without needing to add an extra step into your Zap, which will save you some tasks - awesome job! 🙌🏻