Full transcript
Full Agent Framework
0:00By the end of this video, you will have
0:01a full framework for using AI agents to
0:04automate any task in N8N. And to whoever
0:07is watching this, I guarantee that right
0:09now you have tasks that an AI agent can
0:11do both better and faster. And the
0:14longer that you delay learning how to
0:16build these agentic systems, those
0:18wasted hours will begin to pile up, and
0:21it's actually holding you back from your
0:22growth. Now, this framework fixes that,
0:25and it's a system that I use in order to
0:26implement AI agents into my business and
0:29my personal life. Now, this is the
What we will build today
0:31system that we are going to be building
0:33today. I'm not only going to show you
0:35how to build this system that's actually
0:37going to provide you immediate value,
0:39but I'm also going to give you a
0:40framework for developing systems like
0:42this whenever you want. And so, let me
0:45show you how this works. What this
0:47automation does is it watches for new
0:48YouTube videos on all of my favorite
0:51channels, AI Foundations, Productive
0:53Dude, and N8N. What happens is whenever
0:56one of these channels uploads a new
0:58video, it automatically gets put into a
1:01database. And then in a matter of about
1:0310 seconds, it grabs the transcript of
1:06that YouTube video that just got
1:08uploaded. It runs through an AI agent,
1:11which has access to my goals, what I'm
1:13doing in my personal life, what I want
1:15for my business, and then that agent
1:17makes a decision. Should I watch this
1:20video or should I not? Is it signal? Is
1:22it noise? And then it sends me an email.
1:25So, for instance, I could execute this
1:27workflow and send in some test data from
1:29my YouTube channel. As you can see, it's
1:30going to get that transcript, and in a
1:32matter of seconds, my AI agent is
1:34already reading that transcript. In the
1:36instructions of my agent, it has the
1:38goals of my business and of my life, and
1:42it's going to make a decision. Should I
1:43watch this or not? I no longer have to
1:45get on YouTube, because what I can do is
1:48I can put the people who are actually
1:49providing value on a feed trigger, so
1:53that whenever they upload a video, it
1:54gets the transcript, and then the agent
1:56decides, is it even valuable enough to
1:58watch? And it sends me an email just
2:00like that. Now, let's go take a look at
2:02my email. As you can see, just now it
2:04gave me an email, new video from AI
2:06Foundations. It gives me a quick summary
2:08of the video. It gives me an ROI score
2:11of a medium, and it gives me the reason
2:13it gave me that score. So, ROI, if
2:15you're not familiar, means return on
2:17investment. What is my return on
2:18investment after watching this video? It
2:21says it's medium, and then it gives the
2:22reason. And then it gives me the link to
2:24the YouTube video. So, I don't even have
2:26to go to YouTube to find it. My
2:28automation puts it in the database,
2:30grabs the transcript, and then my agent
2:32decides on my behalf. And it's not even
2:34like it's deciding on my behalf, it's
2:35just giving me the option and laying
2:37everything out with the summary, the ROI
2:39score, and the reason. Now, in this
2:41video, I might be moving fast, and
2:43that's because I want to teach the
2:44framework, not necessarily how to build
2:47the AI agents themselves. Now, you're
2:49going to be learning things, especially
Access our 40+ video agent course
2:50if you're new, and I'm going to break it
2:52down as simple as possible. But, if you
2:54want a full 40-module agent building
2:56course, I recommend joining our AI
2:59Foundations community, because in the
3:00classroom, if you scroll down, we have
3:02an entire course on building agents with
3:04N8N. And this course goes over literally
3:07everything that you need to know in
3:09order to build out these agentic
3:11workflows completely by yourself. We
3:14have over 40 modules in here,
3:16drag-and-drop templates. And
3:17furthermore, if you ever get stuck, you
3:19can go to the support category and type
3:22in a question and then a description of
3:24your problem. One of our five team
3:26members, including myself, will help you
3:28out, giving you custom Loom videos and
3:31custom guides in order to get you to
3:32where you need to be and solve any
3:34technical issue that you have with
3:35building agents. So, if that interests
3:37you and you're sick of going on YouTube
3:39to try to learn all of the techniques,
3:41and you want one structured spot to do
3:43it, I left a free video in the
3:45description below that goes over
3:47everything that our community has to
3:49offer. I just mentioned a couple of the
3:50things, but I recommend watching that
3:52after this video to see if you would be
3:54a good fit for our private community of
3:56AI enthusiasts. Now, the beautiful thing
Understanding inputs
3:58about this framework is it allows you to
4:01take any input in your life and automate
4:04it and let the agent make the decision
4:06for you. So, life is full of inputs,
4:09especially nowadays. I mean, right now
4:12you're watching a YouTube video, which
4:13is an input into your mind. You're
4:14deciding, should I implement this?
4:16Should I not? What do I need to learn
4:17from this? Which, as you saw in the
4:19beginning, we're going to learn how to
4:21actually make a system that works for
4:22us. We have emails, we have notes, we
4:25have travel information, bank
4:26statements, subscriptions, team
4:29communication. We have news updates that
4:31we're deciding constantly, should we
4:33apply this to our life? Should we care
4:34about this? Should we not? We have ideas
4:36that are slipping our mind because we
4:38just have so many things going on, phone
4:40calls that are coming in, Zoom calls we
4:42have to get on, direct messages we have
4:44to answer to, invitations we have to
4:45answer to. Everything in life is an
4:48input. And chances are you are usually
4:51the one making decisions on all of these
4:53inputs. You've got to make the decision
4:55whether to apply the knowledge. You have
4:57to make the decision on how to respond
4:59to certain things. And by the time all
5:01of these decisions and all of these
5:02inputs in your day-to-day operations are
5:04complete, you've already used up 80% of
5:06your mental bandwidth on the day, with
5:08decisions that could have just been
5:10completed with AI in the first place. A
5:12lot of the time, you don't even need to
5:13be the one making decisions. AI can make
5:16the decision for you. And I'm going to
5:17show you the system that allows AI to do
5:19that for you. And that does not mean
5:21that you're completely removed from the
5:23loop, by the way. I like looking at AI
5:25as an enhancement to your existing
5:27workflows. That's where it thrives best.
The Agent System Framework
5:30And so, the system is pretty simple. We
5:31take our inputs, we put them into a
5:34database with an automation, and then we
5:38train an agent on three things. Number
5:40one, how do we use the database itself?
5:43The agent needs to understand the
5:44database and the information that it has
5:46access to. Number two, the agent needs
5:48to understand our goals and the reason
5:51for automating this. Like, why are we
5:53automating information into the database
5:55in the first place?
5:57And number three, we need to give some
5:58instructions and guidelines for how to
6:00respond. And so, with all three of these
6:02things, the agent can begin to make
6:04decisions on our behalf that we don't
6:06need to be there for. We can just say
6:07yes or no. We don't have to think about
6:10all of the process that goes into making
6:12a successful decision, because we can
6:14set that up in the agent. And I'm going
6:16to show you how to do this with YouTube
6:17videos. We're going to automate YouTube
6:18videos into a database. We're going to
6:20grab the transcript during the
6:22automation. We're going to feed that
6:24transcript to the agent. And then that
6:26agent is going to use these three
6:28things, and it's going to help me make a
6:30decision. It's going to score the video
6:32based on the transcript, and it's going
6:33to say, "Drake, should you watch this or
6:36should you not, based on the goals that
6:38you've given me?" And I've done this
6:40with everything. I've done this with
6:41Zoom call transcripts. So, I've gotten
6:43summaries of my meetings. I've done this
6:45with ideas to where I set up Siri. All I
6:47had to do was say, "I have an idea." And
6:49what it did was it transcribed my voice,
6:52sent it to a database, and all my ideas
6:54were stored in that database. You could
6:56do this with anything in your life, but
6:58I recommend starting with something that
6:59we're all doing right now, which is
7:00watching this YouTube video. Step number
Update your n8n
7:02one in all of this is update your N8N to
7:04the latest version so you can get the
7:06data tables field right here. In order
7:09to do that, you can open up your
7:10sidebar, go to the admin panel. When
7:13you're in the admin panel, go to manage.
7:16And here, where it says N8N version,
7:18make sure that you're on the latest
7:19stable. After you've done that, we can
Creating your Data Table on n8n
7:21go to data tables, and we can create our
7:23database, the thing that we're going to
7:24be sending all of the YouTube
7:26information to. And I'm going to click
7:28in the upper right-hand corner. I'm
7:29going to hit this drop-down and select
7:31create data table. And this is just like
7:33creating a Google Sheet. It's very
7:34simple. I'm going to call this YouTube
7:36testing, and then hit create. And from
7:39there, I'm going to create my fields.
7:40So, I'm going to add all of the fields
7:42that we need,
7:43starting off with video_title,
7:46so we know the title of the video. We
7:48can leave these two created fields for
7:49us.
7:50I'm going to type in URL, author.
7:53I'm going to type in publish_date,
7:56and I'm going to make the type a date
7:58time. Add column. And I'm also going to
8:00have a transcript field, so I'll add a
8:02column and type in transcript. And then
8:04I'll hit add. We can leave that a
8:06string. And now our database is ready to
8:08throw information to. So, first we need
8:11to create the automation that actually
8:12watches my YouTube channel or any other
8:15YouTube channels that I want to have on
8:18an automated timer, so that whenever
8:19they upload, I can get notified if the
8:22video is actually valuable to me. And
8:23this is putting me and putting yourself
8:26not at the whims of the algorithm, but
8:28it's giving you control over what you're
8:30consuming. That's a big problem right
8:32now is we don't even have control over
8:34what we consume. They throw videos on
8:36our feed, and our mouths start watering
8:38because we just want to watch them. So,
8:40adding this in your day-to-day system
8:42will already save you so much time. So,
Creating the YouTube RSS trigger
8:44in the upper right-hand corner, I'm
8:46going to hit create workflow. I can
8:48rename this to like YT automation test,
8:52whatever. You can name it whatever you
8:53want. And the first step we need to add
8:56is an RSS feed trigger.
8:58And remember, we're building the
8:59automation right now and automating data
9:01into our database so our AI agent can
9:03use it. So, I'm going to add that first
9:05step and type in RSS. And where it says
9:08RSS feed trigger, you want to select
9:10that. And what this does is it
9:12automatically pulls in a feed every
9:16minute, hour, day, week, month, any
9:19custom time that you want. So, I can
9:20just watch this
9:22every minute, so that right when
9:23somebody uploads a new video, I can get
9:25it. Or if I want, I could also just do
9:27every day. And in order to get YouTube
9:30channel feed URLs, what you need to do
9:31is you need to go to the YouTube channel
9:33you want.
9:34For instance, if I'm on N8N, I want to
9:36go to their channel and select their
9:38videos tab. And then you want to
9:40right-click anywhere on the screen, and
9:42then hit view page source. And it will
9:44bring up a screen that looks like this.
9:46Once you're here, you want to hit
9:47command or control F on the keyboard,
9:50and it will pull up this little search
9:51bar for you. You want to type in quote
9:54RSS in all caps, and then another quote,
9:57and that will pull you straight to this
9:58link. You can just copy that link like
10:01this, and then go put it into your RSS
10:03feed trigger. So now,
10:05if you put that feed URL, it pulls in
10:08the channel ID for you, which is
10:09important, because now it's watching
10:11that channel every day to find the
10:13latest content that it's posted. So if I
10:15hit fetch test event, it's going to pull
10:17in N8N's latest YouTube video. So if
10:20you're having this feed run every
10:22minute, it's going to be basically
10:24real-time pulling in of data to your
10:27workspace. And so now I'll rename this
10:29N8NYT,
10:31and now I'll go do this for a couple of
10:32other channels.
10:34And this is the step where you want to
10:35go through and you want to pull in all
10:36of the channels that you like watching
10:38that you get value from. And so now I
10:40have three YouTube channels. Let's say I
10:41like watching these. The next step is I
10:43need to create a node that combines all
10:46of their data into one unified field. So
10:49I'll go to the upper right-hand corner,
Combining Data with Set Node
10:50I'll type in set, and I'm going to use
10:52the set node to map all of these no all
10:56of these trigger nodes to, so they all
10:58can be named the exact same thing. So
11:00I'm just going to connect all of those
11:02triggers to this set node, and then I'm
11:05going to start naming the fields. So you
11:07can get some test data in by just
11:09executing one of the workflows, and then
11:11double-clicking, and then you can find
11:13it, and then just start dragging in the
11:15fields like this. We can rename them a
11:17little bit later. I'll drag in publish
11:19date and author. These are the fields
11:22that we put in our table, so these are
11:23the fields we want to set. And now I
11:25want to map it to the actual field names
11:27that we had of our table, so we can be
11:29organized. So for the video title, I'll
11:31name it video_title.
11:32The link, I believe I called that URL.
11:35Publish date, I called that
11:37publish_date.
11:38And author, I left author. So now we
11:40have all of this information.
11:42So no matter what channel comes out with
11:44a new video, it's going to just set it
11:47with these names for each one of the
11:50fields. So it doesn't matter who the
11:51author is, it will be called author.
11:53Doesn't matter what the video title is,
11:54it will always be called video_title,
11:56and it will populate dynamically here.
11:58And so now we can set up a little search
Setting our video filter
12:00filter to make sure that the same video
12:02doesn't get in the database twice. We
12:04can do that by selecting this plus
12:06button, typing in data table, selecting
12:10that, and then hitting get rows. We
12:13could rename this to like
12:15search
12:16and filter.
12:18And where it says data table, we want to
12:20choose the table that we created, so
12:22YouTube testing in this case. And then
12:24we want to match all conditions, and
12:27then add a condition where URL
12:31equals, and then we can map the actual
12:34URL right there. So what this is doing
12:36is it's saying if there's a URL that
12:38matches the one incoming in my database,
12:41then we don't want the automation to run
12:43because it's already been processed. So
12:45what we can do is after this data
12:47search, we could test that out right
12:49now. As you can see, we get no output
12:51data, which is good. But if we want the
12:52automation to run, we'll have to go to
12:54settings and always output data.
12:57And so now when we run that, it's not
12:59just going to say no output data, it
13:00will just return empty. So if I select
13:03this plus button, and I type in if, I
13:06can add this to the canvas, and it
13:08automatically connected for us. And what
13:10we want to do is we want value one to be
13:14not empty. So is not empty. So what this
13:17is saying is if the value that we type
13:19in is not empty, it will be true, and it
13:22will go down the true route. And so if
13:25json.url,
13:27if this is not empty in the search and
13:29filter node, then we can go down true.
13:32So I want you to copy what I'm doing
13:33here. I want you to turn this to an
13:35expression,
13:37and then I want you to type in double
13:39brackets,
13:40money sign, json.url,
13:44because that's what this field name will
13:45be called in this search and filter
13:48category here.
13:49You'll see what I mean. So if I actually
13:51run one of these after setting it up
13:53like that, it should go to the false
13:54route since
13:56it is empty. And if it is empty, we want
13:58to continue the workflow down here. If
Create first data table row
14:00it's not empty, we'll just stop the
14:02workflow. And so since it's not in the
14:04database, now what we need to do is we
14:06need to create a row in our table. So
14:10I'll hit the plus button, type in data
14:12table, and then I'll hit create row or
14:15insert row.
14:16I can choose this from the list, so I'll
14:19just go to the YouTube testing, and then
14:21I can start implementing all of these
14:23things in right here. For now, I can
14:25delete the transcript since we don't
14:27have that yet, we'll add that later.
14:29Now we need to map all these fields. So
14:31I can connect it to the false route, and
14:33then I can double-click into here.
14:36I'll go back to the edit fields node
14:37that we created earlier, and I'll just
14:39start dragging and dropping these fields
14:41where they match. So URL can go to URL,
14:43video title to video title, publish date
14:45to publish date, and author to author.
14:48So now, if I save this, and I open up my
14:51data table in another tab, as you can
14:54see, we have no data in here right now.
14:56But if I run this since we have insert
14:58row, and I go to AI Foundations,
15:01just like that, it adds a new row of
15:03data. If we hit the refresh button, as
15:06you can see, we now have my video title,
15:08my URL, the author, and the publish
Scraping YouTube transcripts
15:10date. But now we need to pull in the
15:11transcript as part of the automation. So
15:14in order to do that, you're going to
15:16need to go to a website called RapidAPI.
15:19And this is free. You can do this up to
15:21100 times per month for free.
15:23So I just typed in RapidAPI, and I'm
15:25going to go to rapidapi.com. You can
15:27sign up for an account, it literally
15:28takes 5 to 10 seconds. Then you can go
15:31to the API hub. And what I want you to
15:33do is type in YouTube transcript,
15:37and then what you can do is select that
15:38top one with this logo by Solid API.
15:43This is going to allow you to grab
15:45YouTube transcripts very quickly, and it
15:47is free for 100 requests per month. In
15:51order to use it, you'll have to
15:52subscribe to it. You're going to see a
15:53subscribe button up here. You don't need
15:55to enter any card information, you can
15:57just subscribe to the free plan without
15:58any card. I'll show you how that works
16:00real quick. For instance, if I go to
16:02this fresh LinkedIn profile data,
16:05there's a subscribe button in the upper
16:07right-hand corner. I can hit subscribe
16:09to test. And for the YouTube one, there
16:11will be a free plan that you can use,
16:13and you can just hit subscribe to this
16:15plan, and it's a one-click subscribe.
16:16You have zero card information, and it's
16:18ready to go. And once you subscribe to
16:20the free plan, you want to go to this
16:22get transcript with URL,
16:24and then you want to copy this cURL over
16:27here on the right-hand side, and then go
16:29back to your N8N. Then what you want to
16:31do is you want to add an HTTP request.
16:33So I'll hit add, go HTTP request, and
16:36then I'll hit import cURL, that thing we
16:38just copied over here. This is a cURL,
16:41and it builds out the entire HTTP
16:43request for us. So if I import that and
16:46paste it in, and import it, now it's
16:49using this request, and we can
16:51dynamically put in any URL we want to
16:54pull in the transcript. So in order to
16:56do that, I'll just delete out that
16:59predefined value it had, and I'll make
17:01this an expression, and drag in our
17:04video URL from the insert row node. I'll
17:07drag that in, and now if I hit execute
17:09step,
17:10in a couple of seconds, the YouTube
17:11transcript will be all ready for us. So
17:14this is from my most recent video. And
17:16so we could rename that module if we
17:17want to like get transcript. And now
17:20that we have this in here, we want to
17:21insert the transcript into this row. So
17:24we can actually update a specific row by
17:27using the ID from this. If I click in,
17:30as you can see, each time you actually
17:33create a row, it comes with an ID. So we
17:35want to make sure that we update that
17:37same row that we've been messing with
17:39this entire process since each row
17:42equals one new YouTube video. We want to
17:44make sure we get that transcript to the
Adding transcript to data table
17:46exact row it needs to be in. So I'll add
17:48this,
17:50and I'm going to type in data table.
17:52What I want to do is update row. If I
17:54hit update row, I can select the data
17:57table, which is the same thing we've
17:58been using, and then I want to add a
18:01condition, and I want to match all
18:03conditions. I'll add a condition,
18:06and we can leave this on ID number. We
18:08can leave this on equals. And what we
18:10want to do is we want to hit the
18:11drop-down on insert row, and drag and
18:14drop this ID to that value. This will
18:16ensure that we are updating the row that
18:18was created at the beginning of this
18:21run. And then I can just delete
18:23everything in here except the
18:25transcript, and then I can just go pull
18:28in the transcript, and drag and drop it
18:30in right there. So this can be adding
18:33transcript. And then what I'll do is
18:35I'll click out back to canvas, and I'll
18:37hit this little play button. And what
18:39that did was it quite literally added
18:41the transcript to this row. So if I hit
18:44refresh, you're going to see that entire
18:46transcript pull in to our data table.
18:49And I have it all right here in N8N. So
18:51now we can use this entire thing within
18:54our AI agent in order to have it make
18:56decisions on whether we should watch
18:57that video or not. And so this is the
19:00automation of the input to the database.
19:02As you can see, we have three database
19:04nodes that we used this entire time, and
19:07native N8N tables make this so much
19:09easier than it used to be. But what we
19:11can do is we can feed all of that
19:13information we just received, which
19:15could be happening on a timer, by the
19:17way. You can set this up to go every
19:19minute, every hour, day, week, and then
19:21you can just activate the workflow, and
19:22it can be running for you while you
19:24sleep, and then emailing you whether the
19:26video is good to watch or not. And so
19:28far, we're doing really good. We've
19:31gotten down this first half of the
19:33process, where we've taken an input,
19:35which is a YouTube video, we've scraped
19:37the transcript, and then we've uploaded
19:39it to a database. So now, all we need to
19:42do is attach an agent to it,
19:45help it understand how to use the
19:46database, give it some of our goals, and
19:49give it instructions and guidelines for
19:51how to output its prompts to us. And
19:54it's going to act on behalf of our
19:56goals. So, if a video comes in that's
19:58completely crazy, it's not going to tell
5 Whys Analysis
20:01me to watch it in the alert. So, let's
20:02build this agent now, and there's a
20:03couple of things you should do when you
20:06build an agent. Number one, what I like
20:08to do is go through a five whys
20:10analysis. So, why am I actually doing
20:13what I am doing? I've created this GPT
20:16called the root cause GPT, and what this
20:19is going to allow you to do is discover
20:20the root cause of why you want to
20:22automate what you want to automate. And
20:25this is really important. It goes
20:26through a five question loop that asks
20:28you why five times. So, that when you
20:30hit let's automate, you can truly
20:32discover the reason behind why you want
20:34to automate that thing. So, if I hit
20:36let's automate and I'm doing this
20:37YouTube transcripts as an example, I can
20:40go through this process. As you can see,
20:42it says, "Great, let's kick this off.
20:44I'll ask you a series of short why
20:46questions up to five layers deep to
20:48uncover the real root cause behind the
20:49automation you want." "What input do you
20:52want to automate or capture?" I can just
20:53say, "YouTube transcripts."
20:57And I can send that off. And now it's
20:59going to go through the why analysis.
21:01Why number one, it asks you, "Why do you
21:03want to automate YouTube transcripts?"
21:04Or why do you want to automate whatever
21:05you want to automate? And then you can
21:07just answer honestly, and it's going to
21:09really uncover the true reason behind
21:11why you want to do what you want to do.
21:13So, I don't keep wasting time on content
21:17that doesn't help. I could send it off.
21:20Then it gives me why number two, "Why is
21:21avoiding wasted time on unhelpful
21:23content important to you?" And I'd say
21:24because I need to spend my time creating
21:26instead of consuming. I'll send it off
21:28and it will ask me my third why, "Why is
21:30it important to prioritize creating over
21:32consuming?" I can put because it's what
21:34helps my community members and viewers
21:36learn most. Then it asks me, "Why is
21:38helping your community members and
21:39viewers learn the most important thing
21:41for you?" I can just keep responding to
21:43these whys and uncovering the root cause
21:45of my problems. And some of these
21:47questions get honestly pretty hard to
21:48answer. So, you just want to keep on
21:50answering.
21:51And after I answered the last why, it
21:53says, "Got it. Thanks for going deep."
21:55So, if I put this together, your core
21:56goal isn't just automating YouTube
21:58transcripts. It's really about freeing
22:00up time from low-value content
22:01consumption so you can focus on creating
22:03teaching material that helps your
22:05community learn faster, which is
22:07absolutely correct, and I'm amazed every
22:10time I go through this system. Then I
22:12can say, "Yes, that sounds exactly
22:16correct." And I can send that off. And
22:18then it gives me an entire brief that I
22:20can use when creating my AI agent. And
22:22it gives you your root goal, which is
22:24really important because this is what
22:25you want to give to the agent in its
22:27system instructions.
22:29So, if I go back to my N8N workflow
Creating Agent Instructions
22:31here, what I want to do is I want to hit
22:33this plus button and type in AI agent.
22:36And when I select this, what you're
22:38going to notice is you have something
22:39like a prompt, and you also can add an
22:41option and create a system message.
22:44These are your custom
22:46instructions for the agent. This is
22:49where you show the agent how to act on
22:51your behalf, and this is where you input
22:53the information that the agent needs to
22:56use in order to act on your behalf.
22:58So, for source for prompt, I can change
23:00that to define below. And for the prompt
23:03user message, I can make that an
23:04expression, open up that window, and
23:06then I can just put YouTube video title,
23:10and then I can pop in the video title. I
23:13can enter it down a few times, put
23:14YouTube video author. I can enter in the
23:18YouTube video author, and then I can put
23:21YouTube video transcript,
23:25which is really the most powerful part
23:27of this entire thing because we can have
23:29AI look through the entire transcript to
23:31see if it's worthy and worth our time
23:33based on our goals. And our goals will
23:35be put within the system message. So,
23:38right off the bat, we can copy our North
23:40Star goal that was created from the
23:42transcript automation. It's up top, and
23:44you can scroll down, and you can even do
23:46a PDF download if you want at the very
23:49bottom. In the next step, what you want
23:50to do is you want to make the system
23:52message an expression and open up this
23:55window, and just put your root goal up
23:57top. And we're just going to kind of
23:59move this around a little bit, but we
24:01just want to make sure that this gets in
24:03here because this is truly the reason
24:05that we want to automate these YouTube
24:07transcripts. And the cool thing is is if
24:09you go to the description and you use
24:11this GPT, which is free, by the way,
24:13every one of us is going to have a
24:14different reason why we are automating
24:18YouTube transcripts. Some of you may
24:20just want to learn a bunch of
24:21information a lot faster, and you don't
24:23have time to watch all the videos. Some
24:24of you just may be business
24:25professionals who want to take some
24:27concepts or some business models from
24:30the YouTube videos and extract those. It
24:32doesn't really matter what your goal is.
24:34This is where this thing gets very
24:35custom, and where we can all start to
24:37learn a lot by building this AI agent
24:39out. So,
24:41in the system message, I use a framework
24:43called the IOE framework. I made a full
24:46video on it going over how to create the
24:48best instructions to make AI sound
24:50exactly like you and follow exactly what
24:52you tell it to do. I'll leave that video
24:54on the upper right-hand corner if you
24:55want to watch a full guide on creating
24:57instructions. But for now, let's just
24:59quickly create these so you can watch
25:01how this works in real time.
25:04And you can go as in-depth as you want
25:05here. So, I'll give it a quick roll, and
25:07then I'll just say,
25:09"You are
25:11a YouTube transcript agent." And then
25:13I'm going to tell it what it will
25:14receive. I say, "You will get a YouTube
25:16transcript video title and author, and
25:18your job is to decide whether it's worth
25:20Drake's time to watch the video or not
25:22based on his goals." And then I can put
25:25Drake's North Star goal, and that's why
25:29this is important. So, now the AI agent
25:31has context into what my North Star root
25:33cause goal is for automating these
25:35transcripts. And here you honestly need
25:37to think about what is going to have the
25:39biggest return on investment in your
25:41life when consuming content on YouTube.
25:44And why do you actually watch YouTube
25:45videos? Do you like taking little
25:47pointers from them? Do you like watching
25:49full guides like this and following
25:50along in-depth? This is where you need
25:52to let the agent know exactly what you
25:55want it to base its decisions around
25:59when telling you whether you should
26:00watch a video or not. This is like going
26:02inside of your brain and creating set
26:05clear instructions for it to follow. So,
26:07under here I'm going to add a knowledge
26:09section, and this is basically going to
26:11be things that I want it to know. I'll
26:13add a couple of these pound signs in
26:15order to signify that these are headers.
26:19And I can even in the role put, "Use the
26:21knowledge section in order to tailor
26:24your answers and responses." And now I
26:28can just start adding little knowledge
26:30points. I can put knowledge and then in
26:32parentheses information about Drake, and
26:37then I can put
26:38"He runs an AI community where he
26:41teaches evergreen AI skills." You can
26:44even put things you're not interested in
26:45here. I could say something like he
26:47isn't interested in local N8N videos.
26:49Maybe I'm just somebody who wants to
26:51stay on the cloud. I can put like
26:53Drake's main automation tool is N8N.
26:58I can put something like he loves full
26:59agent builds and replicating them for
27:01his community. So, maybe if a video
27:03comes in and it's like full N8N agent
27:06build for research or whatever it may
27:08be, it will recommend that video to me
27:10since it now knows that I love that
27:12because I like replicating them for the
27:14community. That's a high return on
27:16investment task. I could keep adding to
27:18this knowledge section, and I recommend
27:20you do as well in order to actually make
27:22this agent very valuable in giving it
27:24insight into what your goals are, what
27:26do you like, what don't you like because
27:28it will seriously change the output of
27:31this agent anytime a transcript goes
27:33through it. So, the next section I want
Custom output format
27:35to create is the output format section.
27:38How should the agent output its
27:40response? And how should it use that
27:42output format every time it sees a
27:44transcript? So, I say, "You are to
27:46output answers in a specific output
27:48format each and every time. Here is the
27:50consistent output you are to use." And
27:53instead of consistent output, I'm going
27:54to put, "Here is the JSON object you are
27:58to use." Because this is how you get
27:59consistent outputs is by using JSON
28:02objects, something that we teach in our
28:04agent building course. So, I'm going to
28:07do one real quick, and it's very simple.
28:08Don't be scared by this. I'm going to
28:10type in two curly brackets and enter
28:12down, and then I'm going to put quotes.
28:14I'll put summary, and then I'll arrow
28:17over, put a colon, and then two empty
28:22quotes with a comma. And so, this is
28:24basically saying summary and then
28:26response. And now I'm going to add
28:28another object, so I want to add that
28:30comma. I can put ROI
28:33_score,
28:36and then again, colon,
28:38open quotes, and then a comma since I
28:40want to add one more thing. I can just
28:42type in video_compliments,
28:46and then I'll arrow over, colon, and
28:49then double empty quote. This time with
28:52no comma since it's my last object. So,
28:54these are going to be the responses that
28:56the AI agent generates every time. It's
28:58going to give me a video summary, an ROI
29:00score, and how this video compliments
29:03what I want to do. And so, I can tell it
29:05how to use this. So, I described quickly
29:07how to use this output format here. I
29:09say, "You are to generate a good overall
29:11summary of each transcript going over
29:13the main concept and what happened in
29:16the video. Furthermore, you are to give
29:18an ROI score of high, medium, low, or
29:20horrible depending on the return on
29:23investment this video would have for
29:24Drake depending on his goals. Lastly,
29:28you are to provide video compliments.
29:30This is how the video compliments or
29:32doesn't complement what Drake wants to
29:34do it or his interests. So, what I'd
29:38recommend is adding a little bit of
29:40goals or a little bit of what do you
29:43actually want out of a YouTube video
29:45when you come to watch? What are you
29:47interested in? So, under my North Star
29:49goal, I can even add a few more goals. I
29:51can put other goals from YouTube videos.
29:58And then I could just start entering
29:59some things that I want out of YouTube
30:01videos. A couple things I added are
30:03wants valuable insights that can help
30:05his AI community become irreplaceable,
30:07wants videos that are new updates so we
30:10can stay atop of the trends, things like
30:11that. And now what you want to do is you
30:13want to copy this JSON object that you
30:15created. Click outside your AI agent,
30:18select require specific output format,
30:22add the output parser.
30:24Then you want to select structured
30:25output parser here. And then replace
30:27this JSON example with the example that
Connecting a chat model
30:30we gave. And now what we can do is we
30:31can add a chat model to this. So, I'll
30:33add a chat model. And I can select
30:36OpenAI in the bottom left in the bottom
30:38right-hand corner. Then you can connect
30:40your credential. It's very simple with
30:42OpenAI. I'm sure you've actually done
30:44that before. I'm just going to put this
30:46on one of my accounts. And then I'm
30:48actually going to put this on GPT 5
30:51mini. I recommend using a good model for
30:54this because remember, this is going to
30:55be your brain. Transcripts take up a ton
30:58of context, so it has a lot to look
31:00through. And I just wouldn't cheap out
31:02on the model or go for speed here
31:04because it's going to be making big
31:05decisions for you on any automation or
31:08agent that you build, not just this one.
Testing the agent system
31:11And so now we can really test this out.
31:12I'll go to my data table and I'll delete
31:15whatever we have in here. So, I'll
31:16refresh just so we can run through all
31:18of these as examples.
31:21I'll delete.
31:22And then what we can do is we can go run
31:24this automation. So, I will execute the
31:27Productive Dude one. This Productive
31:29Dude one looks like an N8N automation in
31:32same shorts automation tutorial. So, it
31:34should recommend this video to me since
31:36I love full agent builds, but we will
31:39see if it does. It's going to review
31:40that transcript. It's actually reviewing
31:43that transcript right now. Looks like it
31:44already added it to our database with
31:46the the transcript in there. So, if I
31:48refresh our database, as you can see,
31:50the transcript's already in here. The
31:53agent is just reviewing it currently.
31:54So,
31:56uh as you can see, it's completed now.
31:58And it created in our structured output.
32:00So, every time it will generate summary,
32:03ROI score, video compliments, which is
32:05beautiful. So, I'll click into our AI
32:07agent and see what it created for us. It
32:10says ROI score high. So, it really wants
32:13me to watch this video. It says, "This
32:15is an end-to-end N8N workflow
32:17walk-through that builds an automated
32:18short-form content generator, goes over
32:21everything he did in the video, shows
32:23step-by-step node setup in N8N, gives me
32:26the pricing of everything, all the tools
32:28that Carter used in that video." Then it
32:30gives me why it compliments my goals. It
32:32said, "Why this compliments Drake's
32:34goals? Full agent build. It's a complete
32:36replicable agent automation pipeline.
32:40Exactly the type of end-to-end agent
32:41Drake likes to replicate and teach." So,
32:44it's actually looking at my goals and
32:46recommending this video to me based on
32:48what I like. So, we're kind of creating
32:49our own algorithm in a way, but we get
32:51to control the algorithm. And so now
32:53that we have all this information
32:54pulling in, I mean, I could keep
32:56testing. I'll go send an N8N YouTube
32:59video right now, which I think the N8N
33:01video is install N8N locally. And if you
33:05remember in my goals, I said I don't
33:07want to do local N8N stuff. So, it
33:09should turn me away from this video.
Email alert notification
33:11While this is generating, I will just
33:13add a quick Gmail node to the end of
33:16this. You can easily connect your Gmail
33:18account and send a message to an email
33:21that you want. If you want to create a
33:23new credential, you can sign in to the
33:24Gmail that you want to uh send emails
33:27from. And you can send this to any
33:29email, which is really cool. But now
33:31we'll create a little message that
33:32notifies us whenever one of these
33:34channels creates a new video. Let's see
33:37what it said real quick, though.
33:39It says, "ROI score low. It's about
33:41basic local install. Useful as a quick
33:44reference for beginners. Recommend
33:45skipping unless you need a short how-to
33:47clip to onboard beginners in your
33:49community to use as a simple install
33:50guide." So, very cool. So, then I would
33:53just wouldn't watch that video from that
33:54channel. But now we can notify ourselves
33:56so we have some sort of notification
33:57system so we can stay off YouTube but
33:59still get notified when our favorite
34:01creators make content. And we'll get
34:03suggestions from our agent whether we
34:05should do this or not. So, now under
34:07send a message, I'll send this to my
34:09test email. For the subject, I'll put a
34:11little emoji. I'm going to put the
34:14siren. And then I'm going to put new
34:16video alert. And then in the email type,
34:20I'll select text. And then I'll create
34:22the body of the email. So, I want to
34:23make this an expression. And we can use
34:26all the data in this expression that
34:28we've picked up throughout this entire
34:29workflow. So, I'll drag in the channel
34:31name that created the video. I'll go to
34:33add transcript and I'll pull in the
34:35author. I'll say
34:38uh author just uploaded a new video. And
34:43so, in the email, it'll look like this.
34:46Whatever the channel that uploaded is,
34:47it will have it right there. And then I
34:49can enter down a few times and I can put
34:52the video is maybe I'll put quotes and
34:56then drag in the video title here. And
34:58now we'll enter down and put here's a
35:02quick summary.
35:04And then I can put the summary down
35:06here. So, I'll drag in the summary from
35:08the AI agent, which it gave us a summary
35:11because we did the consistent output,
35:13the JSON object. So, we can now drag
35:15different things that the agent
35:16generated from a single response. I'll
35:19drag in that summary just like that. And
35:21then I can put your return on investment
35:26by watching this video
35:29is add some suspense there. And then
35:32I'll drag in the ROI score and enter
35:35down.
35:36So, now it'll say this, "Your return on
35:38investment for watching this video is
35:39low" since it's the uh
35:41quick step-by-step install guide with
35:44Docker. And then I'll put here's why.
35:48And then I'll put in the video
35:49compliments. So, this section tells why
35:51it's a good fit or why it's not. This
35:53gives me just the general score, the
35:55summary, the video title, and the author
35:58of who uploaded the video. So, now it
36:00will send me emails
36:02whenever this automation starts, which
36:04is anytime one of these channels uploads
36:06a new video or on a schedule. Another
36:09quick little hack, if you don't want N8N
36:11attribution at the bottom of your
36:12emails, you can go to add option, append
36:15N8N attribution, and turn that off. And
36:18now
36:19we can test out this full workflow. So,
36:21I'll go to my database and I'll refresh
36:24it and delete everything real quick out
36:26of this table. Hit refresh.
36:30Delete everything out of the table. And
36:32we'll run this from the top. So, let's
36:34say AI Foundations comes out with a new
36:35video. We have this set up every minute,
36:38so it's watching my channel literally
36:39every minute. So, it'd be good for
36:41competitor research as well. I'll
36:42execute workflow to send off a test.
36:45And it will get that transcript for me
36:47and start reviewing my video, which my
36:49latest video is actually a promo for the
36:52AI Foundations community. So, I'm not
36:54sure how it's going to handle this one,
36:55but we can see how it handles it when it
36:57gets sent to my email. So, I don't have
36:59to be here for this to happen. I could
37:01just activate it and let this run. But
37:03as you can see, it emailed me new video
37:05alert and then it gives me channel name.
37:08So, AI Foundations just uploaded a new
37:10video. The video is and then it gives me
37:12the video title. Gives me a quick
37:14summary. It says, "My return on
37:15investment by watching this video is
37:17low" because in my goals, I put that I
37:19only want videos that are full agent
37:21builds, videos that are going to allow
37:23me to build things for my community.
37:25But it gives me an exact quick summary
37:27and why it aligns with this return on
37:30investment score. What I could also do
37:32is I could add the the link to the video
37:34in here as well. If I open this up and I
37:36just say something like link to video,
37:40I could paste in the video URL
37:43by dragging it from the add transcript
37:46node from earlier just like that. And so
37:49now, if I execute that step real quick,
37:52it will send me another email just like
37:54that with the video URL down here.
37:56Perfect. And you could customize this.
37:58You could make headings, forms. You can
Final thoughts
38:00do so many things in here. It's
38:01absolutely insane. But this is the
38:04system. This is how to go from input to
38:08agent making a decision for you. What
38:10we've just done is we've eliminated the
38:12need for me or any of you to get on
38:14YouTube if you don't want to anymore.
38:17And I recommend using that GPT, the five
38:19whys root cause GPT I left in the
38:21description for free. It is truly going
38:24to help you understand why you do some
38:25of the things you do. And if you start
38:26using this system and replacing a lot of
38:28the inputs that you have to make
38:29decisions on on a daily basis, I know
38:32that you can save at least 2 hours a
38:34day. And if you do that, it saves you a
38:36month out of every year. If you can
38:38figure out a way to save 2 hours per
38:41day. So, that's all I have for this
38:42video. If you enjoyed, please drop a
38:44like. Let me know in the comments, what
38:47is the next input that you want to
38:48tackle? And I hope I still see you on
38:51this channel after the automation we
38:52built together today, but at the very
38:55least, at least put me on your RSS feed.
38:58That way your email gets notified
38:59whenever I upload. I would highly
Join AI Foundations
39:00appreciate it. Like I said, I have a
39:02full free video in the description going
39:05over everything our private community AI
39:07Foundations has to offer. Probably the
39:09most expensive thing you can do right
39:11now is not investing in everything you
39:13can do to learn and master the skills of
39:16our time. Think about if you would have
39:17learned SEO or email marketing back in
39:20the 1990s and early 2000s. You'd be
39:23sitting on top of an empire. So, these
39:25are the AI skills that you can learn
39:27today with us at AI Foundations. So,
39:30hope you enjoyed this video. If you did,
39:31please drop a like and subscribe. I
39:33would highly appreciate it. And with
39:35that being said, I'll see you in the
39:36next one.