Skip to main content

I’m working on a zap that automatically creates activity entries in Clio based on the emails I receive from courts when the clerk updates the record. My goal is to have the activity entries in Clio reflect the date the hearing was held, rather than the date the the record is updated. In most cases, the clerk makes the entries the same the same day as the hearing. In these cases, it’s easy to extract the proper date with Formatter, because it always follows the phrase “Filing Date” in the body of the email. However, in cases where the clerk does not make the entry the same day as the hearing, this doesn’t work. The date the hearing actually took place, doesn’t always follow the same phrase (there are several phrases it might follow.) Is there a way to isolate this date? Is it possible to extract ALL of the dates and choose the earliest of them?

 

I’m not a very sophisticated user. I suspect I’ve been using Formatter to accomplish things that are better done with other tools I’m not familiar with. 

 

Thank you for any help.   

Hi there ​@JLO 👋

Happy to lend a hand here! With Formatter you could use the Text > Extract Pattern action extract all dates using a regex pattern. For example if the date was in the format dd/mm/yyyy or mm/dd/yyyy you could use this Regex pattern:

\b\d{1,2}/\d{1,2}/\d{3,4}\b

And set the Match All field to Yes:

856da93d3508b880dc28191172ee3e8e.png
Which would give you all the dates present in that email (assuming they are in that same date format):

4659ab43148ed7c8bf27356169caa85c.png
You can find out more about how to use regex in Zaps here: Find text with regular expressions in Zaps

Alternatively, perhaps you could use Email Parser as the trigger instead? See Trigger Zaps from new parsed emails to learn more.

If you do give that regex pattern a try and run into any trouble just let me know—happy to assist further! 🙂


Okay, and then how do I choose the earliest of those dates?


Reply