n8n Tutorial #3: 5 keys to mastering n8n as a beginner

00:14:29
https://www.youtube.com/watch?v=TEsE8HxPnHk

Sintesi

TLDRIn this video, viewers are introduced to the basics of using n8n, including its interface and how it facilitates workflow automation. The tutorial starts by instructing users on setting up n8n, filling out the necessary registration details, and logging in to the main interface. The left sidebar options are explained, highlighting features like templates for workflow initiation, logs of execution, and settings modifications. The primary focus is on creating workflows, which are equivalent to Zapier's Zaps or Make.com's Scenarios. Users learn to use pre-built templates to simplify this process. A 'Quick Start' template demonstration takes the viewer through crucial functionalities, including node operations which process data from left to right, showcasing inputs, processing details, and outputs. A key takeaway is learning how n8n automatically handles data lists, iterating through each item without manual loop creation. The tutorial also touches on the significance of data management using JSON objects and JavaScript expressions for dynamic data handling across nodes, with notices about the limitations with Python usage. Practical operations such as data extraction, node functions, and efficient canvas navigation are presented, alongside a discussion about effectively saving and tagging workflows for easier management. This educational content aims to equip users with a foundational understanding necessary to perform basic automation tasks within n8n, setting the stage for further learning in more advanced topics like webhooks and live APIs.

Punti di forza

  • 📋 Understand n8n's interface for workflow automation.
  • 📈 Learn to send customized messages using workflows.
  • 🛠️ Utilize templates for quick workflow initiation.
  • 🔄 Nodes process data from left to right automatically.
  • 📌 Save your workflow progress regularly to avoid losses.
  • 💡 Grasp the use of JavaScript expressions for dynamic data.
  • 🗂️ Tag workflows for better organization and retrieval.
  • ⚙️ Access pre-built templates to facilitate learning.
  • 🔍 Manual loops aren't needed for data iteration in n8n.
  • 👨‍💻 Customize workflows to fit specific automation needs.

Linea temporale

  • 00:00:00 - 00:05:00

    The video introduces learning n8n, a tool for creating automated workflows, starting with familiarizing the interface and sending custom messages to a list. The speaker recalls setting up n8n by self-hosting, although variables and many settings require an enterprise plan. Workflows, similar to Zapier's Zaps, are the core of n8n. Users click 'templates' to access pre-built workflows, and choose 'Quick Start' to explore nodes. Users can import templates directly to their instance or manually via JSON. n8n's workflow canvas is introduced, where nodes show inputs, process data, and provide outputs, repeating for each node. One can test steps and view output formats. The video highlights n8n's automatic iteration through data lists, eliminating having to create loops manually.

  • 00:05:00 - 00:14:29

    Continuing, the speaker demonstrates extracting useful data fields from customer information using n8n nodes and testing them. A key n8n feature is auto-iterating over data arrays, simplifying workflow processes. Users can add new nodes to a workflow, such as a 'customer messenger' node to simulate sending personalized messages. Using JavaScript and JSON within nodes supports powerful automation, though Python is not supported. In testing the node, each customer gets a unique message generated through iteration. The importance of saving workflows, tagging for organization, and searching functionality are underscored. The video concludes with recaps on n8n's data processing from left to right, JSON object handling, and upcoming tutorials on more advanced features like webhooks and APIs.

Mappa mentale

Mind Map

