Emails on Autopilot with Make
Make, formerly known as Integromat, is an established low-code platform that makes it easy to connect disparate systems and automate a ton of mundane tasks. I am fairly new to this space and if you are like me you would probably appreciate a nice example. This post is a step-by-step tutorial. I did my best to strike the right balance between complexity and clarity. I encourage you to follow along and experiment. You will be rewarded by having a fairly good idea how to leverage the platform for your own benefit. Be it automation of your day-to-day routines or bespoke software development.
TL;DR
I get it, there is no time to waste. Well, I happen to have recorded the whole process, as I usually do these days. Just please give me thumbs up when you are done watching. Thank you.
The complete scenario is available on GitHub.
What are We Building – aka The Problem?
I do a ton of online purchases. Who doesn’t? I noticed many of the templated emails I get from e-shops carry a fairly clear structure. With just a little bit of effort it’s easy to extract valuable information, such as a monetary amount, name of the product, delivery status etc. Attachments are precious too. They are typically invoices or order confirmations. I trust you keep your mailbox organised. So do I. However, imagine that at some point you would want to get a clear overview of all your purchases in the past quarter or so. Even if it’s all neatly arranged in folders in your mailbox, in order to get the full picture you still need to revisit all your emails one by one. That’s a waste of your time.
We are going to build a workflow, in Make’s terms it’s a called a scenario, which intercepts incoming emails and saves them as records to a spreadsheet. Attachments, if any, are downloaded, compressed into a single bundle and put to a designated folder on your Google drive. Obviously, we also want to create a link to the relevant record in the spreadsheet for an easy access to invoices or whatever the attachment might be.
Pieces of the Puzzle
Integration really feels like piecing a puzzle. It’s good to know all the moving parts and create a plan how to plug them in. Today we only stick to a single platform, Google. Here is a rough outline of the steps necessary to build the project:
- Sign up a free account with Make
- Register a new project on Google Cloud Platform
- Authorise access to your Gmail / Spreadsheets / Google Drive
- Intercept and parse incoming emails
- Simultaneously also download attachments and bundle them up
- Append parsed emails as rows into a spreadsheet
- Upload bundled attachments to Google Drive
- Update the relevant record in the spreadsheet with a link to the uploaded bundle
The Tedious One – Google Cloud Platform
I know, it’s annoying and there is no way around it. Though I feel Google have done a pretty good job when it comes to administering resources on GCP. It feels intimidating initially, but when you have done it once you are fine the next time around. Google takes privacy issues seriously and the protocol is complicated for a reason. Low-code, no code or a lot of code, if you prefer a full control, makes no difference. You are going to ask Google to allow a third-party app to access your private data. That’s a big deal and there is a fair amount of configuration you need to do in order to make it happen. Don’t worry, I will guide you through the process. That brings me to the next section ..
The Rest is Easy – Just Follow the Video Tutorial Step by Step
If I were to put all it takes into this post it would be a loooooong and boring read. Since you and I strive for productivity, let’s be pragmatic. I’ve broken the video tutorial to sections so that you can easily replay them in isolation as many times as you please. Hope the visual aid gives you all you need to succeed with the project.
Before I leave you to it, please let me know your questions or thoughts in the comments section below. If you like the video, please give it thumbs up. Much appreciated.
The Video Tutorial
Before you start, register an account with Make. There’s a free plan, no credit card required.
The complete scenario is available on GitHub.
- Review the final result prior to starting the project: 00:00 – 00:25
- Watch me explain what we are going to build: 00:25 – 01:45
- In Make, create a new scenario and get a brief on authentication: 01:45 – 03:40
- Moving onto the Google Console, learn how to create a new project: 03:40 – 04:51
- Enable Gmail API so that you can access you mailbox later on: 04:51 – 05:27
- Create a user consent screen, so that the user can grant access later on: 05:27 – 06:29
- Define what data you want to access and manipulate with Gmail API: 06:29 – 07:18
- Add a test account so that you can verify your solution before going live: 07:18 – 07:45
- Google Console configuration summary: 07:45 – 08:19
- Create app credentials. The app authenticates to Google behind the scenes: 08:19 – 10:23
- In Make, watch me connect the test account’s mailbox and go through the consent screen: 10:23 – 11:17
- Learn how to filter incoming emails and fetch your first email via Make!: 11:17 – 12:14
- Parse the email’s subject and body in order to extract useful information: 12:14 – 14:39
- Organise your Google Drive and create a spreadsheet. Also, configure a new API in Google Console: 14:39 – 15:33
- In Make, stream the extracted data into the spreadsheet: 15:33 – 16:41
- In Make, download email attachments, bundle them and upload the archive to Google Drive: 16:41 – 18:07
- Link the downloaded archive to the corresponding row in the spreadsheet: 18:07 – 19:20
- Thank you and summary: 19:20 – 20:18
Learning Resources
What the heck is OAuth?
Authentication is by far the most complicated piece of the puzzle. It’s good to understand how it works and why is it important to use standards like OAuth.
- I feel this older post by Okta provides a nice explanation that’s not too overwhelming.
- You can also check Make’s official instructions on the subject.
New to Make?
No problem.
- Find out how Make works.
- Assess if it makes sense for you to use it.
- Check the pricing. I personally appreciate the free plan without any commitments.