Create an email triage assistant
Automate your inbox with an AI-powered email manager that auto-labels incoming emails for you.
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.

The initial setup of this flow consists of an Email Received trigger, a Condition step, and multiple Gmail Add Label steps.
.webp)
Click on the Email Received trigger to start configuring your workflow. First, you'll need to connect and authorize your Gmail account.
.webp)
There are two important settings to consider for setting up this trigger step:
- 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.
- 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).
.webp)
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.
.webp)
To add a new condition, click the "Add Condition" button below the existing conditions.
.webp)
We'll add a condition for labeling emails based on customers requesting a meeting.
Sample Prompt:
A potential customer requests a meeting
.webp)
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.
.webp)
Select the "Perform an action” option from the menu.
.webp)
Search for “label” in the pop-up and select the “Add Label to Email” Gmail action.
.webp)
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.
.webp)
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”.
.webp)
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.
.webp)
To test, we’re going to send a test email requesting a meeting to our connected inbox.
.webp)
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”.
.webp)
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.
.webp)
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.
.webp)
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.