Full transcript
0:00What is happening, guys? Have you ever
0:02looked at your Gmail and just thought,
0:04"Holy crap, this looks horrible." Now, I
0:09created an agent that is basically
0:11automatically sorting my Gmail out. And
0:14by the way, this can work for other
0:16emails as well, but I use Gmail. So,
0:19let's dive into this because there are
0:20some tools that are charging you 20
0:22bucks a month to just do this alone, and
0:26this will solve that. So, we're going to
0:28be using NA10 as always. And here what
0:31we're looking at doing, it's a really
0:32simple workflow. This is why I love this
0:34one. And we're going to be taking a node
0:38from um Gmail, right? And this is the
0:41trigger node. And what that's going to
0:44do is that is just basically going to
0:46look out for any new uh emails coming in
0:51from my email account, right? And so
0:54here we have we have one coming through
0:56coming on uh coming through from there.
0:59What this is then doing is this is then
1:00getting the uh message um basically and
1:04so this is like this is some kind of
1:06like gov summit. So this is like
1:08obviously like a marketing email that I
1:12uh that I clearly have received. And so
1:16what is then happening is it's going
1:18through to this kind of just basic LLM,
1:21right? Where we've got it hooked up to
1:23Claude 3.5. Nice and cheap, not
1:26expensive. And it's a very, very simple
1:29prompt. So copy this prompt now. Take a
1:31screenshot of this, shove that into
1:33Claude, shove that into OpenAI, whatever
1:36you use, and just get it to transcribe
1:38this prompt from the screenshot. But
1:40here we're saying your job is to read
1:41this email and analyze if we should
1:44label this email as the name of the
1:47label is either the words after a b c
1:51etc to respond. And then I've basically
1:54created the labels inside of Gmail. So
1:57one thing that you're going to have to
1:57do for this is you're going to have to
1:58head to your Gmail and you're going to
2:00have to create new labels the ones that
2:04you want to use. So, I've used FYI,
2:07comment, notification, meeting update,
2:10and then marketing. To get the label
2:13IDs,
2:15um, which is what you need here, right?
2:17Label 9, label like 14, blah, blah,
2:19blah. You then just need to go use, um,
2:23Gmail
2:24here. And you basically want to get the
2:28labels, right? And so, um, what that's
2:32going to do, get label info. You can get
2:34that and that's going to basically just
2:36tell you the different types of label
2:37IDs that you can use. But you can also
2:39get that from Gmail as well when you set
2:40that up. And then you just want to input
2:42that and map that across like I've done
2:44here, which is like the comment ID
2:47equals label here. And I've then given
2:49it the prompt on what that basically
2:51would look
2:53like. This then outputs it in a certain
2:56structure. The structure is label
2:58marketing label ID XY Z where it then
3:03updates the actual label on Gmail's end,
3:07right? And so it basically then puts the
3:08label name and the label ID or the me
3:11sorry the message ID and we're grabbing
3:14the message ID from uh the previous
3:17step, the previous Gmail node. So then
3:20what happens is this is then
3:22automatically updating any new email
3:25that I actually
3:26get with a label. And we can see like
3:30I'm running this one, right? Like look
3:31at all the like this is all from today.
3:33These are all of the emails coming in.
3:35We had some errors back here. But it
3:37reruns because I've got it rerunning if
3:39anything errors. And that will then
3:41automatically update and sort my Gmail
3:43inbox. Which means when I go to my
3:45inbox, I just go through my labels and
3:48only look at the ones that are important
3:49to me.