Free YouTube Transcribe

Video transcript

How to Set Up Your First Automation in N8N (Beginner Tutorial)

The Nerdy Novelist · 5,002 words · 23 min read

Want to search this transcript, jump the video from any line, or download it as TXT, SRT, or VTT?

Open in the transcript tool

Full transcript

0:00Today I'm going to walk you through how

0:01to set up your very first N8N

0:04automation. This is a video specifically

0:06for authors who want to harness the

0:08power of automations and AI into their

0:11process. And there's so many different

0:13ways to do this. And because of that, it

0:16can get a little overwhelming. And there

0:18are a lot of advice and videos out

0:20there, but I really want to get things

0:22down to their most simple so you can

0:25start learning how to use this program

0:27because if you can use it effectively,

0:30you can create some things essentially

0:32your own software to create things that

0:34you would never have been able to dream

0:36of before. So let's start by going into

0:38our NAND dashboard. Now I have done a

0:41number of videos on some of the initial

0:43setup processes in getting NAND working

0:46for you. So, if you haven't watched any

0:49of those, I recommend going through

0:50them, especially the one that I have

0:52about creating uh your NAND uh server,

0:56like whether you want that on the cloud

0:59or on a self-hosted machine or on your

1:02own self-hosted server. There's a video

1:05about that. And then there's also a

1:06video about setting up your credentials,

1:08specifically your Google credentials,

1:10which you can see here. I have a number

1:13of integrations here in my N8. So, if

1:15you want to know how to set up those

1:17because you'll need them for this video,

1:18I also have a video about that. But if

1:21you assuming you've done all that and

1:23you want to get started building your

1:25first thing, you come up here to where

1:27it says create workflow. All right? And

1:30this is what you will see. You'll see

1:32this interesting little blank slate,

1:36right? And of course, a blank slate is

1:37always very intimidating. So, what we do

1:40when we're starting with N8 is we start

1:42with a trigger. And the trigger can be

1:45any number of things, but the two that I

1:47find myself using the most are just a

1:50manual trigger or a forum. So, let's

1:54start with the manual trigger. Let's see

1:55what that looks like. If you click on

1:57this, it'll bring up a number of things

1:59that you can do here. And uh it it's

2:03asking us for what triggers this

2:05workflow. So, it knows that the trigger

2:06is first. So, if you want to do a manual

2:09trigger, you just click on this one that

2:11says trigger manually. And you have

2:14effectively set up your very first node.

2:16And that is by the way the the word we

2:18use to refer to each of these little uh

2:21building blocks essentially is we call

2:23them nodes. So this is your manual

2:26execution node. So all you have to do to

2:29start this automation is just click this

2:31execute workflow. You can also click it

2:34here and it'll execute the workflow.

2:37Now, obviously there's a lot more to

2:40this process and we have nothing for it

2:43to do after you've executed it, but

2:46essentially that's how it works.

2:48However, let's actually go and look at

2:50forums instead. Uh because for this

2:53particular automation, we're going to be

2:55using a forum. So, we're going to click

2:56on this again. And down here, it says on

2:59form submission. So, NAN has their own

3:02version of forms. So, all you can do is

3:03just click on this and it brings up the

3:07kind of workflow area where you describe

3:11what your form should look like. All

3:14right. So, first we give our form a

3:16title and we're going to call this book

3:19description generator. Okay. Uh you can

3:22give it a description if you want, but I

3:24don't it's not required. And then here

3:26you want to select add form element.

3:30Once you've done that, we're going to

3:32put in two fields here. So you can click

3:34add form element again. And now we have

3:36two fields, but we need to specify what

3:38these fields are. So we're going to say

3:41in this one, give me information about

3:46your book.

3:50And we're going to uh under element

3:52type, you can select a number of things.

3:54This could be like a date, an email, a

3:56file, any number of things, a password.

4:00So, if you wanted to have like a your

4:02own sort of login, you could actually

4:04put like a username and password in

4:05here. In this case, we're going to

4:08select a text area.

4:10All right. And you can add a placeholder

4:12for what's showing there. And you can

4:14also specify whether this is a required

4:16field. So, we'll go ahead and turn that

4:18on because we do want this to be a

