Ben's Bites
← Back
.md

Create an email triage assistant

Automate your inbox with an AI-powered email manager that auto-labels incoming emails for you.

advanced pro
Tool: Lindy AI Topic: AdminTopic: Productivity

2024-12-09

Welcome to the second lesson of our AI personal assistants course!

In this tutorial, we'll walk you through the process of building an AI-powered email manager using Lindy. This assistant will help automate email sorting and labeling, freeing you from your inbox and allowing you to focus on the messages that are the most important.

By the end of this lesson, you'll have set up a system that automatically categorizes and labels your incoming emails based on their content and can even update them as your email conversations evolve.

Steps we’ll follow in this tutorial:

  • Set up the email triage workflow
  • Set up conditional logic for email labelling
  • Define label names
  • Save and test the workflow

Let’s get started!

Step 1: Set up the email triager workflow

To begin, navigate to the Lindy marketplace and click on the "Email Triager" option. This will take you to a pre-created flow in the Lindy flow editor.

__wf_reserved_inherit

The initial setup of this flow consists of an Email Received trigger, a Condition step, and multiple Gmail Add Label steps.

__wf_reserved_inherit

Click on the Email Received trigger to start configuring your workflow. First, you'll need to connect and authorize your Gmail account.

__wf_reserved_inherit
💡 Tip: Lindy integrates with Outlook as well. So for any Gmail/Gcal steps, you can use Outlook as a replacement if you use the Microsoft suite of tools.

There are two important settings to consider for setting up this trigger step:

  1. Observe follow-up emails: Leave this unchecked if you want to apply your labels only based on the contents of the first email in a thread.
  2. Filter events on this trigger: This allows you to specify which emails should be processed by the workflow and which should be ignored.

For our example, we'll leave "Observe follow-up emails" unchecked and set a filter to process emails sent from a specific inbox. This filter is useful for testing, but in a real-world scenario, you might want to process all incoming emails (or exclude a minimal subset).

__wf_reserved_inherit
💡 Tip: If you don't add a filter event, all your emails will pass through this workflow. Consider your filtering needs carefully to ensure you're only processing the emails you want to automate.

Step 2: Set up conditional logic for email labeling

Next, click on the Condition step. The email triage template comes with four pre-set conditions: high priority, question, newsletter, and spam.

__wf_reserved_inherit
💡 Tip: Lindy uses AI prompts for conditional logic, allowing you to write natural language instructions to inform Lindy’s automated decision-making and data routing.

To add a new condition, click the "Add Condition" button below the existing conditions.

__wf_reserved_inherit

We'll add a condition for labeling emails based on customers requesting a meeting.

Sample Prompt:

A potential customer requests a meeting
__wf_reserved_inherit
💡 Tip: You can rename the condition by clicking the three-dots icon in the top right corner of the condition field. We’ll rename ours to “Meeting Request”.

Step 3: Define label names

Next, we need to add the “Add Label to Email” step for our new condition. To do this, click the “Add Step” button coming from your new Condition.

__wf_reserved_inherit

Select the "Perform an action” option from the menu.

__wf_reserved_inherit

Search for “label” in the pop-up and select the “Add Label to Email” Gmail action.

__wf_reserved_inherit

Click on this new action step to set the label name. We’re going to leave the label name to “Auto,” which means Lindy will use intelligence and all accessible context to set the label.

__wf_reserved_inherit

Alternatively, you can define the label manually, by updating the label name field setting to “Set Manually” and entering a label name, like we’ve done here with “Question”.

__wf_reserved_inherit
💡 Tip: You can also set the label name field input to “AI Prompt”, which will let you prompt Lindy with natural language instruction on how you want the label name defined, this provides a bit more control than the “Auto” option. You can learn more about Lindy Action Configuration here.

Step 4: Save and test the workflow

Once you've configured all your conditions and labels, click the "Save" button in the top right corner to save your flow. You can now test your workflow using the "Test" button in the top right corner, or by sending a real email to your connected inbox.

__wf_reserved_inherit

To test, we’re going to send a test email requesting a meeting to our connected inbox.

__wf_reserved_inherit

You should see the email auto-labeled based on the conditional logic you set in your Lindy flow. In our case, it correctly labeled the email as a “Meeting Request”.

__wf_reserved_inherit

Lindy also provides an audit trail within the app. To access it, click the back arrow in the top left corner of the flow screen.

__wf_reserved_inherit

You’ll see the email trigger appear in the task section of your Email Triager Lindy. Each step of the flow will be tracked. You can see the incoming email, the output from the Condition, and the label that was applied to the email. This a great tool for debugging and updating your Lindy Flows.

__wf_reserved_inherit

Nice work! You've now set up an AI-powered email triage system that automatically labels incoming emails based on their content. This system will help you manage your inbox more efficiently, allowing you to focus on the most important emails first.

Remember to periodically review and adjust your conditions and labels to ensure they continue to meet your needs as your email patterns change.

In the next lesson, we’ll extend our automated email management even further with Lindy by creating an email responder assistant.

This tutorial was created by Garrett.

Upgrade to Pro

This tutorial contains Pro content. Upgrade to access the full tutorial and all Pro features.

Get Pro Access