Help Center
How can we help? 👋

How to set up an email classification workflow

Getting your emails automatically tagged using Levity’s smart Classify Block

This guide will show you how to set up an email classifier workflow using Levity, Zapier, and Gmail. The idea is to automate the process of classifying incoming emails using AI, which can save you time and effort.

Step 1: Creating a Classified Block in Levity

The first thing you need to do is create your classified block in Levity. If you don't already have an account, you need to sign up first.

  1. Go to Levity and create a new AI block.
  1. Select "Classify" block.
  1. Define the categories you need. In this example, we're using three categories: A, B, and C. Remember to give each category clear context and criteria in the instructions box, as this is what allows the AI to know what the matching criteria is.

Prompt inspiration

Need a little help knowing what to write? Adjust this sample prompt as needed.

Instructions for Email Classification Blocks

Please classify the incoming emails into one of the following categories based on the content and context of the message:

  • Customer Service Enquiries - These are emails from customers seeking assistance with a product or service we provide. They may contain questions about usage, complaints about a problem they're experiencing, or requests for additional information about our products or services.
  • Business Correspondence - These emails are related to the daily running of the business. They may include emails from partners, suppliers, or team members discussing business operations, meetings, or general business updates.
  • Marketing & Promotions - These are emails that discuss marketing initiatives, promotional offers, or advertisements. They may also include newsletters or updates about our products or services meant to attract or retain customers.

Any email that does not clearly fit into one of these categories should be marked as 'Uncategorized'.

Step 2: Connecting Your Block to Zapier

Once you've created your block, you need to connect it to Zapier.

  1. Click on the "Connect" tab in Levity.
  1. Select "Zapier".
  1. Accept the invite.

If you don't already have a zap set up in Zapier, you'll need to create one.

Step 3: Creating a Zap in Zapier

Now it's time to create your zap in Zapier.

  1. In Zapier, choose the trigger as "New email in Gmail". This means that anytime a new email comes into your Gmail account, the zap will be triggered.
  1. Authenticate your Gmail account with Zapier.
  1. Set the trigger as anything that hits your inbox. This means that any new, unlabeled email will be processed by the zap.

Step 4: Adding a New Step with Levity

Once you've set up the trigger, you need to add a new step with Levity.

  1. Click the "+ Add a step" button in Zapier and search for Levity.
  1. Select "Text classification".
  1. Authenticate your Levity account with Zapier.
  1. Choose your classification block that you set up in Step 1.
  1. Input the email details (subject, body, from address) you want Levity to classify.

Step 5: Applying Labels to Emails with Paths

The last step is applying labels to your emails. For this, you'll use the paths feature in Zapier. You might find it quickest to set up the first path, and then clone it and adjust it for the other labels.

  1. Create paths for each label in Zapier. In this case, you'd create three paths: one for label A, one for label B, and one for label C.
  1. Set up the rules for each path. The rule is what makes an email go down a particular path. For example, for path A, the rule might be "continue if label value from Levity exactly matches A".
  1. Set up the action for each path. The action is what happens if an email meets the criteria of a path. In this case, the action is to add a label to the email in Gmail.
  1. Authenticate your Gmail account with Zapier.
  1. Select the label you want to add from a drop-down list of your Gmail labels.
  1. Choose the email you want to label by its ID.

And there you have it! You've now set up an email classifier workflow using Levity, Zapier, and Gmail. Just remember to exclude your sent emails if you're doing a generate step. This will prevent your zaps from being triggered by emails you've already sent.

Did this answer your question?
😞
😐
🤩