How to analyse and filter high volume emails using automation
How do I automate email analysis?
In this tutorial we show you how to automate email analysis using custom mailhooks in Make.com. The Make scenario used in this tutorial analyses emails sent by the "Help a Reporter Out" mailing list. The Make scenario will look for a keyword match and if a match is found will message us on Slack.
We walk you through each step of the process including how to create a custom mailhook in Make, how to use regular expressions to split the text and then use Make's inbuilt filter to split the text within the body of the emails. By the end of the tutorial you will have a better understanding of how to use automation to analyse emails using Make.com.
Flow
How to create an automation with a custom mailhook using Make.com
Resources
The final Make scenario will have 3 steps and look like this:
- The first step is the custom mailhook - a custom mailhook creates a unique email address that triggers this scenario each time an email is received at that address.
- The second step will be to parse the body of the email - splitting the text into bite-size chunks and then checking for keywords.
- The third and final step is to send a message in Slack alerting us to anything of interest within the email.
Step 1: Create a custom mailhook using Make.com
Add a Custom mailhook node in your scenario by selecting the node from within the Webhooks nodes.
In the Custom mailhook node copy your unique email address. Now get emails
Step 2: How to parse emails in Make.com
Create a Text Parser node using the Match Pattern transformer. This allows us to use regular expressions to search and split text into manageable chunks.
Your node settings should be similar to the one below. In the pattern match we are simply splitting on a string of hyphens as this is how the Help A Reporter Out emails are composed - each request for help is separated by a string of hyphens like this: -----------------------------------.
So for simplicity we split the text with the following pattern:
1(-----------------------------------\n)((.|\n)*?)(?=\n-----------------------------------\n)
After this we use Make's inbuilt filters to check for keywords.
Step 3: How do I get Make.com to message me in Slack?
Now setup a Slack node and use the output of the Text Parser node to send yourself the details of the email.