4:20required field. And then the next field

4:22name is

4:24give me an example of a good book

4:29description. And now we're going to

4:31select text area for this one as well.

4:34No placeholder required. And this will

4:35also be a required field. And now we've

4:38successfully set up our form. So now if

4:40I select execute workflow, it will

4:43actually pull up this form. And you can

4:45see it says book description generator.

4:46Give me information about your book.

4:48Give me an example of a good book

4:49description. And then you hit submit.

4:52We're not going to do that yet. So we'll

4:54go ahead and pause that because first we

4:56need to set up the next step. Right. So

5:00the next step is going to be actually

5:02creating our first AI agent. And this is

5:06what we're going to be using in order to

5:09use AI on this information that comes in

5:12through the forum. So what you do is

5:14select this one right here. uh that this

5:17little plus icon next to the form and it

5:22brings up this uh list of information

5:25here. You can run through these uh you

5:28can basically uh to get to the one we

5:30want, you go and click on AI and then AI

5:32agent. There's also a whole bunch of

5:35other things that you could do, but this

5:38is the one that I most commonly do is

5:40just select AI agent. And now we have

5:44our AI agent. Uh so there's uh some

5:47things we have to do though before we

5:49get to this part. Now firstly, I like to

5:51name all of mine. So you can right click

5:53on this and just say rename. And I'm

5:56going to call this write book

5:58description.

6:00I do this just to keep everything

6:01organized as I'm going. Additionally,

6:04you'll see there's a whole bunch of

6:06stuff here where it has a chat model, a

6:08memory, and a tool. And these are things

6:10that we could hook up to this AI agent

6:13to give it additional resources. The

6:15memory here uses what I believe is a rag

6:18form of retrieval. So you can give it

6:20documents that it knows and has archived

6:23and it can scan through those and

6:25vectorize them and and figure out what

6:28it needs to include in its prompt. I

6:31don't use this as m that much when it

6:34comes to automations because I like the

6:37prompts to not be rag retrieval. I like

6:39them to be included in the prompt. Um,

6:43but you can include information here in

6:45the memory if you want. Uh, but for most

6:48people, I'd say you don't need to worry

6:49about that at this point because that's

6:51a little bit more advanced. And the same

6:52goes for tools. Uh, most of us do not

6:55need to add any tools to this. Uh, for a

6:58simple automation at least. If you did,

7:00you'd click on it. It would come up with

7:01this list here. You could search through

7:03these and find the tool that you're

7:04looking for. Uh but what we want here is

7:07the chat model that you can see listed

7:10here. So if we click on this, we can now

7:14choose from a bunch of different chat

7:16models uh including official

7:19integrations with Anthropic, Azure, AWS,

7:23DeepS, Google Gemini, Grock, Mistral, uh

7:27etc. The one we're going to be using for

7:29this is the one that I use most

7:31frequently, and that is Open Router,

7:33which is listed here. If you don't see

7:35it here, you can just search for open

7:37router chat model and you can select

7:40this. Now, the reason I use open router

7:42is because it's a third party that

7:44access has access to virtually every

7:46model you you could think of. And so

7:49therefore, if I decide I want to change

7:51a step from say a cloud model to a

7:53Gemini model, it's way easier to do it

7:56through an open router node because then

7:59I don't have to change the node. Right?

8:01If I were using Anthropic's official

8:03claude node and I wanted to change to

8:06Gemini, I would have to actually delete

8:08that node and bring in a new one from

8:10Gemini. With Open Router, I can access

8:12all of the different models. And all I

8:14have to do is just do uh select this

8:17little drop-own menu and select which

8:19model I want to use. So, for this one,

8:21let's go ahead and just put in Gemini. I

8:24just did a search and you could do a -3

8:27to find Gemini 3 and go ahead and select

8:31that. So now we've selected Gemini 3 as

8:34our main model. And once again, if you

8:36are unfamiliar with Open Router and how

8:38to set it up, you will need to set up

8:40credentials here. It's really simple. Uh

8:44all you have to do is fill in your API

8:47key here. And to get that, you need to

8:49just go create an account with Open

8:50Router and find your API key. I've

8:53talked about this many times. We use it

8:55with Raptorite with novelcrafter and a