Domande frequenti

  • What does the video tutorial focus on?

    The tutorial focuses on understanding n8n's interface and sending customized messages to a list of customers.

  • What are templates used for in n8n?

    Templates in n8n are pre-built workflows that you can use to quickly start creating your own workflows based on specific needs.

  • How can we add a new workflow in n8n?

    You can add a new workflow by clicking the 'start from scratch' button or using pre-built templates from the sidebar.

  • What is the pattern followed by nodes in n8n?

    Nodes in n8n process data from left to right, showing inputs on the left, node details in the middle, and outputs on the right.

  • Does n8n require manual iteration for list data?

    No, n8n automatically loops through or iterates over list data without the need for manual iteration flows.

  • How is data transferred between nodes in n8n?

    Data is transferred between nodes as standard JSON objects, which can be accessed using JSON notation.

  • Can Python be used inside n8n nodes?

    No, only JavaScript can be utilized within the double curly braces in n8n nodes.

  • What should be done to save work in n8n?

    You should click the save button at the top right of the workflow canvas to ensure your work is not lost.

  • How does n8n handle data variables?

    Variables in n8n are handled using JavaScript expressions inside double curly braces within the nodes.

  • What is the purpose of using tags in n8n workflows?

    Tags help organize workflows since n8n does not currently support grouping workflows into folders.

Visualizza altre sintesi video

