Learn to automatically label urgent emails using Make or Zapier and GPT.

This tutorial will guide users on how to automate the process of categorizing and labeling incoming urgent emails using Make (formerly Integromat) and OpenAI's API.

Instead of manually sorting emails, this automation will use AI to identify and label urgent emails, improving productivity and reducing inbox management time.

You can absolutely use Zapier instead of Make here. We'll be using Make because it's a more affordable alternative to Zapier while offering similar functionality. Feel free to adapt these instructions for Zapier if that's your preferred tool (it should be even more easy than with Make).

What you will learn:

  1. How to create a scenario in Make that triggers when a new email is received.
  2. How to use the OpenAI API to analyze email content and classify it as "Urgent" or "Not Urgent."
  3. How to apply labels to urgent emails in your inbox.

Requirements:

  • Make or Zapier account (a paid plan might be needed for specific features).
  • OpenAI API access with at least $10 credit.
  • An email provider that integrates with Make or Zapier (e.g., Gmail, Outlook).

Create a Make scenario

Log in to Make: Once logged in, navigate to the dashboard and create a new scenario by clicking the “Create a new scenario” button.

Add the Email Module:

Select your email service (e.g., Gmail) from the list of available integrations. Choose the "Watch Emails" module to monitor incoming emails. Also, use this tutorial to properly connect Gmail to Make. It's well explained and should take 5 minutes to do.

Set the trigger to check for new emails in your Inbox folder. Use criteria "All emails" so that it also classifies emails that you've already opened.

If you want Gmail to watch the emails you've already received and categorize them, increase the Maximum number of results to 10 for instance

Finally, before we work on the next step of the automation, make sure you have an email that you qualify as Urgent in your inbox. If not, just send an email to yourself.

The first email should be the only one categorized as Urgent here

Send email content to OpenAI for categorization

Now that Make is set to trigger when an email arrives, we need to integrate it with OpenAI's API to categorize the email.

Create a new module, type "OpenAI" and select Create a Completion. Make sure to connect OpenAI to your make account using your OpenAI API key (more about this here).

Select the model gpt-4o-mini, which is powerful and cheap enough for the use case.

Use the following prompt:

Subject:
Content:
You are my inbox gatekeeper. Your job is to read all my incoming emails and decide whether they should be classified "Urgent" or "Not Urgent".
Urgent emails are anything that's urgent for my business.
Not urgent emails are any sort of automated notification emails, sales emails, newsletters or spam.
Your output should simply be "Urgent" or "Not Urgent". Don't output anything else.

Finally, select the subject and content of the email for "Subject:" and "Content:"

Then, select "Show advanced settings" and modify the Temperature to 0.1. This will ensure the model won't be too creative and will just output Not Urgent or Urgent.

Finally, run the scenario to see if things are working and being labelled properly.

It worked! Let's continue.

Add an urgent label in Gmail

This part is probably the easiest. Head to Gmail and add an Urgent label.

Apply the label

Now, create a new module that you will connect to the OpenAI one. Select the Modify Email Labels action.

Select the Gmail Message Id and the label you will want to add to the urgent emails.

Add conditional logic to only label urgent emails

Since we only want to label emails that the AI has categorized as "Urgent", we will use a conditional logic. Set up a filter between the OpenAI and the Gmail module that will have as a condition to have a result that equals to "Urgent".

Finally, activate the scenario and do a test run.

It has processed the last 6 emails from my inbox. Let's see if the right one was labelled as urgent.

It worked!

Conclusion

By following these steps, you’ve successfully automated the categorization and labeling of urgent emails using Make and OpenAI. This automation reduces the time spent on manual email sorting and ensures that important messages are never overlooked.

Do not hesitate to personalize the prompt and how the scenario works to your needs. There's so many things you could ask the AI to do!

Got an idea for a new feature or tutorial? Help us make the academy even better.

More tutorials like this

Find whether your business idea holds any ground by using Perplexity deep search and the amazing Deepseek R1.
📖
Data Analysis
Perplexity
Deepseek
👨‍🎓
Intermediate
Learn the basics of Sora: what it is, how to get started and a few use cases.
📖
Content Creation
Sora
👨‍🎓
Beginner