8:58number of other pro programs. So, all

9:01you have to do is go to open router.ai,

9:04set up your account, find your API key,

9:06and then just stick it here. And then

9:08from there, we select our model, and now

9:12this AI agent is hooked up with some AI

9:16electricity, if you will. Um, but that

9:19said, nothing's going to happen if we

9:22activate this thing because we haven't

9:23given it any instructions. So, what we

9:26do here is now double click on writebook

9:28description.

9:30And you're going to see a couple of

9:31things. It'll say up by default, it'll

9:33say connected chat trigger node, which

9:36we actually don't want in this case. So,

9:38you could actually hook up a node that

9:40allows you to chat and interact in a

9:43chat format with this particular bot,

9:45which can be useful for certain types of

9:47automations. But in this case, we just

9:49want it to execute a fixed prompt every

9:52time it is activated. So, we're going to

9:54change this. Instead of saying connected

9:56chat trigger node, we're going to change

9:58this to define below. All right. And now

10:01we can enter our prompt into this user

10:04message area. There are other things you

10:07can do here as well. And while we're

10:08here, we might as well go over them. If

10:10we go to options here, you can say add

10:12option. And there are a number of things

10:14you can add here. Uh probably the most

10:16important of which is system message. So

10:18if you wanted to have a specific system

10:21prompt, which is kind of a prompt that

10:23it weights a little bit heavier than

10:25others, you could put that in here. But

10:27just know that there are other things

10:28that you can add here like um enable

10:31streaming back batch processing, max

10:34iterations. You know there's a number of

10:35things that you can do here most of

10:37which are not necessary for our purposes

10:40today. Uh so now we want to go to this

10:42prompt user message. Now in order to do

10:45this properly we want to go to where

10:47this says fixed and expression. You want

10:50to select expression cuz that's going to

10:52allow us to do some fun things. Once

10:54you've done that you'll see this little

10:56icon here in the corner of the prompt

11:00window. Click on that. And now we can

11:04actually start putting our prompt in

11:05here. So we could add something like I

11:07want you to analyze the above

11:11book description

11:14um and information about

11:18my book and then write a book

11:22description that is similar to the book

11:26description above

11:29but about my book instead. Okay, a very

11:32simple prompt. We're not going crazy

11:33with our prompt engineering today. Uh,

11:36but you'll notice something. First of

11:38all, where is it getting this

11:39information? Um, I sure we're going to

11:43be submitting a form there, but how do

11:45we make sure that this prompt has access

11:47to our answers on that form? So, to do

11:50that, we're going to do a couple of

11:52things. First of all, I can't actually

11:55see that information until we've

11:56executed the form. So, what we're going

11:58to do is we're going to come out of this

12:00and now go back to our form and we're

12:03also going to go find the book

12:05description and some information about

12:06our book uh that we want to do. So, to

12:09do this, I like to go to Amazon and then

12:11from the little hamburger icon here in

12:13Amazon, we'll go to bestsellers

12:16and then we'll go to Kindle store

12:19Kindle ebooks and then find whatever

12:21genre we want to do. Okay. So, let's do

12:26um let's go let's do romance today.

12:29Okay. Uh so, we'll go down to romance.

12:31Pick our specific slice of romance.

12:35Let's say romantasy.

12:39And now we can look at these high

12:42performing books uh in romanty and say,

12:45okay, let's do one that is similar to

12:47one of these. So, I like to find one

12:50that's usually got a lot of reviews on

12:52it. And of course, romanty is really hot

12:54right now. So, a lot of these have very

12:56strong reviews. Um, so we're going to

12:59look at this Direbound, The Wolves of

13:01Ruin, book one. Okay. And, um, we're

13:06going to copy the meat of this book

13:08description. So, there's sometimes stuff

13:11in here that we don't need, per se. Um,

13:15and like all of these reviews here. Um,

13:21this sort of intro here is not

13:24necessarily part of the main book

13:25description. That's just more like

13:27marketing fluff that people add in

13:28there. The main book description is

13:30right here. And next, we're actually

13:33going to need some information about a

13:35book. Now, I don't have any book any

13:37romanticies that I'm currently writing

13:38or planning to write. So, I'm just going