Ottenete l'accesso immediato ai riassunti gratuiti dei video di YouTube grazie all'intelligenza artificiale!
Sottotitoli
en
Scorrimento automatico:
  • 00:00:00
    Are you finding it challenging to learn how to use  n8n? In this video you'll learn all the essentials
  • 00:00:06
    to get rolling. We'll familiarize ourselves with  n8n's interface and get our feet wet with learning
  • 00:00:12
    how to send customized messages to a list of  customers. Let's get started. In my last video,
  • 00:00:18
    we learned three ways to self-host n8n, including  the highly performant and production-grade Queue
  • 00:00:25
    Mode version of n8n, which we installed on a  server with a few simple clicks. If you haven't
  • 00:00:31
    seen that video yet, check it out up here. If  you've self-hosted n8n by following the steps in
  • 00:00:37
    that video, you should see a setup owner account  signup page. Go ahead and register your admin
  • 00:00:44
    account there. You can see that they have a bit  of a questionnaire for you and you can fill that
  • 00:00:52
    out. And once you've done that, this should take  you to the main n8n interface. There are a bunch
  • 00:00:58
    of options on the left sidebar. At the top we have  templates and we'll get back to these in a minute.
  • 00:01:03
    There's variables, but this is only available  on the enterprise plan as well as cloud hosted
  • 00:01:09
    services, so we won't be looking at these. There's  all executions, which is a log of your workflows
  • 00:01:14
    and whether they were successful or not. There's a  help section, which includes the n8n documentation
  • 00:01:20
    as well as a forum. And you may or may not  have an update message that indicates whether
  • 00:01:26
    a new version of n8n is available to you or not. I  showed you how to update n8n using three different
  • 00:01:32
    methods, which you can watch here. Now at the  bottom, if you click on these three dots here,
  • 00:01:38
    you can access the settings. Most of these  settings you can leave as is, and a lot of
  • 00:01:42
    them only are available on the enterprise plan.  But on the personal link here down at the bottom,
  • 00:01:48
    you can set light or dark mode on n8n. Now  just going back to the main window again,
  • 00:01:55
    this area will list all the workflows that  you've created. You can add a new workflow
  • 00:02:00
    by clicking this start from scratch button.  Or once you've added a workflow, there will be
  • 00:02:04
    an orange button here that says add workflow.  n8n consists of workflows. This is equivalent
  • 00:02:11
    to Zapier's Zaps and Make.com Scenarios. In the  main window, this is where all your workflows are
  • 00:02:17
    listed. But in this video, we're going to start by  using a template instead. So on the left sidebar,
  • 00:02:23
    you click on templates, and that'll take you to  a page of pre-built templates provided by n8n
  • 00:02:30
    and the community. n8n provides template workflows  you can use to get up and started quickly based on
  • 00:02:36
    what you need. For starters, let's use a Quick  Start template. So if I click in this search
  • 00:02:41
    box and I just type Quick Start, there will be one  result that says very quick Quick Start. And let's
  • 00:02:47
    click on that. So once it loads, we can click  here to explore and it'll actually show you the
  • 00:02:53
    different nodes that are in this Quick Start.  Let's click use workflow. And there are a few
  • 00:02:58
    options here that we can choose. The first one  is usually the one you want, which is to import
  • 00:03:03
    the template into your self hosted instance. But  as an alternative, you can copy the template to
  • 00:03:08
    your clipboard in JSON format and then paste that  into a text file and save it as a JSON file and
  • 00:03:15
    then import it into n8n manually. But I'm going to  use import template into my self hosted instance.
  • 00:03:22
    And there you go. It's imported. Now, workflows  generally go from left to right, both in this
  • 00:03:28
    workflow canvas view, as well as when you double  click into each of these nodes and there's a node
  • 00:03:32
    detail view. There's a few buttons down at the  bottom here which allow you to navigate around in
  • 00:03:37
    this workflow canvas view. This left button zooms  to fit everything into your canvas space. This one
  • 00:03:43
    zooms in, this one zooms out and this one resets  your zoom. You can also click down anywhere on
  • 00:03:48
    this canvas. And while holding your mouse button  down, you can select as many things as you want
  • 00:03:54
    by dragging a rectangle around it. If you hold the  spacebar down, you can see that your pointer turns
  • 00:03:59
    into a hand and then while holding the spacebar  down, you can actually drag around your canvas
  • 00:04:05
    and move it around this way. If I double click  on this first node here from left to right,
  • 00:04:10
    it shows the inputs that will come into this node  on the left here. Then in the middle, it shows the
  • 00:04:15
    details of this particular node. And then on the  right hand side, it will show the outputs that
  • 00:04:21
    come out of this node once it's processed. This is  a common pattern that will repeat for every single
  • 00:04:26
    node that you encounter. This particular node  doesn't have a lot of options to it. There's just
  • 00:04:32
    get one person or get all people. This is simply  a demo node created by n8n so we don't really need
  • 00:04:37
    to worry about where it's getting the data from.  All we need to know is that it's getting a list
  • 00:04:42
    of customer data. So if I click the test step  button, it will run this node and on the right
  • 00:04:47
    side we can see its output, which is it's grabbed  five records of customer data here. At the top we
  • 00:04:53
    can see the different views to display this data.  By default it displays this in a table format, but
  • 00:04:59
    we can also see it in JSON format as well as the  schema. Now although it's in different formats,
  • 00:05:06
    the data remains the same. There is this pin  button at the top right, which is really helpful
  • 00:05:11
    when you want the data to remain static so it  doesn't continually query this every single time
  • 00:05:16
    you run a test. I can click this on for now and it  says this data is pinned. Now if I close this node
  • 00:05:22
    and I go back to the canvas, if I look at this  second node, it says here extract data and prepare
  • 00:05:27
    it for use in the next node. Now if I double  click on this node, we can see the input that's
  • 00:05:33
    coming into this node, which is the customer  data from the previous node. If you recall,
  • 00:05:38
    the output from the last node contained the data  of five customers. And even though this input is
  • 00:05:43
    only showing the first customer's data, we can see  that it says five items in the input. So what this
  • 00:05:50
    node is doing is that even though in the previous  node it grabbed a whole bunch of data with a whole
  • 00:05:54
    bunch of information, we want to extract the  three things that we're really interested in,
  • 00:05:59
    which is the customer ID, the customer name and  the customer description. So just to show you
  • 00:06:05
    how this was created, I can delete these three  fields here and I can add the new ones. So the
  • 00:06:12
    first one I would call customer ID, leave it as  a string and I can drag this ID that's provided
  • 00:06:18
    in the data from the previous node and drag it  into that field there. Same with customer name,
  • 00:06:25
    and I'll drag the customer's name over here.  And you can see that it gives me an example
  • 00:06:30
    of what would show up here. And in this case, it's  JGatsby, which is the name that it pulled from the
  • 00:06:35
    previous node. And then lastly, I will create one  more and this will be customer description. And
  • 00:06:42
    I'll drag in the notes into this field here. And  this is how we extract data in n8n to a particular
  • 00:06:49
    number of fields that we're interested in. If  we click test step in this node, you can see
  • 00:06:55
    that it iterated five times through the data that  was available. And it extracted the three fields
  • 00:07:01
    that we were interested in, which is the customer  ID, customer name and the customer description,
  • 00:07:06
    and then created a new list of data based on what  we had described in this node here. So one key
  • 00:07:12
    concept I want to emphasize with n8n is that it'll  automatically loop through or iterate through the
  • 00:07:19
    data that's available when it's stored as a list  or an array. We don't have to manually create a
  • 00:07:25
    loop or some iteration flow in our workflows  in order for it to go through all the items. It
  • 00:07:32
    automatically does that for us. Now I just wanted  to quickly pause to ask if you could help me out
  • 00:07:37
    and hit the like button for this video. A simple  gesture like that would go a long way and I would
  • 00:07:43
    really appreciate it. Go ahead and hit that like  button now. So going back to the workflow canvas,
  • 00:07:49
    we can add a new node by clicking on this plus  button. We can go through this list and see what
  • 00:07:53
    nodes are available to us. But for the purposes  of this video, I'm going to search for customer
  • 00:07:59
    messenger. Let's add this as a new node to  our workflow. This simple node provided for
  • 00:08:06
    n8n training allows us to simulate a personalized  or customized message that we can send to all our
  • 00:08:12
    customers in our list. So in this new node, we can  see the input, which is the output that's from the
  • 00:08:19
    previous node. And again, there's five items and  it's the three things that we had specified. We
  • 00:08:24
    can also access the data from previous nodes down  below here. So you can see here, this was the data
  • 00:08:31
    that we had retrieved from the data store from  the first node. But I'm going to use the data
  • 00:08:36
    from the most recent node that we created. So I'm  going to grab the customer ID from the input here
  • 00:08:42
    and drag it to the customer ID field here. And  you can see that it creates these curly braces
  • 00:08:48
    and the text JSON customer ID. And down below it  shows a sample result, which in this case is this
  • 00:08:55
    23423532, which is the ID of the first record  in the previous data. Another important thing
  • 00:09:03
    to note is that there's two options up here. One  is fixed and the other is expression. Expression
  • 00:09:09
    means that it's going to be interpreting  anything in double curly braces as a variable,
  • 00:09:15
    and it's going to plug in something into those  double curly braces. The fixed option literally
  • 00:09:20
    means it's going to be outputting the double curly  braces with JSON customer ID, which is not what
  • 00:09:25
    we want here. So anytime we're trying to insert a  variable from the input data, we want to make sure
  • 00:09:32
    that it's always set to expression. And that'll be  confirmed by showing you a sample result. Another
  • 00:09:38
    dead giveaway is that it shows up in green. So in  the message, let's type out hi, and then we can
  • 00:09:45
    drag in customer name. And again, it shows that  example. And it shows that it's an expression
  • 00:09:51
    and it shows as green. So that's a confirmation  there. So I'm just going to get rid of that space.
  • 00:09:56
    So hi customer name. And then we can say your  description is, and then we can drag the customer
  • 00:10:06
    description in. And it'll show this example. So hi  Jay Gatsby, your description is keeps asking about
  • 00:10:14
    a green light question mark. So that's exactly  what we want there. And I'll put a period at the
  • 00:10:18
    end. Now you may have noticed that when I was  dragging the input fields into the node, n8n
  • 00:10:24
    made some suggestions, many of which appear to be  JavaScript functions. This is because everything
  • 00:10:30
    contained in the double curly braces is in fact  a JavaScript expression. There are two things to
  • 00:10:37
    note here. One, evidently, n8n stores and passes  data between nodes as standard JSON objects, which
  • 00:10:45
    are accessed using JSON notation. And two, since  it's using JavaScript within the double curly
  • 00:10:52
    braces, you can use other JavaScript expressions  as well, such as inserting dates and times,
  • 00:10:58
    transforming data, validating data, among other  things. Throughout this series, we'll go over
  • 00:11:05
    accessing JSON objects and other n8n JavaScript  expressions in more detail. But for now,
  • 00:11:11
    just know that having JavaScript baked into all  nodes opens up a world of powerful capabilities.
  • 00:11:18
    I should mention that only JavaScript can go  into the double curly braces, and unfortunately,
  • 00:11:23
    Python cannot be used. So again, note that  n8n is showing there are five items in this
  • 00:11:29
    list or array, even though it's only showing  one result, the first result from that list of
  • 00:11:35
    items. Let's click the test step button. And you  can see here, it says sent message to customer,
  • 00:11:42
    and then that's the customer ID. And then there's  the message. Hi, Jay Gatsby, your description is
  • 00:11:48
    keeps asking about a green light. So again, it  iterated through all five items, and it created
  • 00:11:53
    the custom message for each one. So you know, this  one is your description is lots of people named
  • 00:11:58
    him, very confusing, and so on and so forth. Now,  just a couple of other things I wanted to mention,
  • 00:12:04
    if we go back to the workflow canvas here, make  sure to save your work by clicking on this button
  • 00:12:09
    at the top right. Otherwise, you could lose all  the work that you've done. And the other thing is
  • 00:12:15
    you can rename your workflow to whatever you want,  you simply double click this. And you can say this
  • 00:12:22
    is my first workflow. And the other thing you can  do is you can add tags, it can be helpful to tag
  • 00:12:28
    your workflows, because at least at the time of  this recording, n8n does not have the capability
  • 00:12:34
    to group workflows into folders or directories.  So you can only filter things using tags. So I
  • 00:12:41
    might want to tag this with like, tutorial, for  example. And so that adds that as a tag. And now
  • 00:12:47
    when I go back to the main homepage, which lists  out all my workflows, right now I only have one.
  • 00:12:52
    But if I do list out all my workflows, I can then  select filters here, and it'll say filter by tags,
  • 00:12:58
    and I can actually choose the tutorial tag. And  that would just list out all the workflows that
  • 00:13:04
    have been tagged with tutorial. Now the other  thing I can do is I can just search by keyword.
  • 00:13:08
    So if I wanted to search for like, you know, first  workflow, it'll actually pull up anything with
  • 00:13:14
    that keyword in it. Now we could continue building  out this workflow by sending these messages out to
  • 00:13:19
    each customer via something like SMS or WhatsApp.  But that's outside of what I wanted to show you in
  • 00:13:26
    this brief introduction to n8n. So we learned how  the n8n interface works. We learned that workflows
  • 00:13:33
    generally get processed from left to right. The  nodes interface also runs from left to right,
  • 00:13:38
    taking some input, processing it, and producing an  output. We learned that a node will automatically
  • 00:13:44
    loop or iterate through any list or array  of items, and the results will be seen in
  • 00:13:50
    the output. Lastly, the data passed between nodes  are JSON objects, and anything contained in double
  • 00:13:57
    curly braces is a JavaScript expression. I hope  this helped to give you a solid introduction to
  • 00:14:03
    how n8n works and gets you well on your way to  using n8n to make some crazy cool automations.
  • 00:14:11
    Please remember to like this video and check out  my next one in this tutorial series to learn more
  • 00:14:16
    intermediate concepts of n8n, including how to  use webhooks, querying a live API, and adding
  • 00:14:23
    custom Python or JavaScript code. Thanks for  watching, and I'll see you in the next one.
Tag
  • n8n
  • workflow
  • automation
  • templates
  • interface
  • nodes
  • JSON
  • JavaScript
  • tutorial
  • data iteration