This is a fairly easy automation, but it remains one of my all-time favorites. The problem with email that sometimes you receive an information that you will only need in few days or few months. You can of course go back to your mailbox and search for it, but there are better ways.
In my case, I get delivery from a local farm every week. The content of the box varies slightly and the farm typically emails clients few days in advance to announce what will be in the next box. I wanted to parse only the important information (i.e., delivery content) and put a new event on a family calendar for the day of the delivery to make sure everyone knows what is coming.
What you will need for this recipe
- MailParser.io account – I have tried a number of email parsers and this remains to be my favorite one. Free account gets you 10 inboxes and 30 processed emails per month.
- Zapier account – The ultimate automation machine that can pull separate web systems together. Free account gets you 5 zaps (automations) and 100 tasks per month
Parsing the email
First, you need to create a new MailParser mailbox and forward a sample email. This step should be fairly quick. When your sample email arrives, you can start setting up parsing rules. If your message has a fairly consistent structure every time, MailParser makes it very easy to extract exactly the part you want.
In my case, I knew the target text is usually preceded by the same expression, so I used Text match: after
and Text match: before
filters to find that spot. These filters essentially tell MailParser to pick everything after and before a certain word or sentence. Finally, I wanted to remove extra lines and have a nicely formatted output, so I used the filter Remove empty lines
in the final step. You can see the final output below.
MailParser and Webhooks
If you are familiar with webhooks, you do not have to use Zapier for the second step depending on your use case. Mailparser includes webhooks functionality directly in the service and does not charge extra credits for executed webhooks. I was able to format a webhook that posts the output directly to Slack and WordPress.
Setting up the Zapier workflow
Now you should be ready to set up new zap. First, connect Zapier with MailParser.io under My Apps tab and if you have not done so, make sure your calendar provider (in my case Google Calendar) is connected as well. Second, create a new zap:
- Your trigger app will be MailParser and the trigger event is called New Email Parsed. Next, choose your mailbox and let Zapier load a sample output.
- Your action app will be Google Calendar and the action event is called Create Detailed Event. Choose your account and destination calendar.
- Now you can include your variables from MailParser in the event summary, description or even in the start date and time. Zapier lets you edit essentially every field that Google Calendar has available.
- Finally, send the test data and watch for your calendar event to pop up.
As you can see, this is a fairly simple automation using existing free online tools. Are you using MailParser for any of your automations? I would love to hear more about it in comments.