13:40to ask Perplexity to give me a random

13:42romantic type story. Uh, give me a

13:46random synopsis for

13:50a potential

13:53romanty book,

13:56not an existing one that I could write.

14:02All right. And I'm just doing this just

14:03so I have some material to do to work

14:05with. Obviously, if you already have

14:07your book and some information about it,

14:10you should use that. Um, but I'm just

14:12going to do this now for just for sake

14:13of time. All right. So, we have our book

14:15synopsis. Of course, it's an Allara

14:18uh which is a very overused name in AI

14:21writing, but now we got uh our info

14:24here. Okay. So, now what we're going to

14:26do, we're going to go back to our NAD

14:28automation. We're going to say execute

14:30workflow. And up pops our form, right?

14:33So, we want to input our information

14:35into these two fields. All right. So,

14:37first give us information about the

14:38book. Let's go to that perplexity. copy

14:40what it gave us

14:43and then go back to our form and fill

14:47that in here and then give me an example

14:49of a good book description. Let's go

14:51here, copy what we've got from this book

14:54on Amazon that's clearly doing well. Go

14:56back to our forum and input that here

14:58and then hit submit. And now it's

15:00actually going through and creating and

15:02running through our automation. Now,

15:04here's a fun little tip for you and it's

15:06really useful for forms specifically. If

15:09we don't want to just constantly be

15:12inputting

15:13that information every time we run this,

15:15like say we want to run this a couple of

15:17times, but we don't want the form to pop

15:20up every time and u and then we have to

15:24input that information every time. There

15:26is a fun little trick here where if you

15:27go to the little three dots above the

15:29node and select pin,

15:33it will actually pin this form

15:35submission here so that you uh basically

15:39it keeps the information that you

15:40inputed the first time and now every

15:42time you run it, it'll assume that this

15:45data is the data you want it to have. So

15:48now I don't have to refill in those

15:50fields again. And you can do this with

15:52any particular node. you can just pin

15:54it, which means that whatever it did the

15:57last time it was run, it'll just keep

16:00that every time. And this is really good

16:03for testing new automations so that

16:06you're not having to run the entire

16:07automation every single time that you

16:10are testing it. So that's just a little

16:11tip there. Um, all right. So we went

16:14through and uh did the form down here.

16:16You can actually see some of what

16:18happened. um you can actually get the

16:21output of that that form. You can see it

16:24here. So here's the info that we pasted

16:26in for information about the book and

16:28here's the info that we pasted in for

16:30the book description. Um so that's

16:32useful. Uh if we click on the next node,

16:36we can actually come down here and see

16:40uh what was the prompt that it gave us

16:42and it said I want you to analyze the

16:45book description and information about

16:46my book and then write a book

16:48description that is similar to the book

16:49description above but about my book

16:51instead. However, we did not actually

16:53specify we did not connect it to the

16:55form effectively so that it knows what

16:58to do. Uh [snorts] and which is why the

17:00output it said I would be happy to help

17:01you with this. However, it looks like

17:03you haven't included the text for the

17:05example book description or the details

17:06about your book in your message yet. So,

17:08we need to make sure we are including

17:10that information. So, let's go back into

17:12the book description. Now, I have since

17:14I have pinned the form submission here,

17:16things are going to look a little

17:18different now that we go into this. So,

17:20now if we open up the prompt here, we

17:24can actually see on the side here is

17:26some uh data available.

17:29Um, so here right here is the answer to

17:32the information about the book that we

17:34submitted in that form. And here is the

17:36example of the book description here. So

17:39what we can now do to make this work is

17:42just drag that uh little piece of

17:46information over

17:48and then drag the second one over as

17:50well. And now we have that information

17:53included in our prompt.

17:56And you can actually see this is a

17:57preview of what the prompt now looks

17:59like.

18:01Uh so we have that in info about the

18:03book here. And then here is the book

18:06description. However, there's one more

18:09little issue here that I see. And this

18:11is more of a prompt engineering type

18:13thing. But we don't really specify. You

18:16know, this is one big wall of text. We

18:17don't really specify which section is

18:20the information about our book and which

18:22section is the example book description.

18:24So to do that, we're just going to add a

18:26couple of XML tags on in front of each

