Intro · 3:38
What we're building
An inbox agent that classifies and labels incoming emails.
- An agent that classifies and labels email.
- Different action per category.
- Built in n8n.
| Category | Action |
|---|---|
| Support | Auto reply |
| Billing | Notify team |
| Sales | Draft |
| Promo | Mark read |
Do this in your own tools, step by step. Ticks are saved on this device.
What does the agent do?
Classifies and labels email.
Tool?
n8n.
0:00 All right, so the first thing we're going to do is actually wireframe this out just so we're all completely aligned on the way that this system is going to work before we actually hop into NIDN and start building. So, I'm going to take you from zero to having an inbox agent in this video and we're going to use just three tools. Nitn is where we're going to be building this actual system. You can get started on a 14-day free trial using the link in the description and then after that it's like 25 bucks a month.
0:23 We're going to be using Gmail today specifically, but if you do have Outlook or a different email provider, you can follow along. It just might not be the exact same clicks at the exact same spots. And then we're going to be using a tool called Open Router, which is where we actually connect to different AI models. So, like I said, we're going to be wireframing this out, which basically means a visual diagram of what the system is.
0:45 And this is something that I strongly encourage you do before you build any sort of system. You have to have all of the steps of the process mapped out clearly before you actually start building. And this is something that I teach in my full course as well. If you want to check that out, the link will be in the description. Anyways, every single process starts with some sort of trigger. And our trigger for this workflow today is going to be a Gmail trigger.
1:07 So you can see that we have Gmail. We're saying it's a trigger. And the trigger action is whenever we get a new email in our inbox. So that's going to kick off the rest of this workflow. So when that email comes in, it's going to have information. It's going to have stuff like who sent this email, what time was it, what's the subject, what's the body, and then some other metadata as well. And so, we're going to feed this Gmail information into an AI classifier node.
1:30 What we want the AI classifier node to do is it's going to look at the subject and the body. So, I'm going to real quick just say basically the incoming information will be the subject of the email and the body of the email. And then it's going to basically read through that and understand what type of email is this. And so for the sake of today's video, we're going to do four generic categories which are customer support, finance and billing, high priority, and promotion.
1:52 So we're basically going to explain to this AI classifier how to interpret the emails as one of the four. And then it will shoot that email string down into one of these four categories. So then it's up to us to basically handle what goes on the rest of that flow. So let's start with just one example. Let's say we get an email. the AI decides, okay, this is a customer support related email, so I'm going to send it up here down this first branch.
2:14 So maybe we know if we get a customer support email, we want to go ahead and actually label it in Gmail as customer support and keep that in this specific inbox or that specific folder. Next, we may actually want an AI agent to go ahead and send off a draft or even just a reply to this person. So we can basically teach this AI agent how to respond to customer support related inquiries. And then what we can have it do is shoot off a reply right back in Gmail itself to whoever sent that initial email that triggered that workflow back over here.
2:38 So for customer support, let's just say that's what we're doing. So the idea is based on what category of email comes in, you're in full control of what you want to happen. We probably want all of them to have some sort of label where it gets put in that category right away. But then from there, I don't know if we want to instant reply. I don't know if we want to just create a draft. I don't know if we even maybe just don't want to respond at all and just notify someone else about this inquiry.
3:02 What do you want to happen? That's what you have to set up here. So when we get into end to end, I'm going to show a few different things that could happen after each path. But basically, an email would come in, it would get classified. Let's say it gets classified as high priority, then we would take the next steps only in that high priority branch. But if a promotional email comes in and gets classified as promotion, then maybe a different order of operations would happen down here.
3:23 So now that we've seen a wireframe and we understand the system that we're building, let's actually hop over to end, open up a new workflow, and go ahead and get started here. All
Get the other 9 chapters, the exam and your certificate for LinkedIn, plus all 700+ AI courses.