Parse emails into calendar events

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

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:

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.

Exit mobile version