18:28of these. And this is just a little bit

18:30of a prompt engineering tip to organize

18:34your prompts better so that the AI can

18:36understand them better. So to do this,

18:38we're going to do open bracket

18:40story_info

18:43and then beneath that, we're going to do

18:45open bracket and then a forward

18:46slashtory

18:48info. And this, you can think of it as

18:50just a convenient little box uh that

18:53I've covered in past videos on prompt

18:55engineering, but it now just kind of

18:57helps the AI really know, okay, this is

19:00the story info and this is the book

19:02description info. Uh, and so you can

19:04I'll put here book description

19:08example and then beneath that a forward

19:12slash which just denotes that this is

19:14the end of that section. book

19:17description example.

19:20And if you want, you could also do one

19:22around your main instructions. Um, so

19:24you could do open bracket instructions,

19:27close bracket, and then at the end of

19:28your instructions, you could do a

19:31forward slash instructions there. And

19:34now this just kind of keeps everything

19:36nice and neat and tidy for the LLM. All

19:38right. So now if we run this node again

19:42which we can do by right-clicking and

19:44saying execute step and then just give

19:46it a minute to activate. All right. So

19:48it is now completed this step. And if we

19:51look at the output here it can uh show

19:53us that hey uh here is the book

19:57description that mirrors that high

19:59performance book description but it's

20:00now about our story instead. Uh so

20:04pretty cool. definitely did the job as I

20:06asked for and wrote what is probably a

20:08decent book description that you could

20:09use for a for this book assuming it's in

20:12the right genre. And so this is all well

20:15and good. And if we wanted to, we can

20:16even pin this so that we don't have to

20:19run this step anymore because there is

20:22one more step we're going to add to this

20:24process. And that is we want to take

20:27this and put it into a Google doc.

20:29actually specifically we want it to

20:31create a Google doc and then input the

20:36information from this into that Google

20:39doc. Make sense? So what we're going to

20:41do here is click on this and under

20:44search nodes we're going to search for

20:46Google

20:48Docs and it'll show up here. You click

20:51on that and there will be a couple of

20:52options here. There's create a document,

20:54get a document and update a document.

20:56We're going to do both create a document

20:58and update a document. But we'll start

21:00with create a document. And first of

21:03all, you need to absolutely make sure

21:05your Google credentials are fully synced

21:07up. And this is not an easy process. I

21:09have a whole video dedicated to it. But

21:11once you've done it once, you won't

21:13really have to do it again. So, make

21:15sure you've got your credentials synced

21:17up here. And what we want to do is keep

21:19this operate under operation. Make sure

21:21it says create. You can also switch it

21:23to get or update if you wanted to, but

21:25we're just going to uh leave it at

21:27create. And you can select your drive

21:30name, assuming you've connected your

21:32credentials here. You can set it up to

21:34go into a specific folder if you want.

21:38Um, and go here. But really, I think you

21:40can only do like the top folders. I

21:43don't think you can go into any like,

21:46you know, sub subfolders

21:48uh using this method. So, what you could

21:50do instead is under folder name, you

21:54could in instead of using the drop-own

21:57menu here, you could switch it to

21:59expression and then put in the Google ID

22:03of whatever folder you want this to end

22:05up in. So, for me, if I just go to my

22:08Google Drive, I'm just going to pick

22:10this uh random folder. Up here at the

22:12top of your screen where the URL is, you

22:15will see this long string of numbers at

22:16the end of the URL. That's your folder

22:19ID. So if you select that and put it

22:22into this place uh where it says folder

22:25name or ID, now it will forever create a

22:29the document that you want it to create

22:32inside of that specific folder.

22:35Uh and then we can give it a title.

22:37Okay, so this could be a title that in

22:40this case we're just going to say book

22:42description, right? Uh but you can also

22:45use expressions with this as well. Like

22:47say let's say in our form we had put a

22:51section in there to select the name of

22:54the book and if we had done that then we

22:57could maybe bring that expression in and

23:00say okay we want it to be the name of

23:01the book colon book description or

23:04something like that. U but I'm just

23:06going to name this book description for

23:08now and that's all we need to do for

23:10this one. Uh however we're not done yet.

23:13We need to also create one more to

23:15update this document that we just

23:17created. So we're going to select this

23:19again. Once again, search for Google

23:21Docs

23:23and then select update a document.

23:27And from here again you want to make

23:28sure the credentials are there. You want

23:30to say the operation is update. And we

23:33want to make sure we have the correct

23:35document. And in this case we want to

23:37modify the document that was just

23:39created in the previous step. So to do

23:41this, make sure this is selected here

23:43where it says expression. Then open this

23:46up. And here on the side, you can see

23:50the previous step. And this is kind of

23:52cool how you can actually see all of the

23:54different steps in this automation.

23:56We've got the form here. We've got the

23:58writing the book description thing here.

24:00And then we've got the create a document

24:03thing here. And from here under create a

24:05document, you'll actually see ID kind uh

24:08mim type. I'm sure I'm not pronouncing

24:11that correctly. And the name, the one

24:13you want here is the ID. So, all you

24:16have to do is select that and it'll

24:18know, okay, we're pulling in the ID of

24:20that specific document. Uh, and now it

24:24will make sure we're targeting target

24:25targeting the correct document. All

24:27right. And from there, we want to

24:30actually insert some text. So, under

24:32actions, it'll say object text. And

24:36yeah, we want to leave it at text.

24:38action insert. Uh you could also do a

24:41find and replace for text, but um we're

24:44going to select insert into the body at

24:46the end of the specific position. And

24:49then you insert what the text will be.

24:52Okay. And in this case, we want the text

24:55to be the book description that was

24:57written by the AI agent in a previous

24:59step. So we're going to select

25:01expression. Then open this up.

25:05And from here we want to insert whatever

25:09the book description text was. And to

25:11find that we have to go on the left here

25:14and find that step in the automation

25:16which was this one. Write the book

25:17description. Right. And since we've

25:21already run that particular node, we

25:24have the option to select the output

25:27here. All you have to do is drag this

25:29into here and it will put this little

25:32short code here to say this is where the

25:36output of that step will go and you can

25:39actually see the preview here that this

25:42is what is going to be placed there. All

25:45right with me so far hopefully.

25:48So now we know that that's going to be

25:51inserted in this step. So all we have to

25:54do is run this again. Now I've pinned

25:56the form submission and the write the

25:59book description. So these because

26:01they're pinned, they will not need to

26:02run again. Um it will just assume that

26:06the output that has been pinned is the

26:08same output that we want to include in

26:11these two steps. So now if I select

26:14execute workflow, it will just run these

26:16last two steps because they're they're

26:18the ones that are not pinned. And so

26:22let's do that. Let's go ahead and select

26:23execute workflow. It'll run this one.

26:26Then it runs this one. And now if we go

26:28to that folder where I told it to go,

26:31sure enough, there is a file here called

26:33book description. If I open this up,

26:36sure enough, the text from that

26:40uh that AI agent that it generated is

26:43now inserted into this page. So there

26:47you have it. That is how to create your

26:50very first little automation. And I

26:52chose to do a book description option

26:54here because it's a relatively simple

26:56thing to do. But essentially everything

26:57I've done here is the bread and butter

27:01of most of the automations that I do.

27:03There are more advanced things that I do

27:05uh including setting up some code nodes

27:08which I use AI to sort of help me vibe

27:10code what those should be. I set up

27:12loops. Uh, and there are some other

27:14things that I do, but most of what I do

27:17is just this having a trigger, often a

27:20form, having AI agents perform specific

27:23tasks uh that are based on prompts, and

27:27then using Google Docs in some way to uh

27:30to place that information once we're

27:32done with it. And this should hopefully

27:33give you a decent idea on how to use

27:36triggers and AI agents and prompting and

27:40Google Docs inside of NADN. And then

27:43from there, it's just a matter of

27:45experimenting with maybe other

27:46automations that people have made and

27:48figuring out how to make those work for

27:50you. So hopefully this has been useful

27:52for you and I'll see you in the next

More from The Nerdy Novelist

Recently added transcripts

Browse the whole transcript library

This transcript was generated from the captions YouTube publishes for this video. Get the transcript of any YouTube video atfreeyoutubetranscribe.com, free, unlimited, no sign-up.