📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

n8n : De DÉBUTANT à PRO en 5h30 (2025)

Naier Saidane5:33:47

Transcription

In this video, I will deliver to you the ultimate masterclass to go from beginner to pro on NN with no useless theory, only practical application. We will look at the fundamental concepts. Then, we will look at some advanced concepts that are useful in business, AI agents, and concrete practical cases. This is not an 18-part series or a paid training. Everything is here in this video, and as usual, in the description, you will find a link to download everything we will build today. I am Ner, and on this channel, we talk about AI, we talk about automation, and we talk about business. Today, I am delivering an NN masterclass that I haven't seen anywhere on YouTube, neither in the French-speaking world nor elsewhere. Okay, we will start with a bit of theory. I promise you just a tiny bit, a few minutes to introduce you to what it is and compare it to other solutions. So, the objective of our masterclass today will be to acquire the necessary skills to create, deploy, and monetize automation solutions in N8N using AI, if, well, if it's needed. As usual, you know me by now. I apply the 80/20 principle. I will show you the 20% of N8N's features that will serve you in 80% of business cases. So, whether it's for your own business, to automate part of your business, or if you wish to sell automation solutions to your own clients. So, what is Nen? Well, Nen is not really pronounced NN, it's pronounced N10, so 8 in English. And it's a platform that is no-code, or rather a low-code platform. This means we have a visual interface with which we can manipulate, manipulate small capsules, and be able to create automation workflows. Now, Nen is fundamentally an open-source platform, so the code is available. You can download it, you can force, therefore, install it on any server. So, this is one of N8N's strengths. And there are two, two hosting modes. So, there is a self-hosted hosting mode, what we call self-hosted. So, you integrate it, you deploy it on a server that belongs to you, or you use the cloud version of NN. It's a tool called node-based, meaning that the workflow you, the automation you will set up, is made up of nodes or capsules. But in the world of Nen, we talk about nodes, and therefore nodes. And that's where the N's at the beginning and end of the name N8N come from. So, there are nodes, and these nodes have their own characteristics, they have input information, and they provide output information. N8N has the particularity of being native JavaScript, meaning there is a module in NN where we can put JavaScript code, which will be very useful when we do a lot of data manipulation. Now, rest assured, you don't need to know JavaScript. To do this, having ChatGPT or Claude at hand is more than enough. Nen has over 500 integrations. So, these are connectors that allow it to interact with external applications like Google Sheets, Google Docs, Excel, and so on and so forth. So, the main services and applications. And then for all applications where there is no native integration, there is what is called the REST API. So, this is a module that will allow you to connect to any API, even without a native integration. Now, the origin, as I told you, N8N, so the N is for Node, and the 8 is the infinity or automation part, let's say. And that's where the name NN comes from. It's the founder, Jan Aberhauser, I think that's how it's pronounced. He's German, and he came up with this name. And so, it refers to the fundamental concepts of NN, which is node-based automation. Nen, well, it's not an application that's very old. It was launched in 2019. A first version came out in 2020, and then there were quickly many funding rounds. So, it's a startup, and that's what's great about Nintenden, is that every week we have new versions with new features. There are always evolutions coming out, and that's great. It's a very, very active world, N8N is truly very active, and it has successive funding rounds. One took place a few weeks, months ago, in March if I remember correctly, where they raised 55 million euros. Now, what distinguishes Nen from other platforms? Well, there are three major platforms in automation. We have Make, on which I've already done a masterclass for you on the channel, which you can find. There is Zapier. That's the, let's say, the historical automation tool. And then there is N10. Nen distinguishes itself on several points. First, in terms of user interface, it has a rather modern interface. It's what we call developer-friendly, meaning it allows a lot of code insertion, code modification. As I told you earlier, it doesn't mean you need to be a developer to use it, but it's more oriented towards developers than, for example, MI, which is very, very visual. In terms of functionality, we have a major, capital functionality that everyone is talking about in 2025: AI agents integrated into NN, which until a few weeks ago didn't exist elsewhere. Now, Make has just launched the same functionality, but it's in beta, so it's in test mode. For me, it's not something that can be put into production, it can't be deployed to a client, let alone in a business. So, it's not a viable option for now. It's still in beta mode, it's still in test mode. It will certainly arrive soon, it will become standardized, usable in business. But for me, as long as it's beta, it's not a solution we can rely on today. Nen has better management of complex flows when it starts to have many branches, a lot of complexity, a lot of code, and so on. Nen is much simpler to use than the others in this regard. As I told you, native JavaScript, and that's huge compared to an interface, compared to a tool like Make, where we are forced to call other applications to put code like JavaScript or Python. Here, it's natively integrated. Now, there's JavaScript, and they recently added Python. We might look at Python during the masterclass. The last time I checked, it was still in beta mode, but they've added a very, very widely used code on the web, which is Python. So, JavaScript and Python are the two biggest codes used on the web today. It has a better testing tool, a much better testing tool, and we'll look at that with the part on how to test workflows in N10. It's super simple, very intuitive, and very, very easy to use. And it also has quite a few integrations. Now, it doesn't match the number of integrations in Zapier or Make, but it still has a large number of integrations, and then the REST API module to integrate everything else. In terms of documentation, it's frankly the best documentation I've found. Now, it's mainly in English, that's true. On the Nen website, there are many, many workflows that are already set up on the Nen site that you can download and use directly. So, in terms of support, documentation, and community, it's the most active of the three. Regarding pricing, well, there are several pricing models. That's what distinguishes it from other solutions. Unlike Make, for example, which is a SaaS application, there's no notion of operator. Here, we have two options. So, there's the SaaS mode, which is you can get a subscription with NM10, and you have access to the tool as you would have access to mail when you get a subscription. And we'll look at the subscriptions later. There's a notion of pricing, etc., that's different from other platforms, which I find interesting. And then there's a self-hosted mode. You can install NM10 on your own server, which gives a lot of flexibility for clients who are very concerned about data protection and who have internal policies that prohibit them from storing data elsewhere, for example. So, we'll look at that. And so, why Zapier first? I don't recommend it anymore today. It's more of an automation tool that can be used today. So, there's Make and N. Make is the best compromise for beginners. If you don't yet know the world of automation, it can be a good starting point. And then it's the most powerful over time. It's the most economical when dealing with large-scale automation. It requires a bit more technical expertise, but you'll see that in the tests we'll do today, in the workflows we'll build today, technical expertise can be overcome. Once you understand the fundamentals and how it works, technical expertise is no longer a real barrier today with ChatGPT, with Claude, which can generate the code you need. Now, what distinguishes N8N from traditional development? So, traditionally, what did we have before? Well, we had developers who developed applications. And today, with automation tools like NN, there's enormous accessibility for non-developers. That is to say, we have a visual, no-code interface that we can use to perform complex and complicated developments that can be put into production, and that's great. Implementation time is phenomenal, 10 times faster than development. It's astonishing the time it can take, or rather the little time it can take to set up a workflow that is used in production in a business. Now, it's simplified. If I need to remove a module, a step in a workflow, it's really visual. Unlike development, where if it's in a very specific place, etc., you'll have to review all the code, redo the entire application, etc. In short, it's incomparable. Visual debugging with the interface, etc., makes it very easy to set up workflows. And then adaptability to change, meaning modifying something means adding a node or modifying the node's configuration. The entire integration part, if there's an API change, for example, if you use native integrations and Google decides to change its Google Sheet API tomorrow, well, all of that is handled by N8N in your workflow. You won't have to change anything. You directly use the same functions, and what happens behind the scenes is managed by NN, which will update the API for you. So, that's great, something you won't have when you do development. You'll have to do it all yourself. Now, when do I decide to use N8N over Make? Whether in my business or for my clients, I ask myself four main questions, and that's what helps me decide which one to choose. The first question: do I need an autonomous AI agent? That is, do I need an agent that has access to tools and will use those tools to produce a result? Second question: do I need to add a human into the automation loop? Do I need a review from someone, a human, and to ask the AI to rewrite something if there's an error or something wrong with the human? Second question. Third question: are there multiple calculations to be done? Are there multiple data manipulations to be done? I need to change, do a lot of calculations, etc. And then the fourth question: is there a client constraint? So, regarding security and regulations, which prohibits the company from storing its data in the cloud, etc. If I have a "yes" answer to any of these four questions, I go for N8N. If for all these questions, I have a "no" answer, then I choose Make because it's necessarily simpler to use, faster to implement because there's less code, etc. So, it's simpler in that case. So, there you have it, whether for myself, for the businesses where I deploy, I don't systematically choose NMEN. I ask myself these questions and I directly offer clients NEN or Mak. You may have also noticed, I don't ask about cost. Why? Because NEN in the cloud starts at €24, €60 if you have a lot, a lot of workflows running. So, what is €24 per month or €60 per month? And similarly for Make, it might be if you do a lot of operations, you'll need around forty euros to use Make and to do your operations. So, what is €40 or sixty euros per month for a business for me to suggest installing N8N on their server, etc.? Well, it makes no sense. It will add complexity. So, every time I need to make a decision on this, it's these four questions I ask myself. And then the cost aspect is really the last, the last point because when I implement an automation, it's to bring value to my clients, and the value is certainly much more important than the forty or fifty euros they will spend each month. And they will certainly not look at that aspect. So, the cost aspect, I hear many, many people talking about it to say, "I choose NN to put it on a local server because it costs €15 instead of costing €24 per month." That's really absurd. No business thinks that way. So, don't try to complicate your life when there's no complexity, and when you are there as an expert and you offer solutions to your clients. That's it for the theoretical part. You see, it was super fast. So, what we're going to do now is go into the interface and start manipulating the interface. Now, let's take a look at N10 itself. So, this is the N10 website, it's N10.io, their website. Now, it's in English, it's not a big deal. I'll guide you through all the steps on how to get there. So, don't worry about that. The thing we're going to look at is the pricing section. So, the pricing, in fact, presents three plans. Now, I'll switch to monthly because that's what interests us most. There are two main plans presented, and if you want to go for enterprise, it's another plan that's not publicly displayed. So, the two main plans are the €24 here, and the pricing is based on the number of workflows executed. What does that mean? It means that all the time you spend testing and setting up your workflow, you won't pay anything at all. Well, it won't deduct anything from your, from your plan. So, the 2500 executions here are 2500 executions when your workflow is activated, so it's in production. So, all the time you spend testing and validating your workflow for free. That's an advantage compared to Make. Make, if you use it or have used it elsewhere, it counts a number of operations. Every time you execute a node, not a whole workflow, every time you execute a node, for example, you retrieve a line from a Google Sheet, you calculate a value from the information in that Google Sheet, and put the calculated value back or store the calculated value again in the Google Sheet. That's three operations, and even if you're modifying, changing your workflow, it counts as three operations deducted from your Make plan. Unlike N8N, where N8N counts by workflow execution, not node execution, and that makes a big difference. That's why they say 2500 workflow executions with unlimited steps. And the second limit with this €24 plan, which can sometimes be limiting, is that you can only have five active workflows, meaning activated in N8N. If you want to test, you can create as many workflows as you want, but from the moment you activate it, so it launches automatically, it counts towards the limit of 5. And so, generally, when I deploy for my clients, when there are quite a few automations, we move to the €60 plan. Otherwise, we stay on the €24 plan when there aren't many workflows. So, that's an important point to consider. The hosted by NN part here has advantages. It has advantages in that you won't have to manage a server. Everything is managed by NN. It's him who, it's him who takes care of all that. Then, they have what's called the open-source version. So, for the open-source version, you go to Community Edition here. And so, it's a basic version available on GitHub that you can install on your own server. So, the advantage of this version hosted by NN, there are a few. For me, the main advantage is immediate setup. You sign up, you get a 14-day free trial, and then you switch to paying €24 per month. So, it takes 2 seconds to start setting up the tool. Imagine you have a client, and you want to deliver an automation to them. If they don't need a local server, and you suggest installing it on a server to save €10 per month, you'll have to get them a server, explain why you're getting a server, tell them it's a server that belongs to them, that they'll have to manage it, and all the hassles they'll imagine in their head. I don't recommend it, and I'll say it again, except in very specific cases. The advantage of the version hosted by NN is immediate setup, as I told you, automatic updates, official support from NN, and then quick startup, and connections with external APIs are super facilitated. When you're on the N8N version, connections with Google Sheets, with all external APIs are super easy, unlike the hosted version. The hosted version, unlike the NN version, well, you'll have to install it on your own server. There are several deployment options. Now, the advantages are total control. You have control over everything on it. The data belongs to you, and only you have access. Also, know that on the cloud version, it's secure, it's GDPR compliant, it's a German company, so European. It's obliged to comply with all laws, GDPR, etc. So, you won't have any problems on that front. The advantage of the community version, however, is that you can add what are called community nodes. So, since there's a community and an open-source version, well, there are what are called community nodes. So, these are nodes that haven't been made or developed or integrated into the official NN version. And so, you won't find them in the cloud version, you won't be able to install them in the cloud version, but you will be able to use them in the N8N version hosted on your own server. Of course, if you get your own server, well, you'll have to manage all the technical maintenance and think about setting up regular server backups because a server can crash, you can lose all your data. Now, we'll stay and continue the masterclass on the cloud part because it's going to be much simpler. So, here, the first thing to do is you can start a free trial. You'll be redirected to this very simple screen. You enter your name, your email, you reconfirm your email and password, and then you'll enter an account name. And so, the account name you enter here, if you concatenate it with app.n8n.cloud, that will be your access interface to Nen, that will be the link to your interface. So, let's say I choose to put coucou.app.n8n.cloud, that will be the link intended for me, and only me. No one else will have access to this Nen link except me, my company. So, as soon as you sign up, you'll find yourself in Nen. And so, what I'll do is I won't create a new account, I'll go to my existing account and show you the entire interface. So, as soon as you arrive in NN, you arrive in this window which, in the middle, lists the number of workflows you have, across several pages, if there are several pages. And so, there's the section here, so you see all the workflows. There's a credentials section that lists the accesses you've configured. So, if a workflow has configured access to WhatsApp, access to Gmail, and access to Google Sheets, you'll see all the accesses here in this window. Then, executions, well, that's the last executions of the workflows you have in your N8N instance. At the top, there's a small summary of the number of production executions, the number of executions that had issues, the error rate, I don't know this indicator, and then the average execution time of your workflows. So, you see my workflows take an average of 10 seconds to execute. So, this is the middle of the interface when you arrive directly on NLN. On the left, you see there are quite a few accesses here. So, this menu is what we call the overview. Then here, you can create projects and directories. And this is a feature that was added very recently by NN. You can create projects here and group your workflows into different projects. So, if I want to create a project, let's say masterclass, it will appear here as a dedicated project, and I'll see all my workflows for the masterclass project on this screen. So, it's a way to group workflows in one place. Then, at the bottom, we have quite a few screens here. We'll keep them. So, there's the admin panel. The admin panel is the screen that will allow you to manage your NN instance. So, I'll go into the admin panel and give you a presentation of the different screens here. So, in the admin panel, there's mainly this dashboard menu here, which shows me the number of executions I've done in the current month and gives me the number of my active workflows. So, you see, I've executed about forty times, and I have three active workflows in the current month. Just a little higher, you see that my NN instance is running on version 1.89.2. So, this is the instance currently running, or my N8N is currently running with this version. With this version, I can very well modify and go to a higher version from this screen. So, if I go back to the dashboard, you click on the little, the little button here, and then you arrive at this menu. So, here you can manage your plan. So, here you can change your current plan. So, I have the €24 plan, I can go to the higher plan if it interests me. Right here, I have my current version, so it's 1.89.2. And if I open this box, I'll see which new versions I can, I can go to. So, here, there's a stable version and a beta version. So, the latest stable version is 91.3. I'm on 89. So, there's a stable version that's higher than my current version. There's a beta version that's even higher, but it's in beta version. It hasn't been properly tested yet, it might still have bugs. So, what I advise you is to come here from time to time and upgrade your version to the latest stable version, not beta. So, if you upgrade your version, you'll always go to the latest stable version of N8N. You should do this from time to time. So, if you see, for example, in videos, my videos, other videos, talking about a feature, and you go into your N8N and you don't find the feature, it's likely that you haven't upgraded your version to the latest available version. So, remember to do that. I'll launch this right away. I'll just show you the other settings. There's the time zone. So, here I can set my, my, my time zone. So, here I've set my current time zone. And here we can tell N8N what it should save. Should it save in its history? Well, we'll look at that later. I wanted to show you the history of all executions, of all workflows, earlier, but we'll look at it workflow by workflow later on how it appears. So, here, by default, they are all checked. So, it will store all manual executions when you do tests. It will save all executions that had errors. It will save all executions that are successful, meaning they worked well. At the bottom here, so there's my current version of N8N, and then I can restart my workspace. Now, I've never had to use it, but probably if you see that you have bugs, etc., or something isn't working very well, you can very well restart your workspace. So, in fact, it's as if you have your own server and you have control over it. You choose which version you want to use NMEN, if you want to go to a higher version, etc. Something that doesn't exist at all on other tools. Other tools, they deploy new versions, they won't notify you, and you'll have the latest features without having chosen to upgrade to a higher version. So, here I've chosen the latest stable, and I'll save. And then it asks me to confirm because it needs to restart my workspace. So, if I have workflows that are currently running, it will stop them. So, here, hop, I say OK. And so, here you see my workspace has turned orange. This means it's deploying the version. So, I'll go back to the dashboard. You see, it's still orange. This means I can't open it because it's saving, well, deploying the new version. And in a few seconds, it will turn green. This means it has finished deploying, and the new version is in place. I'll continue on the dashboard. Here you have access to the forum. So, all N8N support, you'll also find it in the forum section. It's in English, unfortunately. It's almost entirely in English. I haven't seen any, I don't think there's any French. We can take a look. Maybe I'm mistaken, but I haven't seen any French. I think the support is exclusively in English. So, it's very, very active support. So, if you sometimes have problems, you can do a quick search here, and you'll see how it works. Okay, it has finished installing the new version. So, it has deployed the new version for me. And so, here you see, I have the latest version. Of course, I've upgraded, I can't go back. But I still see the latest beta version, which is still in beta, so I won't use it. On this link, you can see all the evolutions they've made from one version to another. They have what's called in English, release notes. And so, in fact, each time they'll tell you from one version to another what has been deployed new, what are the new features, who contributed to these features. Okay, I'm still in the manage section. So, we talked about the workspace section. There's a billing section where you can set up your payment method and you'll see all your invoices. And then here, you can back up all your workflows at once. So, it will download them all at once. Here is the help center with the documentation, some documentation, but you won't necessarily need it with this masterclass, you'll have everything you need to understand about Nen. Back to the dashboard section, and we'll click on open. And so, by clicking on open, it will take us back to the main interface, and we'll leave the admin panel section. We continue on the menu section. So, we have templates. So, these are all the templates available in the N10 knowledge base. And in fact, there are a lot of them, there are a lot of interesting ones. Unlike Make, for example, where there are templates, but they are frankly unusable. Here, there are many, many templates that are quite complex and can be used as is. So, if you need to create a very specific template, etc., take a look here. It can help you get ideas on how to do it. We continue on the interface section. We have a variables section here where you can add variables. Now, you will frankly not need variables. I never use this feature. Now, it's only available in pro mode. But frankly, there's no real need for it. When you manipulate data generally, and when you use workflows in your business, you'll retrieve information from one place and modify it and store it either in the same place or elsewhere. So, variables and data, you'll retrieve them from elsewhere. So, you frankly don't need to store variables in N10. I've never had the need. I've never had the need to put variables in N8N. If you need to store information, store it in the client's system or in your system rather than storing it here. Access will be easier. If tomorrow you need to modify it, you modify it in the source system or the destination system, but not in NN itself. Now, the insights section is a recap of the indicators we saw a bit higher in the personal section, and if you have a pro version, you can have a bit more insights, but frankly, no interest, no interest there. Then, on the help menu, there are many links to different places. So, there's what they call a quick start. So, it's a video to quickly introduce you to the interface, but I've already presented everything you need to know. Access to documentation, the forum, training courses made by N10. And then if you want to report a bug in their interface to Nen, it's from this link that you can do it. And here are some information concerning Nen. So, these are screens you'll rarely need to use. The only screens you'll need to use are the overview section. If you're on a specific project, well, it's the link to the project itself. The admin panel section to upgrade your version from time to time. And that's it. Here.

At the very bottom, uh, when you click on the three dots, there are two, uh, two access points. So there's the signout part to disconnect and the settings part where you can define your, well, redefine your first name, last name. You can set up two-factor security, so with mobile applications, and then you can choose your theme. Now, I like the dark theme, but there's also a light theme. If you want, we can test it. I find it very hard on the eyes. So if you want the light theme, choose the light theme. If you want the dark theme, choose the dark theme. And me, since my system is in dark mode, I leave it to system default. It will be in black. Uh, then, there are other configurations here. So we went into the settings part. I can add users. If you have many users in your teams, this is where you can give them access. So they won't have access to your account. They will be able to use, uh, their own account. So here, you click on invite, you give the name, you give the role. Now, when you are in, uh, on the current plan that I chose, which is the starter, you cannot manage roles. When you are on the pro mode, you will be able to manage roles. So add an invitee in member or admin mode. An admin will necessarily have more functionality than a member. So here, you can control NN via APIs. You won't need that, we'll go directly to external secrets. So this is for the enterprise plan, you won't need that. Uh, environment, same, you won't need that. SSO, this is for large companies that want to use their Google or Microsoft login system to connect to the tool. This is not for you. Uh, the Hab, this is to retrieve, uh, what they call the active directory, uh, of companies to have all the, all the, all the company member information. So this is for large groups. Uh, and then log streaming, this is also for the enterprise part, the enterprise plan, so you won't need that. So in here, what really interests you is if you need to change something, your email, etc., but that's it for the settings part. So, we've done a complete tour of the entire interface, which is global, well, general to NN across all menus. Uh, and so now, what we're going to do is we're going to go into the personal part or the masterclass part. Uh, it's the same, you see, it looks similar. Personal, it groups everything. Masterclass, it means I'll only have the workflows of what I'm currently creating. And we're going to create a workflow. So how do you create a workflow? Well, it starts here. So there's create workflow. Now, if you want to create a credential, so a credential is access to an application, you can create it here, but you won't necessarily need it because we'll create the accesses as we build our workflow. So you won't need to use it here. If you want to organize your project into directories, this is where it happens. So if you want to create directories within the masterclass. So I'll do module 1, for example. This is where it happens. So I could create several workflows, several directories like this, and I think we can even create nested directories for workflows. So I can recreate another directory under module 1. So we can go very far like this in terms of nesting. If you have several workflows and you want to organize them, this is how you can do it. The most important button and the most important point in this interface, what is it? Well, it's create workflow. So create a new workflow. So I'll click on create a new workflow, which will take me to the NN interface. Now, the menu on the left, you've probably noticed, is the same, it hasn't changed. The rest of the interface has changed a little bit. So we'll tour the interface. In the middle, we have this big plus button, uh, which will allow you to add nodes and build your workflow. We'll use it in a few minutes. Uh, we'll just tour the other, the rest. So here on the left, at the top, we have the link. So we can go back to the project I'm in. I can change the name of my workflow. So I'll put first workflow. [Music] masterclass, and since we are gentlemen, we'll add a little [Music] emoji. It's nice. So always rename your workflows so you can find them. I'll go from left to right. So if I move a bit forward, I have two buttons here. There's the editor button and the execution button. And so in the editor, I'll see my workflow, I'll be able to modify it. In the execution button, I'll see all the executions of my workflow, whether they are executions, uh, while I'm testing it, building it, or executions when I've activated it later. And so you'll see all the executions here. Okay? So if I look at this workflow here, it's a workflow I made on Make that I redid on N10, which allows me to automatically retrieve all offers from codeer.com. So here, if I go into, so here in editor mode, I have my workflow displayed here. In execution mode, if I switch to execution mode, I see all the executions of the workflow passing one by one, and I can go back to any execution displayed here. And I can see the executions and I can see the details. I can click on the nodes to see what data arrived at the nodes. Here, I see at what time it launched, how long it lasted, and a unique execution ID. So this is the execution menu. I'll go back to the workflow we started creating. So we talked about the editor, we talked about executions. Then, here there's a small toggle called inactive. And so, in fact, when I activate this, well, when I click on this button, it will transform, well, it will put my workflow into production. Remember, I told you, you can only have five active workflows. Well, if you put this toggle, uh, to active, your workflow will execute automatically according to the frequency you've defined, and it will be deducted from your plan, which counts five active workflows, uh, at most. Then, you can, uh, share the workflow with your team members if you're interested. Here, it displays the status. So, if I've modified something, it will go into saving mode and it will save itself. Uh, so there's an automatic saving feature. Here, it shows the backup history. So if you click on this little button, you'll find the history of all the backups that have been made. Then, there are these three little buttons. So what's in this menu? So you'll be able to duplicate a workflow. If you want to start from an existing workflow to create a new workflow, this is where it happens. You'll be able to download it, you'll be able to rename it. But you can rename it directly here by clicking on the name. You'll be able to import a workflow from a URL. This is typically, uh, interesting when you find a workflow in the NN community that interests you and you want to have it for yourself, well, you'll find a URL, and by adding this URL, you'll be able to put it in your, uh, in your account. And you can import files. Just as you can download files, you can re-import them, import workflows that come from elsewhere. And by the way, in the masterclass, you'll have, we'll build workflows, so you'll be able to download them all. You'll find a file and to put the files back into your N8N, this is where it happens. So you'll import a file, you'll choose the file, and the workflow will be imported directly. Here, settings, so these are configuration information that concerns only this workflow. So what do we have in there? Execution order. So this is left in V1. There's nothing to do. You don't even need to understand it. In fact, there used to be an execution order that existed. Uh, Nen changed its execution order and recommends using the new execution order. So leave it as is, nothing to modify. Error workflow. So this is interesting. When you execute a workflow and there's an error in the workflow, you can, uh, call another workflow that will handle the errors. This workflow, who can call it? So can it be called by workflows that are only in the masterclass project, or can it be called by any workflow? This is where you, uh, you define it. And if you set the time zone of the workflow itself, which can be different from your time zone. Uh, what do I do when I have production executions that have an error? I save them by default. What do I do when I have production executions that have, that went well? I save them by default. What do I do when there are manual executions that have been made? I save them by default. So nothing has changed there. And can I see, uh, the executions that are in progress? Yes, in default mode, but it doesn't save them. It only saves them when they are finished. Timeout workflow. So this is if you want to set a time limit after which the workflow stops. For example, you can say after 4 hours, I want my workflow to stop. You've launched a workflow, it might have crashed, it might continue to run because it can't find the information. This is where you can say, "I want my workflow to stop after a certain, uh, after a certain time." But this is not important because, uh, in any case, it's the number of executions that is counted in one, and not, uh, the time it took to execute. Uh, estimated time sale. So this is, you can, well, yes, this is where you can define the number of minutes a workflow has saved you. So let's say you were building a workflow for a client and you estimate that with each execution of the workflow, the client will save an hour of their time. You would put 60 minutes here. And remember, in the main interface, there was an indicator that I didn't understand earlier, and that I've just understood. Uh, well, this time saved, so the number of, the time, uh, saved in the last seven days, it will be displayed here. So if my workflow saves me 1 hour of time with each execution, and there have been five executions, I will save 5 hours. And that's the indicator. So this can be an interesting indicator for clients, ultimately, to have this information, and that after a while, you come back and give them a report of the time saved thanks to your, uh, to your automation. So, hop, we'll remove that. For now, we don't need it, and I'll save my, uh, my settings. So, there, we've done a complete tour, I think, of everything that's around, uh, the interface. And well, now, we'll get started, and we'll click on this plus button, and we'll start looking at the nodes. We arrive at the core of NN, and where you'll spend most of your time on N8N, and thus, building workflows. So there's this big plus, uh, where it says add your first step. So you have two possibilities. Either you click on this plus, uh, and this plus will only be visible when you place your first node. Otherwise, there's a small plus here on the right, at the top. And otherwise, you have a keyboard shortcut, which is tab. So when you click on the plus here, the window on the right will appear. When you click on the small plus here, it will display the same thing. And when you click on tab, it will display the same thing. Here, what is displayed are the nodes you can add. And in fact, in this first view, it only shows what they call triggers. So, what is a trigger? A trigger in French is a déclencheur, and so it's a node that will trigger the rest of the workflow. So you'll add a trigger that will cause your workflow to be triggered, and then you'll add action nodes. So, what triggers do we have here? We have a first trigger that is manual, meaning that when you click on it, the workflow will be triggered. We have triggers that are application-specific, so events that are linked to a particular application. For example, a row has been added to a Google Sheet. I'll go into app event, and I'll find all the applications that have triggers, so déclencheurs. So if I look in there, well, you can use the search bar here, and type directly what interests you. So if I type sheet, so there's Google Sheet, and so here are the triggers, the déclencheurs for a Google Sheet. So in the case where a row has been added, in the case where a row has been updated, or in the case where a row has been added or updated. So you can have these three triggers in Google Sheet. So I'll go back to the main view. We said there's the manual trigger, there's the trigger from a specific application. Then there's on schedule. On schedule means you trigger your workflow at a specific time. So you can trigger it, for example, every hour, every 15 minutes, once a day at midnight, etc., etc., or, uh, every Monday at 4 PM. In short, you can, uh, configure it as you wish. Then, there's another trigger here, which is on webhook call. So, what is a webhook? It's nothing more than an entry point that is listening, and as soon as someone calls it, it will receive data from the person who called it and it will trigger the workflow here in Nend. So we'll talk about it later, it's just to give you everything we have. Form submission. This means that in NN, you can add a form, and when the form is filled out, you can trigger an action, a workflow in Nen. So Nen offers the possibility to generate a form in Nen and integrate it elsewhere. So you can integrate it into your website, for example. We have another trigger that triggers when another workflow calls this workflow. So you can call a workflow from another workflow. And this is the trigger you'll put in the child workflow that will be called by the parent workflow. In chat message. This is also Nen that has developed a chat system. You see the little bubbles that usually appear on websites to contact support? Well, NM has its chat system in place, and you can use it and you can set it up on your website. So you can easily imagine setting up a chatbot on your website using NN. There's a whole other set of triggers listed here. We'll look at them. We have the email trigger. So when an email arrives and is received by your workflow. Error trigger. So this is, we can create a workflow that is triggered when an error occurs in another workflow. Let's say you have workflow A, which, uh, performs operations. When it, uh, encounters an error, you can configure it so that another workflow is called, and you are notified, for example, by email or on Slack or elsewhere. MCP server trigger. Uh, and so this is what we call MCPs in AI agents. Uh, this is a concept that I need to explain to you, but in more detail. So we'll skip over it today and we'll talk about it, uh, probably later. On instance events and actions SSE trigger. Uh, so these two, uh, general ones, I've never, never had to use them. I think you'll never need them. So no need to go further on this. Okay? So, what we'll do is we'll start with a fairly simple trigger. We'll put a manual trigger here. Uh, and in fact, when you add a trigger, you can, uh, uh, move your, uh, your workflow here. So you click on, well, on Mac, it's Command. I think on Windows, it must be Control, I believe. Uh, so try it, and so you click on Command and you, uh, click on the mouse, and you can move your workflow like this. You can also click on Command and, uh, scroll the mouse wheel. This will zoom out and zoom in the workflow. So this is how you navigate in this middle space. So what is this, uh, what is this node, click, and in fact, it's simply a node that is triggered when you click on test workflow here. So you click on test workflow, and the node, and the workflow is triggered. When the node turns green like this, it means it has been, uh, it has been launched, and it has been launched positively, meaning the return is positive, there were no errors. And then, there's a small arrow coming out, well, a small, a small line coming out of the node where it says item with a number. And in fact, this indicates how many elements came out of this node, uh, to the next node. So this is a notion of items that we'll detail just after in the masterclass. So here, I'll add another node. So this is the trigger. The first node is generally the trigger. Now, you can have multiple triggers. If you want to trigger a workflow, uh, for example, from a webhook or at a certain time of day, you can add multiple triggers like this in the same workflow, something you can't do in Make, for example, where you can only have one trigger per workflow. So this is how you can have, you can combine multiple workflows. If you have several workflows that do the same thing, you can combine them into one. So right after this trigger, we'll add an action node. And so here, there's a list of action nodes, well, categories of action nodes, uh, that are listed here, which we'll explore. So, what action nodes do we have here? We have, for example, everything related to AI. So, what do we have in the AI part? Well, the first link is to templates. So Nen can take you to templates that are already, uh, available, that have been made by community developers, and you can directly put them in your. Otherwise, what are the real nodes? In fact, we have the AI agent. So this is the element that is, uh, where there's the most buzz this year. It's the AI agent, which can have external tools and can perform actions autonomously. We have OpenAI, so ChatGPT, we have a node that gives us access to ChatGPT. We have a basic LLM chain. So in fact, with this node, we can access any, uh, LLM. So it can be ChatGPT, it can be cloud, it can be anything. We have a node that allows us to extract information. So it will allow us, from input data that is, that is not structured, to extract information in a structured way. Then, we have a node that allows us to manage a question-and-answer chain. Typically, when we put an agent, when we have an agent that does chat, we'll put a question-and-answer type agent. Here, we're on a node that allows us to analyze sentiment. So you give it text, and it will analyze the sentiment of the text and tell you if it's a neutral, positive, or negative text. We have a node that allows us to summarize. So you give it text as input, and it will summarize the text. We have a node that allows us to classify. Typically, if you have a support email inbox and you want to classify emails and label them, well, this is the node that will allow you to classify emails. So anything related to classification. And we have this last node that allows us to transform using AI. Now, there are other nodes here, uh, related to AI that are listed here. Well, everything that is loading, so everything related to document loading, uh, the language of the model, memory, but we won't access all of that from here, we'll access it directly from the agent itself. We won't need to go into, uh, this menu. This is the first category. AI. After AI, we have an application action category, and in this category, we'll have all the applications, and we'll be able to add actions depending on the application. So we'll have actions related to Airtable, Asana, Notion, Google Sheets, Google Drive, and so on and so forth. So this is where all the default integrations in, uh, in Nen are. So all the default integrations from Nen to applications. Data transformation. So as the name suggests, this is where we'll be able to manipulate data. So here we have a number of nodes, we have a code node, and this is the node I was telling you about that is super important in Nen, which will allow you to input JavaScript or Python code. Uh, we have a node that allows us to manipulate dates, we have a node that allows us to create variables that we can use in our, uh, in our workflow. So these are the most popular ones. Then, we have nodes that allow us to add or remove items. So for example, if you want to limit, you have a node that has outputted a hundred items, and you want to work on a single item, this is with these nodes that you'll be able to do that. For example, you'll be able to filter, limit, filter, and thus output only what meets a specific condition, limit the number of results to a specific number, remove duplicates, uh, split, so process, you've received 100 items, instead of processing them all at once, well, process them one by one. Then there's everything related to combination. So you've worked on several items, now you can aggregate them. So this item will allow you to aggregate. Then you can merge, if you have two workflows in the same workflow, you'll be able to merge them into one. And Sumar is a node that will allow you to calculate counts, sums, etc. What comes next, what's important in there? Compression, very rarely used. Convert to a file, this can be interesting. You receive data and you put it into a file. I use it very little. Crypto, never used. Edit images, never used. Extract from a file, this can be interesting. You have a file, you want to transform it. This is for working with HTML data. So you've scraped a web page and you want to transform it. This is with this. This is for converting data, uh, into markdown. So either from HTML to Markdown, or from Markdown to HTML. Same for XML data, it's with this. And then the last one here, uh, it will allow you to, uh, order lists. So the most, the most used, I would say, are code, edit field, maybe split and aggregation, merge also from time to time. And limit can be interesting if you want to test, limit your test to a few elements while you're building your workflow. Then, we arrive at the flow part. Uh, and so, if you've noticed, there are a few nodes that repeat. So filter and merge, we saw them in the other category, they repeat here too. There's also if, so if such a condition, go down this path, otherwise go down another path. There's loop. So what is loop? It's an element that will allow you to loop through a workflow. So you have 15 items, and you need to process the items one by one, well, you put a loop that will allow you to process the elements one by one. Merge, we talked about it. Uh, this allows to execute a workflow. Now, I showed you earlier a trigger that triggers when another workflow calls it. Well, to call this other workflow, from the parent workflow, you'll put this node, execute workflow. And then, uh, there's wait, to wait a little bit if you want to wait a few seconds before processing the next element. Switch, this allows to test multiple elements and go down a path according to the value you received as input. So here, we'll quickly go through all the nodes, and then we'll take the most important nodes and work with the core. So, what do we have in the core? Well, code, we talked about it. There's HTTP request, super important. It's with this node that you'll make calls to APIs. It's with this node that you'll retrieve the HTML code of a page if you want to scrape a page. It's a super important node. Webhook, I explained to you briefly earlier what a webhook is. So it's a node that is waiting for information from someone who calls it, and this is how you can trigger a workflow from other, uh, other calls. And then the rest, we've already seen the most important ones in the other categories. There's maybe this one, response to webhook. So when you receive data from a webhook, in some cases, the webhook that sent you something, it's waiting for you to respond. And so, with this response webhook, you respond to the webhook that initially asked you for something. Human loop. So these are nodes that allow you to add a human being to a workflow. They are super important. They will allow you to wait for an action from a human being on one of these applications to continue the workflow. So it can be Discord, Gmail, Google Chat, Outlook, Teams, by email, it can be Slack, it can be Telegram, it can be WhatsApp Business. And in fact, you'll send a message to this person, and you'll wait for their response to continue your workflow. And this is what's called human in the loop. It means we're adding a human being into the workflow loop. And there, we've done a very, very quick overview. Now, if there are things you didn't understand, it's normal because we haven't manipulated anything yet. But we've done a quick tour of the different action nodes available in N8N. And as you can see, there are quite a few. Now, what we'll do, before going further, and you know me, I like practice. So, what we'll do is we'll take some examples and we'll learn by practicing. Uh, the first example we'll take, and you'll see, we'll go from one example to another, and then we'll come back according to the concepts we discover. So the first example we'll take is we'll create a workflow that allows us to produce commercial proposals automatically. When you create an agency or when you're a freelancer, the sales workflow, how does it work? Generally, you have a meeting with your prospect, which lasts between half an hour and an hour, where the prospect will present their needs. And then, based on what they presented, well, you'll prepare a document to, uh, to propose a solution, present your pricing, and based on that, they will, uh, accept or not to work with you. So we're going to automate this process of managing the generation of commercial proposals, knowing that this can take a lot of time. Uh, and since we have AI today, well, we can automate this part with AI and respond much faster to our clients, generate proposals that are much more complete, and have a much better chance of winning the proposal. So this is the first example we'll do. And to do it, well, we'll start, uh, from a Google Sheet. So we'll create a new Google Sheet. Uh, and for that, we'll go to Google Sheet. So if you want to create a new Google Sheet, the shortcut is Sheets with an S.new. This opens a new Google Sheet directly. Uh, remember it, it can save you time instead of looking for the Google Sheet link. So here, we have a Google Sheet, and we'll put some info, uh, in it. I've prepared a small table with, okay, here's my example. Uh, we'll maybe format this because we are gentlemen, uh, and we like things to be well formatted. And then we'll increase the zoom a bit so you can see all the details. So, in fact, here, we'll put a date. We'll put today's date. Uh, so this is the date of the request or the date of the meeting you had with the client, the client's name. All of this is fake data. So it's just for our test. Their company name, email, uh, their industry, the budget they announced during the meeting, if they announced an estimated budget, the service requested, so what do they want? The deadline in days, the client's main objective or objectives, specific points, if they mentioned any specific points that constrain you. And then, who is this proposal assigned to within the agency? And if you're alone, well, it's assigned to you to produce. Uh, so here are some pieces of information, uh, to process this proposal. And so, the idea is what? It's that we'll use NN to retrieve the information, push it to AI, ask AI to generate a proposal for us, and then generate a document with it. And we'll try to do this together. Knowing that I haven't done it before, I haven't prepared anything. So we'll do it live, as I like to do it. Uh, so how will I, uh, launch my workflow? So it's interesting. Here, we'll stick with the click. Uh, so I'll launch my workflow manually. In production mode, it could very well be, uh, as soon as a new row is added, or as soon as you check a box, etc. Well, there are a number of things that can be done, or that it launches every evening by itself, etc. There are several modes you can set up at the trigger level, as I showed you earlier, all the triggers in Ninten. So, we'll leave this, and we'll read our Google Sheet. So, what we'll do is we'll add a module, a Google Sheet module. So we'll go here to Google Sheet. So I clicked on the plus. You can click on the plus, you can click on tab, it will be the same. It will display the small banner on the right. So I click on Google Sheet, and here I have a set of available actions on my Google Sheet. Here I can create a Google Sheet or a spreadsheet. I can delete one. I can add rows. Uh, I can add or update rows. I can add rows. I can remove, uh, well, empty a whole thing. I can create a new tab. I can delete a tab. I can remove rows, I can retrieve, so get, retrieve rows, and I can update rows. So, I'll retrieve the rows, uh, from my Google Sheet. So, a window appears here. When I add a node,

There is this window that appears where there is quite a bit of information inside. It has a part on the left, a part in the middle, and a part on the right. So what I'm going to do is enlarge this middle part a bit because it's ultimately the most important, even if the rest is important too. We have a part on the left which is the input, and so what are the data that arrive as input to this node. On the right, we have a part called output. So when the data has been processed by this node, what are the outputs of this node? How the data came out, you will see them here. And in the middle, ultimately, there is all the processing that is done by this node. So these are the three main parts when you open a new node in N8N.

So for the Google Sheet, what I'm going to do is connect to my Google Sheet account and then I'm going to retrieve the row. So the first thing I'm going to do is go here and create a new credential. So I'm going to click on "Create New Credential". And so here, I arrive on a window to create a new connection to Google Sheet or to create an authentication for Google Sheet. Now, there are different ways to authenticate on Google Sheet and on all applications. Each application has its own connection methods. So here, when we are in cloud mode, well, the easiest way is to use this button. So what we're going to do, the first thing, is rename my Google Sheet access here. So I'm going to name it, I don't remember which account I used to create this Google Sheet. Uh, yes, it's my personal account. Uh, and so I'm going to name my connection with my email.

Now, what I'm going to do, let's do things properly. I'm going to switch to my professional account. Okay, so now we're going to make the connections. Just before making the connection, I'm going to go back to my Google Sheet and rename it. And we'll call it "prop commercial". And so the connection. So I'm going to click on "Create New Credential". So here I will be able to authenticate to connect to my Google Sheet. And so I'm going to rename my connection first. Now, I like to name the connection after the email, after the account I'm going to connect to. That way, if I have multiple accounts, I can easily identify which connection it is. So this is my professional account, and then I'm going to make the connection with this button. And this is available because I'm in cloud mode.

Okay, I'm going to select everything. I'm going to give it all the permissions it wants. Hop! And there, the connection is made. It tells me that it connected successfully. I've already named it, it's saved, it says "Save". So I can close it, and so my connection is available. Next, what do I want? Well, I want to retrieve data from a, well, not a whole document, just a sheet in a document. I'm going to retrieve rows, and so here I'm going to tell it. So the operation is "Gastro". If at the beginning when you chose the operation in the panel on the right, it's not the operation you wanted, you can always change it here. No need to delete the node and add a new one. "Gastro" to retrieve rows. Next, I'm going to choose the document. So here, I have a dropdown list of the documents that are in my Google Sheet. "Propale commercial" is the one that interests me. Then in "Propale commerciale", I have only one sheet, it's "Sheet 1". I'm going to select it. As soon as I selected my sheet, it tells me, it asks me, "Do you want to apply any specific filters?" For now, I won't apply anything. I'll tell it to retrieve what it finds. And to tell it to retrieve what it finds, because I'm in test mode, not production mode, I have this "Test" button. So I'm going to click on it. What does the "Test Step" do? It will simply launch my workflow up to my step. So if there were four steps before my step, well, it will launch all four up to my step. Which allows me to go faster without having to close this node, go and relaunch everything. I launch everything from here.

So what happened here? So on the left, it showed me the input. So ultimately, my input was my trigger node, which was just a click. And so it told me, as input, you had a node that is "click". However, it has no data as input, and you haven't retrieved anything from that node, and that's normal. And then it retrieved the data from the sheet here and displayed it on the right. Now, both on the right and on the left, you can see that there are three display modes. There is a schema display mode, a table display mode, and a JSON display mode. So the schema display mode is a sequential display mode, where we will display the elements in a nested but rather nice, easy-to-understand way. And here we see the column name, its type. First of all, we see its type. So the first column, when there is a hash, it means it's a number. Then the column name, and then its value. Same here. So type "A" means it's a string, the column name, and its value, and so on and so forth. If you switch to table mode, well, it will display a table with all the rows it retrieved. Now, our file happens to contain only one row, and so it retrieved only one row in my table. How do I know how many items it retrieved? Well, precisely, I have this "One Item" here, which tells me the number of items it retrieved. And so this is where we talk about items. "Item" is for element, and in fact, it's the element that circulates from one node to another. So we circulate what are called items in N8N from one node to another. A node can have one or more items as input, it can produce one or more items as output. If it produces nothing as output, the workflow stops. So for a node to run, it must receive at least one item as input, it runs its processing, and then it outputs either one or more items depending on the processing it did. Here, in our example, it outputted a single item.

Now, if we go back to the Excel file, to our Excel file here, and when we add another line, I'll just change the name. I'll leave all the other data the same. It's just to do the test, the name and the date. Okay, so I go back to my node, I do a second test, and now you see that it returned two items, so two elements, the two rows that were in the table as input. So this is really what's important. And you see when I close the node, you see that it received one item as input. So it received a click, and as output, it outputted two items. So it retrieved two rows from the Google Sheet. And this is really a fundamental concept in N8N. We circulate items from one node to another. So the item is a fundamental notion in N8N. This is how information circulates. So we talked about the schema display mode, we talked about the table display mode. Now, the table, or the table, displays all the elements. The schema mode displays only one element. So you see, you see only one element in schema mode. Even if there are two as output, schema mode only allows displaying one element. So if you want to see all the items, you must switch to table mode or JSON mode. So what is JSON mode? Well, it's this mode that is a bit bizarre, bizarre at first glance, for displaying data. In fact, JSON is really what circulates from one node to another. JSON is a language, and it's the language that allows information to circulate on the internet. It's one of the most used languages today on the internet. It's used in 99% of cases to circulate information, data on the internet, from one application to another, or as in our case, from one node to another. It's the main way to make data flow. So just a moment ago, we'll focus on JSON, how a JSON is constituted, etc., but just keep this information in mind. JSON is the language or the part that allows information to circulate from one point to another in N8N.

So, I have retrieved my table. I have retrieved two elements. Now, I can add filters here. And I can add options. So, let's look at the filters, perhaps. Let's apply a filter by telling it, "I want the request date to be equal to May 14, 2025, for example." Let's do a test. And so here, it returned only the row where the request date is May 14, 2025. So this is how I can filter, and I can have multiple filters. I can have "and" and "or". In fact, I can have filters that apply at the same time, or "or" I apply this filter or that filter. And this is how I can filter information from a Google Sheet. Okay. So what we're going to do now is remove the line I added for our test, to return to have two items. It was just to show you how it works. And we'll continue. So I'll do a test again. I have one item as output, one element as output with my data that is there. Okay. Now, what are we going to do? Uh, we're going to, normally we've retrieved the data. So, we're going to ask the AI to produce something from this information. So, we're going to add a node, a node. And we're going to add just a basic LLM chain node. So, a node, a basic LLM chain node, nothing special. So this is the LLM type node. Now, there are parameters, as you can see, it's always presented in the same way. We have the input on the left, the node and its details in the middle, and the output on the right.

Before going further, there is a very interesting feature when you are building your workflow, which is the ability to pin data. In English, we say "pin". In fact, here, I have retrieved data from my Google Sheet. Now, this Google Sheet is not very important. Suppose I'm going to retrieve data from a form, for example. Well, if I have the possibility in N8N to pin the data I retrieved, so I'll fill out my form once. I'll pin this data, and for all the launches while I'm building my workflow, I'll always take the data that was sent via the form the first time. So this greatly facilitates testing and validation of my workflow during this period when I'm building it. So how do we do that? Either we open the node in question and we come here, we have a small button called "Pin Data". So I'll click on it, and automatically my node will have this little purple bar that will appear. And if I go back to node display mode, I want my node to have a purple outline around it. And so this means that the node's data has been pinned. This means that even if I change something in the Google Sheet, I will always have the old data in this node. They are pinned in the workflow in N8N and will remain as long as they are pinned. To unpin it, either you reopen it and click here again, and it will go back to normal mode, or you click, right-click on it, and you have a button called "Unpin". So I can unpin it, I can also repin it from here. There is a shortcut, which is "P". So you click "P" on your keyboard, and it will do it.

So what I'm going to do is just remove the link here. You see, there was the link, and when I hover over the link, a small trash can button appears. You click on it, and the link is broken with the next module. So I've removed the link, I'll relaunch. It will retrieve the data from the Google Sheet. I'll click on the node again. I'll click "P" on my keyboard. And now it has pinned the data from the Google Sheet. So I'll re-establish the link with the next node, the LLM node, and I'll process my LLM node. Now, the LLM node, as you can see, has an output at the bottom and an output on the right. So the output on the right is for going further and adding modules, nodes after. And the output at the bottom is for adding a model. So a model, an LLM. So here, if you click on the plus, you can add a model, whether it's Anthropic, whether it's ChatGPT, whether it's OpenRouter, Mistral, in short, there are all the models. There are, in fact, a multitude of models that you can use and connect to your workflow. So, what we're going to do is add a classic node, ChatGPT, OpenAI. And so we'll click on the OpenAI node, and it will automatically open a window for me to define the details of my OpenAI node.

So to configure my OpenAI node, always the same thing, I start with my credentials, so my access. Now, for the access, I'll have to create a new credential. So I click on "Create New Credential". So there's the OpenAI, and so we'll go, you can click on the link here to go to the N8N documentation which explains, well, it's in English, but you can translate it, which explains how to do it, but I'll show you how to do it for OpenAI. So here, there's the OpenAI which is right here, and there's the link to the OpenAI custom API where you can create a new connection. Yes, it's this link. So it's platform.openai.com/api-keys. Here, I'll log in to my account. Okay, so now I'm on the API keys page in OpenAI. So in fact, you need to put some credit on it. So for that, you go to the, I never remember, I think it's "Usage", no, "Billing". Yes, "Billing". And so here, I have €35 of credit. So in fact, you add credit to your OpenAI balance. And so you'll enter a payment method and add credit. In fact, OpenAI in API mode is a mode they call "pay as you go". So you pay for what you consume. It's not a monthly subscription like ChatGPT access via the interfaces. It's a different consumption mode. It's not the same money, it's different. And so you consume each time you call the API.

Now, I'll go back to Keys. I'll create a new key. So I already had an N8N key. We'll call it "N8N masterclass" and I'll create my key. Okay, so now it gives me a key, I copy it, I go back to N8N, I paste my API key, and then it asks me for the Organization ID, but it says it's optional. So we'll leave it blank. I'll just rename this one by saying it's the "N8N masterclass" so I don't get confused between my different keys. I save it. It's testing. It told me that the connection works and that the key is good. And so I can close this window, and I see that my credentials are here. After defining the credentials, I'll define the model. So what model do I need? Well, we'll take the latest flagship model from ChatGPT. So it should be 4.1 normally, which came out not long ago. And we'll just take GPT 4.1 normal or mini. Let's take the mini. I think it will be sufficient. There are quite a few options you can add. Now, the option that I like to define myself is the temperature. It's this one. There. "Sampling Temperature". It's at 0.7. So that's perfect. I like to set it to 0.7 and not 1. So, my OpenAI module here has been defined and properly configured.

Now, I go back to my Basic LLM Chain, so to my LLM node. And by the way, the advantage of this node compared to a classic node, if I had a classic ChatGPT OpenAI node. So if I went here to AI and added an OpenAI node directly, "Create an Assistant". This is an OpenAI node. This means that if tomorrow I want to switch to another model, I will have to delete this node, add another node, put the prompt back in, and so on. With this node, I don't need to do all that. Tomorrow, I want to change the model. I delete this link, I add the model that interests me. For example, I need to put Claude API. I choose the Anthropic that interests me, the 3.77. Perfect. And we're off. Okay. I don't need to re-edit my prompt, I don't need to change the main node. With this node, it's not the same case. It's not the same functioning. So this is important to understand. Okay, I'll re-establish the link with OpenAI and I'll go back to the main node, the Basic LLM Chain. So here, I have a first parameter that tells me the source of the prompt, it's "chat". I don't have a chat in this case. So what I'll tell it is "Define below" or "Define below" which means that the prompt it should apply, well, I'll define it myself. It won't need to retrieve anything from a chat. Chat is generally interesting when we have the chat window that we put on a website and with which we interact in the context of a chatbot or an AI agent via chat, etc. So "Define below" and we'll put our prompt. So this part is what is called the user prompt. Okay? And I'll add here "Add Prompt". So I clicked on "Add" to put a system type prompt. You should know that there are three types of prompts in LLMs in general. There is what is called the system prompt, the user prompt, or the assistant prompt, or sometimes they call it AI for Artificial Intelligence. The system prompt is like indicating, we indicate in the system prompt how the system should react, who the system is. Okay? So you say, for example, "You are a helpful and intelligent assistant who will help me write a commercial proposal." That's the system prompt. So we define what the LLM should do. The user prompt is where we define what it should do. So it should write a proposal in a certain way from certain data that I will give it, etc. The AI or assistant prompt allows passing examples to the LLM model. So in fact, we pass it a user prompt with input data and then we pass it an AI or assistant prompt with the expected output. So in fact, we are training it, so to speak. We tell it, "If I had given you this data as input, this is what I would have expected from you." And so this allows it to mimic this example in the productions it will do afterwards.

We'll apply all this. So here I'll delete what I had added. So we had a system prompt by default, and I clicked on "Add Prompt". So what I did is I prepared a prompt so that we don't spend an hour writing it now. So what does it say? But in my prompt, first, we explain to it, we explain to it who it is. "You are an expert in writing commercial proposals for a leading digital creative agency." So this is what is called a system prompt. So this is what I'll put here. It's enough. It's just to set the context. What is the LLM? What should it do in general? Well, not what it should do, but who is it? Okay? Then, in the user prompt, we'll take the rest and format it. So what I'll do is I'll take the rest and we'll work on it directly in N8N. Now, what I did is I pasted text. I'll go back to normal mode. So it was like this. There were, if you see here, there are two buttons. There's a "Fixed Text" button and an "Expression" button. What's the difference between them? In fact, when we pass parameters to a node in N8N, we can pass fixed text, so classic text. So here, I can put "Hello". This is fixed text. We can also pass what are called expressions, and in fact, from today onwards, you will always use expressions. You will almost never use fixed text. It's generally expressions. What is an expression? It's like in Google Sheets, when you put something in a cell and you start typing a formula, it's exactly the same thing. So an expression is a formula. So in fact, an expression means that I can come here, retrieve the client's name, so Sophie Martin, and put it here, drag and drop it here. In fact, it's like a variable that will be added here. And if tomorrow I call my system not with Sophie Martin anymore, but with Jean Dupan, well, the system automatically, since it's in expression mode, will change this variable to Jean Dupan. Okay? So, how do we see expressions? Well, we see them with double opening curly braces, double closing curly braces. So these are called variables in N8N. And just below, when we are inside, when we put the cursor inside, we see the result. So "Result" with the result. So what does that mean? It means that with the current execution that is underway, if you put this somewhat barbaric formula, for now, it probably seems barbaric to you with the dollar sign, the opening bracket, a dash, well, a quote, "client" quote, closing bracket, and with the two curly braces at the end, it's a variable, and in fact, if I were to relaunch it here, I would have had this variable, it would have given me the value Sophie Martin. So it's simply that. So in fact, that's the difference between fixed and expression. So if I switch back to fixed, it will no longer change this. It will no longer consider it a variable, it will consider it raw text. And if I launch the LLM, it will consider it as text. It will not replace it with the actual value of the variable that comes from the previous node. So I'll switch back to expression mode. I'll remove this text. I clicked on this little button. You see this little button? It just has a function of enlarging the window. So it will put me in focus mode. It will remove everything else, all other parameters. It will only show me the parameter I am currently modifying and the result on the right. So this is useful because the field here is a bit small for writing a prompt. So if I click on this button, well, I have all this space, I have all the variables coming from before, and I can work in this way.

So here I've pasted my prompt. "Please generate a personalized proposal for the following client." So here I'll put the client's name. So I'll delete this and I'll drag and drop the client's name from here. Remember, these are the parameters coming from the Google Sheet. And so here you see, as soon as I put the parameter coming from the Google Sheet, it put the result on the right. In the current case, the client will be Sophie Martin. The company, if I take the company name, drag and drop, well, the client will be Sophie Martin from Echovert Solutions. In fact, this is a fundamental concept in N8N. These variables are what allow information to circulate from one node to another. So I'll continue to do this. I'll change the sector I have here. I'll change the requested service. Hop, here. I'll change the budget. I'll change the desired deadline. So I'll just put "60 days" for the main objectives. Hop, and the last information, which are the specific points. Okay, so this is all my client's data. Ultimately, I won't present it like this, but we'll start like this. So here, "Please generate a personalized proposal for the following client." So I give it my client's information. Then, I tell it what format I want. In fact, ultimately, there is, yes, the format I expect, and in fact, I tell it, "Please structure your response in clearly delimited JSON." So here, I tell it the format I want it to return, and this is JSON. Now, we'll look at JSON just after, but this is what I expect from it. So, I tell it, I want a JSON of this format with an introduction, comprehension. So, what to demonstrate? How we understood the project, the approach, the services, so all the services you consider necessary to do this, the process, the timeline, so the deadlines, how we'll do it, the investment, so the budget, and the conclusion, so how you conclude this offer. And I end my prompt by saying, "Ensure that each section is highly personalized to the client's specific needs, industry, and objectives mentioned. Use a professional yet warm tone that reflects the agency's expertise while establishing a human connection." So here's my prompt, which in this case, how it will give a result. So I'll leave it like this for now with my system prompt, with my user prompt here, and I'll launch it. So as I explained earlier, launching it will relaunch all the previous nodes. Except that the Google Sheet node, if you remember, I had pinned it. And so, because of that, the Google Sheet node will not relaunch, and I will have a result. And so here, I have a result, and this is the result it sent me. Here, it's in schema mode. Let's switch to table mode or JSON mode to get all the information. And so here, you see, it returned a JSON, but I'm not very happy with the JSON it returned. Well, if the JSON is good, but in fact, we need to process the JSON. So, even though in my prompt, I told it to return JSON, it returned text. But if we look closely, we see that there are curly braces, brackets, everywhere in this text. In fact, we forgot to add a parameter, or I deliberately didn't add it. It's this parameter. "Require Specific Output Format", I'm asking for the output format to be in a very specific format. So as soon as I add or click on this parameter, I'll go out here and I see that a new entry point has been added at the bottom right called "Output Parser". If I click on this plus, I see that I have three parameters, and in fact, the parameter that interests me, well, three possibilities, in fact, the possibility that interests me is this one: "Structured Output Parser". I want it to return JSON, and in fact, here I'll give it an example. So simply, I'll go back to my LLM, reopen the prompt. I'll copy the JSON that I put in the prompt, and I'll go back here to "Structured Output Parser". I'll remove the parameter, well, the example that is there by default, and I'll put my own example. And so here, I'm telling it to return the format in JSON, in the format I gave it. Let's see what it will do.

A small clarification or a small tip here when you are in any module, if you look on the left, on the right, top and bottom, there are interesting small parameters where there are interesting small bubbles. Here, I'm in the "Structured Output Parser" bubble. If I click on the bubble here, I can go directly to the Basic LLM Chain module with my prompt. If I look on the left, I have a Google Sheet module. If I click on it, I'll go to the Google Sheet module that I configured. In fact, I can navigate from one node to another like this without ever coming back here. So a small tip or shortcut for that. So here, we told it that we want a JSON output, we gave it an example, the model is there. And so I'll relaunch a test and we'll see what it gives as output. So here, I have the impression that if I switch to schema mode, I have the impression that it's much better. So here, the output is structured. There's an introduction, there's comprehension, there's the approach, there are the services. It created three for me. First, the first service is the website, the second is the visual identity, and the third is the social media strategy. It described the process we will adopt, the timeline, so the time, how it will happen? A 60-day plan, analysis and definition of needs 10 days, creation of visual identity 15 days, design and development 25 days, and so on. So it did a good job by proposing this proposal to me. If the proposal it made here suits me, well, I can very well indicate it to it as an example so that for future proposals, it uses it as a basis and uses it as an example to produce the next ones. So what I do is that? So this is where I'll add a system type prompt, a new prompt, sorry, a user type prompt and another assistant type prompt. So here, I'll click on "Add Prompt". I'll put a first prompt which is "user". So this is my input. What do I give it as input? So what do I give it as input? Well, I'll give it the data from the Google Sheet. So in fact, I'll copy it, I'll give it the data that I have here. So I'll switch to JSON mode and I'll copy it. I'll click on this little button and here I'll give it the data. Now, I'll switch to expression mode, and I'll give it like this. So either we keep it in JSON mode, we can keep it in JSON mode, or I'll format it. So in fact, let's remove the JSON mode, it will be better. "Assigned to" we don't need it. I'll remove the excess information. I'll format it a bit like I put it in the prompt parameters. So if I go back to the prompt, well, it was like this. So we'll mimic it here. So in fact, there's the client, so my client here. So this is an example I'm giving it. So

I do not use variables because tomorrow I will relaunch the same process with Jean Dupan. If I put variables, he will not understand that it is an example. So there is no point in putting variables at this level. The sustainable development sector. We will put that here. The budget here. Uh the service requested. Hop, we will put it there. We will put the objective, the main objectives. The deadline is 60 and the last one is this one. It's the specific points. OK, perfect. So here, we have uh well the little green thing there that remains, it's just a bug. So if we refresh the page, it will disappear. It's just a small display bug, so because we don't have any variables here, it shouldn't display like this. OK, so that's done. So we said in the case where you receive these data, return to me. So I will do AI and so assistant is his response. So I'm mimicking as if it were his response. And in that case, I will copy the JSON as I received it from him. And remember, my JSON here, it starts with introduction, except that the JSON I will put here, well it doesn't start with introduction. So I will put myself in expression mode first, and I will remove all that, all that is output at the beginning. So the bracket, the curly brace and the output. The bracket and the curly brace that are at the very end, I don't need them. So this is what he should have returned. So in fact, I consider that I am giving him an example and I am telling him here is an example and here is what I expect in return. Mimic this example for future times. So this is my prompt. If I relaunch it, it will normally return a JSON with the information and all the details. OK, perfect. So our LLM node works, it is complete, it has all the information it needs to do its calculations. Uh so we have retrieved all the information. Uh what are we going to do with it? Well, what we can do with it already, is perhaps save all this in a Google Doc, and create a Google Doc with this information. So we can create a Google Doc. And for that, we will go to Google Doc create document. So here again, I need to create my credentials, I need to identify myself to create the Google Doc. So there are two ways to authenticate to create Google Docs. We will use the OAuth2 method and in fact, it explains to us here in the documentation how to do that. So it requires a little manipulation. We will do it. We need to go first to the Google Cloud Console. I will log in. So here, I am using a paid Google Workspace. You can also do it with you can also do it with a Gmail address. OK. So first thing, we will create a project. I will put myself in my organization. I will click on new project and I will give it a name. So, let's say NN masterclass, it is being created. It has been created. I will go to it. Second thing we will do, we will go to the APIs. So we will go here API service activate. We will go to library. We will search for Docs. It's here. Google Doc API and we will activate it. Then, we will go to consent screen. Here, we will click on get started. We will give a name to the application. So, we will say it's the NN application. We will say next. I will put internal. I have given my email address. I accept. Continue. Create. We continue. So now, we will go back to API service credentials. We will create credentials. We will create a client ID authentication. We will choose web application. It has given it a name. We will rename it. We will put in redirect, there is nothing to do. Here, we will need to add an address. If I go back to my N8N, it's here. Redirect URL. So I click to copy it. I go back here, I click add and I paste it. Sorry? And I click create. OK. So now, it gives me a client ID, a secret ID. So I will go back here and I will paste my client ID and my client secret. Of course, you are intelligent people, you will not share this information with everyone as I am doing in the video. OK, now I have copied my client ID client secret. I will click on sign in with Google. It will take me to a window to log in. So choose the correct account. I log in, I authorize and the connection is made. So if I come back here, where it has returned anyway by itself, it told me that the account is configured and the connection is in place. All that remains is for me to change this with my email to identify it later. And I save. I can close the window. So now, Google Doc, the credential is in place. The resource part, I will use document. The operation is to create a new document. Then, it tells me drive name or ID. So, it may be that I have not given enough rights. Uh probably I need to add rights to it on Google Drive. Indeed. So I go back to library, I will search for drive here. Uh and in fact, I need to give it access to the Google Drive API because it will read precisely in my Google Drive. So it needs to have access to my Google Drive. I will add access to Google Drive like this. I will go back to N8N. We will test it again immediately. We will see if it works. There, it works. So in fact, it needed Google Drive access. So now, it will look in my Drive and tell me in which directory you want me to create the Google Doc. I will tell it to create it at the root directly. And for the title, well give it the title of commercial proposal and we will perhaps add uh we will put ourselves in schema mode and we will add the client's name. And for that, we have access, so you see in the input part, I have access to all the information from the previous node, which is the basic LLM chain node, but I also have just before access to all the information from the Google Sheet and that's super practical. So here, I can put for example commercial proposal with the company name. And so here, the name of my file will be, you see it just here after result, commercial proposal - Ecover Solution. I can also add the time when the document was generated. Uh and so for that, we will put curly brace curly brace. So curly brace curly brace. It finishes the closing curly braces. So, we are telling it I want a variable and I put dollar now to say now at the current time. So it will add the time in this format. If I want to format it, I will add a dot, I will put to format. In fact, we are saying that I want the current date formatted to a specific format. And so here, I will put for example day month-year year year year. So DD for day in English mm for month in two in two digits, uh and by the way it's not the right month because it's a month. The month is in uppercase in in nuit and the year is 2025 so May 14, 2025. That was indeed the date that was here. What we will do is that we will launch this and we see that it has generated an ID and it has given me the name of the file. So what I will do is that I will go to my Google Drive and we will look at it. OK. So in my Google Drive, you see here that there is a file called commercial proposal Ecover Solution with the date. If I open it, the file is there but it is empty, it's normal, we haven't put anything in it. So it's empty for now. So we have created, we have created the file. Now what we will do is that we will fill it. We will still go to Google Doc. So, you can do everything with the keyboard, with the up and down arrows, you can choose. You see the little red thing that moves, it moves by moving the arrows up or down. So, you can do everything with the mouse in Nel like that, which can be practical if you manage to know quite a few keyboard shortcuts. So here, I will do update document. I remind you, we created the document here, we put nothing in it, we just created it. And now, we will update it with the information. So I will I will put the same connection as the one I used before. It's a document. I will do an update operation. So of update. I will give it the document ID. So how do I give it the document ID? Simply, I will drag and drop the ID from the element that was there before. And the element that was there before, it was the Google Doc. And so that gives me a variable. So, we will look in detail at what these variables are, how they are constructed just after. So here, I am missing the document ID and here, it gives me the possibility to perform actions. So, what are the actions I can perform? I can add text. So what we will do is that we will add text. We will add it in the middle of the document and we will add it at the very end. So, just before doing that, so as not to create 36,000 documents, what I will do is that I will pin these parts. And so, when I relaunch just when I launch this part, it will not redo everything, it will not recreate a new Google Doc, it will use the Google Doc that has already been generated. So here, I will insert text. So, there are two possibilities. Either I replace existing text. So suppose you have made a template in Google Doc and you only want to replace where there are very specific variables. Well, you will use that. Or you start from a blank page and in that case you do an insert. So the best is to do find replace. In fact, the ideal is to have created a template, copied it, and in the template, well, change some information. So as I told you, this is not something I prepared. So we are doing it live. So what I will do is that I will create a new blank document. I will call it commercial proposal template and we will create it. So here, I will make a very simple template. And so, imagine that you can apply any template, that is to say that you can prepare it, put images in it, text and so on and and enrich it as you wish, since it is a template and we will generate the commercial proposal from this template. So commercial proposal. So I will not call it commercial proposal, but starting from there, what I will do is that I will go back to the previous node and I will see what are the values that come out here LLM. So what do we have? We have an intro, we have an approach, we have the services, our process. OK. So I will put here written by so we will put for and so here we will put between two curly braces, client name. What I will do is that I will go here, copy hop all this information, it will be useful. And we will use the same variable name as here. So client name, to avoid duplicating variables, we will use these things. OK. So client name 2 and let's put company name. So here, of course, I will not put the JSONs, I will keep only the variables. That's what interests me so that I can replace them. So I will put commercial proposal for written by me. OK. I will make this a bit bigger though. We will center it. We will put it at the bottom. [Music] [Music] OK. Then, what will we put? What are the outputs we have from our LLM? So we will go back here. We will take all the info we have here. We will take all the all the all the JSON here. We will paste it here. We will see how we will do it. So first thing I will put, I will put an introduction directly here as text. Then, I will put what we have understood. So a [Music] thing our analysis for example. And so here, it's a level 2 title. Hop, title comprehension. So here, it will be a variable. And then, well, I will replace it with the content that my generated. Then, there is our approach. So, it's not the best proposal there is, but it's just to illustrate our [Music] masterclass. OK, we will go to a new page behind. We will put the services we will offer. So, we will put perhaps in a table. Uh, we will see how to do that in a table. Good question. We will see how we will do that. Uh, we will add the process here. So as we did for the approach, we will put a section, our process. Hop. And so our process, the variable is called process. And then we will put the timeline here. Perhaps after the services, we will put the timelines. So here, deliverables rather than service, it speaks more to demand. And then after deliverables, we will [Music] put timeline or planning. And here, we will copy, we will put timeline here. What's left? We have investment and conclusion. So in fact, we still have two sections. We will put ourselves on a new page. So here, we will call it your investment. And we will take the investment variable. And then to conclude, conclusion. Ah, generally but not conclusion but we are convinced. Yes, to conclude, let's put to conclude. OK. Let's start with that and we will see how we progress. So this is our template. What I will do is that I will come here, I will take the number here. So, this is what is called the document ID. So it goes from the slash after just the D up to the slash, well the last slash. This is the document ID in Google Drive. So I will copy this value. I will go back to my, to my chain here, well to my workflow. And instead of creating a document here, we need to create a document, well, we need to duplicate our template so that we don't overwrite it. So we will duplicate it. What we will do is that we will go back to Google Docs and see what we can do. So, we can, no, I think we need to go to Google Drive. I think that's what will save us. Google Drive. Uh, copy file. That's exactly what we need. So in fact, we will copy a file. So we will add credentials. So I will put the same credentials that I put for Google Drive. It's the same project. It has all the all the access already in place. So I won't bother. So here I have the client ID. Hop. And here, I have the secret code. I will redo the connection and it's good. I will name it as usual. I give it the name, my email address to be able to find it easily later. And I save. OK, so here I want to copy from a file. So I will choose my file and the file I want to copy, well, it's the template. So how did I call it? I called it commercial proposal template. It's here, the new file. I will copy it in the same directory, it doesn't matter. For now, we will do that. After, you can play with the name of the generated file, well the name of the new file, so of the copy. Uh, well, we will call it proposal dash with the client's name, hop, as we did earlier. And another dash. And here, we will put the date, so today's date of generation. And I add the to format. There. So, I put the date day, month, year and I do a test. OK, it's done. I go back here. I will update. And the new file is here. If I open it, I see that the file is there. And it's a copy of the template we just created. So that's perfect. Well, to not lose it, I will pin it. So I will keep the information so as not to have to recreate the file several times. So here, I have copied the template. Well, now we will tackle the update. So I will take this module again. So it's updating a document. Which document is it? Well, it's the one I just created with Google Drive. So if I remove this and I drag and drop the ID here, you see, it has put back a variable called dollarjson. It says dollarjson. Basically, that's how we call the previous module. So if you want to call the module that is just before the module you are currently doing, you put dollarjson between curly braces of course opening and closing and you have access to all the information of the module just before. So here, I will do text find. the old text that I will replace. Well, we will start, we will do a test. We will start with the client's name first. So I will copy this. I will put here client name. In that case, I will put it as fixed because I want it to find exactly this string and replace it with the real client name here and so with Sophie Martin. We will do a test. We will go to the proposal it generated for us and you see that it has changed the name I put, well the variable I had put with Sophie Martin. So the double curly brace is just a notation that I chose in my Google Doc to distinguish variables from what is not variables from normal text. You can put whatever you want. I chose this. It's just because N8N does the same thing. So there. It allows me to have consistency and to easily find information like that. OK, you see here, we dragged, we did a drag and drop of the company name from the Google Sheet module. The Google Sheet module is the 1 of 3rd module before this module. You see, it didn't put dol of dollarjson in this case. What it put is the name of the module. So the module is called Google Sheet. So it put Google Sheet. between I think it's called not quotes, between quotes. Thank you. Uh, then it surrounded it with parentheses. It put a dollar to say that it's a variable, that it's an object that can be manipulated. Then, it has a notation with dots. So in fact, that's how we access the elements. With dots, we go from a large element to the elements inside. And if the elements inside are themselves composed of other elements, we will add other dots. So here, it said access the items, so the elements of the Google Sheet. Go take from the JSON of this Google Sheet the client's name. So take the element called client name. So that's how we can understand what's inside. So this is the first replacement client name. 2nd replacement we will do, we will replace in the proposal? We have company name. So here, I don't want it to be an expression, I want it to be fixed. Why? Because it's a string. I am searching in Google Doc, it's not a variable. Here, I will put the variable. It's the new text I want. And so here, I want the company. I will do a test again. I will go back here and here I see that company has changed to Ecover Solution. Of course, not in the template. The template remained clean. We will use it every time. It changed it in the document I created for this launch. So here, what I will do is that I will continue to add the other variables. Like that, I modify all the variables. OK, I have put all the variables. We will launch this. We will go to proposal. What did it do to us? So it changed it, it put the intro, it put the analysis, it put our approach, our process, the deliverables, it's still not done. So the timeline, we forgot it, we will do it your investment. And to conclude, as I told you, it's not the best proposal there is, it's to illustrate our test. After, you can improve all that. You can have a template with images, with tables and so on and so on. Me, there is a tool that I love, that I use in my agency called Panda Doc. It's great. If you are interested, I could make a small video about it, but for our example, because it will speak to everyone. So we will do it like this. We will put a variable called deliverables. We will structure that in N8N because I don't think there is a simple way to insert tables with values in cells and so on in Google Doc. Unfortunately, it's not made for that. Uh, but so, we will structure the information a bit in N8N. This will allow us to manipulate the data and we will insert the data like that. So I put a variable deliverables and we will use that. In fact, what are the deliverables? It's a table with four pieces of information in the end. the name of the deliverable, the description, well the name of the service, the description, the deliverables of the service and the benefits. We can structure that in a paragraph or at least, we can try to structure that in a paragraph. Well, how will we do that? Uh, first, we will test this to verify that everything is fine. So, I will remove the pin because I deleted the document. So, I am trying to create something in a document that no longer exists. Uh, I'm not sure it will do anything good. So, hop, I will redo it. I will go here. It recreated a document. So, it put all my variables as it should. It still misses deliverables of course because we haven't filled it yet but everything else is there. It might have investment. There's an extra thing. We will look at that. Investment. It's here. So in fact, we were missing a curly brace here and it's good. So what could we do for the deliverables? could manipulate it to get something usable. So to do that, what I will do, I will create a new branch here. So I will pull from the LLM to execute another branch. And I will manipulate the table. Since it's a table, we will be able to play with it and merge the data, so split it to loop over it, manipulate the data and then merge it. So this will allow us to use data transformation here with split. So what is split? split, it takes an element of type array or type object, well rather type array, sorry. and it will split it or cut it into several elements. So here, I will put the field I want to split, so I want to explode into several elements. And so in my case, well, it's the services. So I will tell it service. Is there another field I want to include? No. And I do a test. And so here, if I go back to the macro view, I see that I passed it one element, a single element and it decomposed it into three elements. Why? Because my service array here contains three services and so it exploded it into three elements. This is what is called a split. So from a single element, it created three elements for me. Then, I will do some manipulation. So I will create new variables. And to do that, well, I will use the edit field here. Uh, and we will do it in manual manipulation. So I will click on add field. So I want a new field. And the new field, we will call it service. We will call it service simply. And what will we put in it? So it's a string type field. So it's a character string. And what do we want to put in the value? I will put first, I would say the name of the service, not here like that. So website, we will enlarge the page. We will do a line break. So to do a line break, we will do a backslash. That's how in JSON, we do line breaks. We will click, we will put hop the description. We will put description. We will add a backslash. We will put the [Music] deliverables and we will add a backslash, a last one sorry. We will put the [Music] benefits. So what does that give us? It gives us a character string per service. So instead of having four elements in a list, we have just one character string. So I will launch this and you see, it returned me three services. So three elements of type service. So here, I have constructed three character strings. I have three items. With each item, I have constructed a single character string, well a text. to describe the service itself. Now, I will put all this back into a single text. And to do that, we will use a module that is in data transformation called summarize. Here, in fact, it's a module that will allow you to do a count, an average, concatenations and so on. Well, many functions that you generally have in Excel or Google Sheet. And here, what I will use is concatenation. The field I will concatenate, well, it's the services. Uh, the separator is new line, so new line. And that's all. I don't need to filter anything. I do a test. So you see, I started from an array with elements in this array to a single character string here with all my services. So the website, the visual identity and the third one was? It was social media strategies. So all this is done and I have a single output element. OK, so I just modified this actually, the slashes the backslashes don't work. I really need to do a carriage return here in edit field for it to understand them as carriage returns. So I just changed this here. So here I have managed to build my thing. I need to do all this on a single line. No need to do two lines. So I will remove the link that is here. I will push these three two modules back. I will bring these three modules down here to the same level. We will put everything at the same level and we will link here. So in fact, I first split the services. I create the text as I would like it. I concatenate all that, it returns a single element. I will go to Google Drive, I duplicated the template. I have only one modification left to make here, precisely, it's to add the variable, this one, so the concatenated services. And in fact, if you remember well, in the Google Doc, we called it deliverables with an S. What happened? [Music] Something strange happened. I don't know what it is. We will remove that. We will put a new variable. It's a text. Find and replace. The old text, as I told you earlier, deliverables with an S. Hop. And the new text, well, it's this concatenated character string. I will relaunch my workflow so it will create a new Google Doc and do the demo for us. So if I come back here and refresh my Google Doc, it has created a new document for Sophie Martin of Ecover Solution with all the information and the deliverables are there. So we have the website, we have the visual identity and we have the social media strategies. So maybe it's not formatted as it should be, but in any case, we have all the necessary information in the document. So, what we will do now is that we will put this workflow aside, we will rename it, we will call it commercial proposal. Uh, and we will put a small element with color. So, you probably see this on social media. Here, we add stickers like this with color to say what it is to describe. So here, you have to write markdown basically. Uh, and so here, how will we call it? Well, we will call it Propal Commercial version 1. So we start from the Google Sheet and we go up to the document generation. We will leave that aside and we will focus on another concept because we started talking about it a bit but I didn't give you the details. So we will go see the details of that. And it's the JSON. So JSON, what is it? JSON is a language, JavaScript Object Notation. It's a language that allows you to store data, to circulate data from point A to point B on the internet. As I told you earlier, it is used today in 99% of data exchanges between systems. So it's a textual format that is light. It was invented by Douglas Crockford. He is an American computer scientist. He invented it in the 2000s. He participated a lot in the writing of the JavaScript language and by inventing JavaScript, they realized that there was a need for a language to circulate information from point A to point B. And so they invented, well Douglas especially wrote JSON. JSON is not dependent on a particular programming language and it describes itself. That is to say, by looking at it, you understand the data directly that is there.

Inside. And that's one of those advantages. Why is Gison essential in N8N? Because it's the native format. So all data flows that circulate from one node to another circulate in Gison format. And, in addition to that, all APIs, so all calls to APIs, the information that circulates between APIs, we use Gison as a standard for sending or receiving data from one API point to another. And so Gison uses a very specific syntax. In fact, it uses different types of information. So in JSON, what we're going to do is we're going to put ourselves in JSON Shaker, which is one of the tools that allows you to check JSON. I'm going to make it a bit bigger, and we'll work in there. So, in fact, there are two main notations in Gison, which are curly braces and square brackets. Curly braces allow you to say that we are in an object. What we call an object, in fact, is a collection of data. It's a set of data that is not ordered. And to know, to say that we are in a set of data that is not ordered, well, we use curly braces. The second notation that is used in Gison is square brackets. So, what are square brackets? It's a set of data, but in this case, it is ordered. So it's an array with elements. And so they are ordered, well, we have the first element, the second, the third, the fourth, and so on. So these are the two main notations in JSON that exist.

Next, in JSON, well, we can have elements. If I go back to the square brackets, so here we are in an object with elements inside. Well, to represent the elements inside, we represent them by putting a key and a value. And so, for example, if I represent a person, well, I'll represent them first by their first name. I'll say that their first name, hop, is Naïer. My first name is Naïer. So, what have I just said? I've just created an object, and in this object, there is an element. The key is "prénom" (first name), and the value of this key is "Naïer". In fact, it's a key-value pair, and in a collection, both in collections and in arrays, we will always use this key-value notation with a colon separating the two. So, this is generally what we can have as an element in a collection or in an array. We can have string values, numbers, objects. So we can have objects within objects, we can have arrays, so we can have arrays within objects or objects within arrays. So we can nest information in this way. And we can also have booleans, so true or false, in fact.

So, we'll take a very simple example. We'll put it in JSON Shaker. So, here I have curly braces. So, to say that it's an object with elements inside that are not ordered. And so, in this object, I have two elements. I have a "name" element where the value is "Jean". I have an element or a key called "âge" (age), and where the value is 30. So, you've noticed all the keys are surrounded by quotation marks. In computing, we don't talk about quotation marks, we talk about quotes. So we have single quotes. So, this is a single quote, and we have double quotes. So, this is the double quote, or better known as quotation marks. And so, to surround the key names in JSON, we use double quotes. So, it's a quotation mark, in fact. Next, to surround the values, if it's a string, well, we also surround it with quotation marks. If it's a number, we don't surround it with anything. We directly write the number. The number can be an integer like 30, it can also contain decimals. So, if I take this person, for example, and I give them a height, I can say that they have a height of 1.80. Now, since it's an English notation, we don't use a comma, we use a point to separate the decimal part. And so, this is how I write 1.80 to say it's 1.80 in this case because it's the height. Next, between the elements, you've noticed that I've put a comma. So, to separate the elements from each other in a collection, we use commas, or in an array, similarly, we use commas to separate the elements. The last element does not have a comma because it's the very last one, but we put commas after each of the other elements, except the last one. So, this is a collection made up of three elements.

Now, let's take a small array. Okay, so this is an array. How do I know it's an array? Well, it starts with a square bracket, it ends with a square bracket, and inside, there are elements. Now, the peculiarity of arrays is that there is no notion of key-value between the elements. So, as I told you, a collection is a set of elements. And to identify the elements, we use a key-value notion. That's what I had just before. I had this collection with keys and values. However, in arrays, there is no key-value notion. Simply because the key is the position. So, here the key for "Paris" will be its position. So, the first position. The key for "London" will be its position. So, it's the second, the second element of the array, and so on and so forth. There is no key-value notion in an array; there is a notion of ordered elements. So, this is an array.

So, we've talked about objects, we've talked about arrays, we've talked about values. So, we said there was a notion of string values, and we represent strings with double quotes at the beginning and end. There was a notion of numbers, and so it can be an integer or a decimal number. There is also a notion of boolean. So, this is how I can say, for example, that Jean, who is 30 years old, well, we can say, is he a man? So, here I can put "true". So, "true" is "true". "false" is "false". Always, it's English. So, the language was invented by English people, well, Americans, and so the notation, the terms are English. So, this is how it is. I know it's a boolean. So, there are no quotation marks for booleans. If I had put double quotes, it would be a string. It would no longer be a boolean. If I don't put double quotes, well, it's a boolean, and so the two possible values are "true" or "false". If I had put, for example, "false" without an "e", it would have detected it as an error. So, it expects either "true" or "false" in the case of a boolean. So, it can be a string, it can be a number, it can be an integer or a decimal number, it can be "true" or "false" to indicate that it is a boolean. And it can also be null. Null to say that it's a null value, that there is no value at all, in fact. So, when we put "null" without double quotes, it's to say that "age" has no value at all. These are the different possible values in JSON. And so, you've understood, there is a notion of objects, which are collections of elements, and a notion of arrays. Well, we can combine all of this at very complex levels. So, we can nest in an object, arrays of objects, and so on. So, we can go very, very far with JSON.

Before we move on to an example with JSON, I wanted to do a quick summary of what we've just seen, which are the three fundamental data concepts in N8N. We've talked about items all along, and we said that it's the fundamental unit of data that circulates from one node to another. So, if I go back here in our first workflow, you see, there was an item that circulated between the click and the Google Sheet. Then, an item that circulated between the Google Sheet and the LLM, or rather ChatGPT. Then, a single element circulated to the split. The split created three elements. So, between the split and the text modification, there are three elements. It's marked here, three items. And so, the item is the basic unit that circulates from one element to another. Now, I'm just going to open this one where we had one element as input. So, we had a single element as input, we had three elements as output. And in fact, it's nothing more than JSON. So, you see here the three elements as output. You see that it starts with a square bracket and ends with a square bracket. So, as we said earlier, square brackets mean an array. So, in fact, it's an array made up of three elements, and the three elements are themselves, there are quotation marks, so they are themselves collections or objects. So, in the first object, which is equal to "site web" (website). So, in fact, I have three objects in my JSON, and that's why I have three items. And so, what is an item? It's that at the output, my node at the output produced an array with three elements. Each of the elements is an object with information stored inside. So, if I come here and ask it to copy the JSON for me, I'll go to JSON Checker to look. In fact, you see, this is what we said. We have an array, it starts with a square bracket, it ends with a square bracket. And in the array, there are three objects. The first object contains a value which is "service". By the way, it wasn't this one we were looking at earlier, it was the split, sorry, it was the split we were looking at. So, if I copy this JSON and go to the JSON checker and paste it, well, I see that it's an array because it starts with a square bracket, it ends with a square bracket. I see that there are three elements because I have a comma inside. Each of the elements is an object. And in the object, there are four elements. The first is "nom" (name). The second is "description". The third is "livrable" (deliverable), and the fourth is "avantage" (advantage). So, here we understand that the items that circulate from one node to another are nothing more than objects. Three fundamental notions. We have items that circulate from one node to another, and we recognize them because we receive JSON as input, JSON as output. JSON is an array with elements. Each of the elements is an item. And then, in JSON itself, well, we have two main notions. We have the notion of an object or collection with keys and values, and a notion of an array with ordered elements. In this case, there is no notion of a key. The order is what makes it the key to finding an element.

Now, we'll stop at this level of theory and go practice. So, what we're going to do is create a new workflow. We'll take a JSON, we'll put ourselves in the situation as if we were receiving JSON from a third-party application. We'll say it's an accounting application that will send us all the expenses incurred during the month for the company's employees, and it will send us expense categories with a budget. So, it will tell us, for example, the marketing budget should be, let's say, €3,000 per month. And it will send us all the expenses, and we will have to classify these expenses according to the categories and perform analytical calculations as the accounting department would do to check expenses in the company. And so, this is one of the concepts that can be implemented in a business but that you can offer as a service to your clients. Okay? So, let's get started with our second example. What we're going to do is create a new workflow, still in our masterclass. We'll save this. We'll name our workflow, we'll call it "manipulation analytique" (analytical manipulation). We'll add a small symbol, a small emoji because we are gentlemen. Okay. Now, the first thing we're going to do is I've prepared a small JSON, and in fact, we'll simulate as if we were receiving this information from an accounting tool. So, in fact, what does my JSON contain? First, it contains the company name. So, this is the company's accounting. The period is from the beginning of March to the end of March. The monthly budget, so I have a monthly budget per category. So, marketing €3,000, SAS tools €1,500, travel €2,000, and so on and so forth. Next, I have the transactions. So, these are all the transactions that occurred during the month. And for each transaction, I have an ID, a date, an amount, a description. So, for example, here it's the subscription to ChatGPT Plus for five users, the supplier of this subscription, the payment method, the employee who handled it, and then a small note related to the transaction. And I have all the transactions that occurred during the month like this. And so, what I'm going to do is take this and put it as input to our workflow. So, we'll have a manual trigger. For now, what we'll do is add an element of type "Set edit fields", so the "Set" here. And we'll add a field, and we'll call it "données" (data). So, the data we received as input. So, this could be a webhook, for example, that retrieves data from an accounting tool. It could be data we retrieve from an Excel file, and so on. It can be many things. It's JSON, so I'll put it as type "object" and I'll come here and paste the JSON that I showed you. I'll run a test. So, in fact, I have here the JSON that I showed you earlier in my text editing tool with the data, so the company, the period, the monthly budget per category, the transactions, and so on. So, I have everything I need that has been entered, and so these are elements. I have only one item, of course, with all the information inside.

So, the first thing I'll want to calculate here is perhaps to be able to categorize these operations. So, what does it mean to categorize? Here, for example, the ChatGPT Plus subscription. I don't know which category it belongs to. Is it marketing? Is it tools? Because I don't have predefined categories that were sent to me by the system. So, either I've already stored this somewhere, or I'll call ChatGPT and ask it to categorize it in the correct category. So, we have 1, 2, 3, 4, 5, 6 categories: marketing, SAS tools, travel, training, equipment, and miscellaneous. And we'll ask it for each of these transactions to put it in the correct category. And so, we'll ask ChatGPT for this. So, in fact, we'll go into the modules, we'll see which is the right module to do this. Now, there's the module that allows you to classify text. I think we can use this one, or we can use a classic module. We can try both. In fact, the idea is what? It's that I pass it the description of the expense, I pass it the six categories that I have here, and I'll tell it to give me which category this transaction corresponds to. So, we'll go slowly. So, the first thing we'll do is, yes, we'll take the text classifier. We'll see what happens. So, text classifier, what does it do? In fact, we'll pass it a text and tell it to tell us which category it belongs to. And so, to do this, you've noticed that we have several transactions. So, we have, hop, we have 13 transactions. So, we'll do this one by one. So, the first thing to do before launching the text classifier is to put a loop and look at each element. And so, here, I'll add what's called a loop, which is not in "Data Transformation" but is probably in "Core" in "Flow", which is here, the "Loop". Otherwise, what you do is you search directly for "Loop", and it will find it for you. So, I'll add a loop. It has added the loop. Now, I'll just close it to show you what a loop is. A loop is a node here. It will take what it receives as input, iterate over it, and each time it will present you with an element. So, you can perform operations on that particular element. Except that here, you see that at the input of my loop, I have a single element. Okay? You see, it says "one item". So, I want the transactions. So, in my JSON, remember, there was the company name, the period, the budget, and the transactions. And all of that is in a single element. I want to retrieve, I want to loop over the transactions for now. So, I'll add an element here called "Split". We used it earlier. And the split, well, what will I split? I'll split the transactions. In fact, I want it to split the transactions and send me one transaction at a time. So, here we had 14, sorry. It goes from 0 to 13, so there are 14. And so, here, if I look at the input of the split, we had a single item, at the output, we have 14. So, here we have 14 elements, and we'll be able to loop over these 14 elements with the loop. So, the loop will loop over the 14 elements. Each time it loops over an element, it will go into the "loop" branch here. So, it will go through the first time, the second time, up to 14 times. When it has finished the 14 times, it will go into the loop, into the "done" branch. So, it goes through 14 times because I have 14 items in the loop. Then, it will pass one last time. The last time, when it has finished, it goes to "done" in the "done" loop. "Replace me" is nothing more than a node just available. This node does nothing. It's just that N8N, when they created the loop node, added it to make it clearer. So, they added a node here that says "Replace me" to say, put what you want to do here as an operation, and you can delete this one later. This node is useless. It's an empty node, it does nothing, in fact. So, when we loop, what will we do with the transactions? First thing, we'll classify. So, we'll put the classification. And so, in fact, what I'll do is I'll delete this node. I'll delete the loop and go into the text classifier. And so, the text classifier, what will it do? It will receive the element from my loop, and it will classify it. And in fact, to launch it, I need to launch the previous node first to know all the elements it has as input. I launched the loop. The loop returned the first element it will loop over. So, what is the text I want to classify? I want to classify the description. That's what speaks the most here. So, we have an ID, a date, an amount, a description, the service provider. Perhaps we can pass both. We can pass the transaction description and the provider. And here I'll drag and drop the provider from here. Card, the payment method is not interesting, the employee is not interesting. The note, it could be, but here I don't think it's that interesting. So, we'll limit ourselves to the transaction description and the provider, the provider of the transaction, or rather, with whom we made the transaction. We'll add the categories. So, if you remember, in my JSON, I had six categories. We had marketing, we had SAS tools, we had travel, we had training, equipment, and miscellaneous. So, here, I'll just add that it's a bank transaction, provider, or provider of the bank transaction. Just to explain to the LLM as much as possible what we're talking about. Here, I have the categories, but I can add a description. This allows the LLM to understand which category it should classify the transaction into. But it's not mandatory. As they say here, "Describe your category if it's not obvious." So, describe the category if it's not very clear at first glance, in fact, directly. So, here I had marketing, SAS tools, travel, I think I forgot to add training. If training is here, equipment, so I have one between training, equipment, and miscellaneous, 1, 2, 3, 4, 5, 6, so 6 categories, and I'll run it. Ah, yes, so it didn't want to run, why? Because it doesn't have a model. So, I need to provide it with a model. So, here I'll tell it that I want ChatGPT 4.1, like the other one. We'll take the 4.1 mini. Okay, let's go back to it. Let's run it again. Okay. AI, what did it do here? It was OpenAI. So, it was a ChatGPT subscription. Here, it displays the six branches that I passed it. It didn't put it in marketing, it put it in tools. Branch one, one item, and so it considered it a tool, and indeed, ChatGPT is a SAS tool. It didn't put it in travel, it didn't put it in training, nor in equipment, nor in miscellaneous. So, it classified it correctly. Now, there are different options I can add. There's an option that allows me to say that a transaction or an element can have multiple categories. In my case, I don't want that. I want it to put it in a very specific category, but know that you can add it. So, "allow multiple classes to be true". This means that with one element, you can have multiple classes or multiple categories for a single element. "When no clear match". So, here, it's when it's not clear, when it's not, when I don't clearly find which category it belongs to, well, what I'll do is, instead of using this "miscellaneous" here, we'll use the "other" branch. So, here, "miscellaneous" is what? It's everything else. It's everything that hasn't been found in the other categories. Well, in fact, I'll use that. So, I'll tell it that every time you don't find it in these five categories, instead of having a "miscellaneous" category, create a branch and output your result in the branch in all cases where you don't find what it is. So, this way, I'll have categorized all my transactions. I won't have transactions that haven't been categorized. "System prompt", there's no need because it already has a system prompt in place. "Enable auto fixing", I think that allows to, if it finds a problem, it tries again a second time. If the LLM can't do it the first time, it tries a second time to try to correct itself to avoid errors. So, we'll run it again because we added this branch. It still classified it as a tool. ChatGPT, we're good. So, here you see how it's presented. There's the LLM at the bottom, so like all modules, there's the LLM at the bottom left, and here there are all the branches, all the branches that I passed it. So, there was marketing, SAS tools, and you see, it put it in "SAS tools" because the transaction we passed it, it considered it a SAS tools transaction. Travel, training, equipment, "other".

So, this can be very practical when you want to, for example, perform a different action depending on the category. If you want to add labels to your email, you receive emails and you want to automatically label your emails. It's with this module that you can do it. You give it all the labels. When the label is not very clear, you add a small description. And each time there's an output, you'll add a Gmail module behind it that will tag the emails, add a tag to the emails to classify them. Okay, now I have these 14 transactions, and I'd like to categorize them. So, I'd like to find for each transaction in which monthly budget category it belongs. So, how can we do that? We'll ask ChatGPT to help us. But then, what will we tell ChatGPT? We'll tell it, "Here are 14 transactions that I want to categorize. Here are the six categories I have, into which they should fall, but each transaction into one category." And so, we'll ask ChatGPT to do that for us. And so, we'll use a "Basic LLM Chain" as we did before. We'll give it a small model. We'll give it the 4.1 mini. Hop. Okay. We've given it its small model. Here, we don't need chat, it's "define below the system prompt". So, we'll say, "You are an intelligent and helpful assistant, an expert in categorizing bank transactions." In the "user prompt", what will we say? "Here is a list of budget categories." And here, we'll put our list of categories. Now, we won't return the object, we'll return the list of keys because this is what? Well, it's an object with key-value pairs. So, marketing has a value of 3000. SAS tools has a value of 1500. So, I want the keys. So, I'll put myself here and I'll put a dot and I'll go get "Keys". So, in fact, it will list all the keys. So, "Keys", what does it do? It lists all the keys. It returns an array with the list of all the keys. So, I want, "Here is a list of budget categories: marketing, SAS tools, travel, etc. Categorize all these operations into one of the budget categories defined above." And so, here, I'll pass it the transactions. So, I'll pass it the array of transactions. In fact, I'll tell it, what do I give it? Do I give it all the information? Perhaps we can give it all the information. I think it can figure it out. And in fact, we'll use "to JSON string". So, it will transform the JSON object into a string with all the transactions. "Categorize all these operations into one of the budget categories defined below. Return a JSON." So, I want it to return a JSON in the format below. In fact, how do I want my JSON? Well, I want it to first give me for each of the categories. So, here I'll say "category one", an array with the suppliers. For example, category one, well, it's supplier one, supplier two. Category two, it's supplier three, supplier four. So, basically, I'm asking it to categorize the suppliers here. These suppliers, so OpenAI, LinkedIn, Zoom, SNCF, etc. I want it to put these suppliers into the categories I have. We'll see if it understands. If it doesn't understand, we'll improve it. So, same as before, we'll ask for a specific return. So, we'll ask for a JSON. And so, the specific return, we'll add it here. JSON, and we'll put the example. And we'll test our workflow and see what happens. Okay. So, what did it do? It returned "boot". Okay. So, I've modified the example I'm passing here in the "structure output parser" a little bit. In fact, it needs to have a well-defined structure. So, I'll pass the categories here without necessarily passing the suppliers, so that it can categorize. So, in fact, what it did is it returned the information here, and so it returned a JSON. Let's look in schema mode. So, it told me in marketing: LinkedIn, Google, Meta. In SAS tools: OpenAI, Zoom, Notion, Adobe, Midjourney, etc., etc. So, it categorized all my suppliers into these categories. So, here we have a list of transactions. We know each supplier belongs to which budget, or rather, which budget category.

Now, we'll have to do the sums. So, we'll take the transactions that are in the marketing category and we'll sum them up. We'll take all the transactions that are in the SAS tools category and we'll sum them up. And so, to do that, we'll do some code. And in fact, we won't write the code, we'll ask ChatGPT or Claude to help us. So, in fact, we'll take a module called "Code", and in "Code", there's a small code by default. We can use JavaScript or Python. Python is still in beta, but we'll use JavaScript. It's the simplest for us in terms of code. So, what I'll do is I'll open a Claude, we'll ask it to help us. So, "You are an intelligent and helpful assistant, an expert in generating JavaScript code for N8N." I have two things as input to my code, my N8N code. First thing, a categorization of suppliers, and second thing, hop, I pressed by mistake, a categorization of suppliers. We'll just take the text again. So, first, categorization of suppliers, and second, a list of transactions. I want to calculate, I want to calculate the total transactions per category. So, we'll start simply. I'll paste the JSON from the preceding node. So, I'll tell it, "Attached is the code, the JSON returned by the preceding node, which allowed to categorize the suppliers." Hop. So, here, I'm passing it the JSON with the preceding node that allowed to categorize the suppliers. The suppliers, and here I'll say, "Attached is the JSON of the node." So, here, I'll return here. So, we'll name this "edit field". We'll rename it, we'll call it "JSON input", for example. And so, here, I'll tell it, "Attached is the JSON of a JSON input that contains the list of transactions." And so, here, hop, I open my node. I'll take here in JSON and I'll copy all the JSON. I'll give it to Claude. We'll see what it does. Here, I've clearly explained that I want JavaScript code that I'll put in a code node and that will sum the transactions per category. Okay. The "process total" function receives all the items from the preceding node. We retrieve the supplier categories from the first item. We retrieve the transactions from the second item. We use an object to store the totals per category and the transactions per category. For each transaction, we identify the supplier category, we add the amount to the total of that category, we add the transaction to the list. Okay? So, that looks promising. What we'll do is we'll copy the code. We'll come back here. We'll go back to the code node, we'll remove what was there before, and we'll put the code that Claude gave us, and we'll...

Let's launch a test. OK. What did it give? So error, error during processing, cannot read properties of undefined, readon. So what I'm going to do is I'm going to copy this. I'm going to go back to Cloud and I'm going to give it what I got back. OK, so it found its error, it's in the process of correcting it. We'll let it finish correcting. We'll resume the code. OK, so we'll try. So now, it's redone the code. We'll copy it. We'll go here. We'll remove the old one. We'll retest. Well, it still has a problem. Why does it have a problem? So I have the impression that it can't find the elements, in fact. It's struggling a bit. Hop, we'll tell it, here's the error. Remember, uh, the previous node, the previous node returns the categorization. The node two steps back, input. So what we're going to do is we're also going to name this node, we're going to rename it, we'll call it categorization. So now, the previous node [Music] returns the categorization, the node two steps back contains the transactions. OK. So, what it did is it returned a first code where it used the data I provided. I don't want it to use the data I provided. I want it to provide me with a method that works all the time. So now it told me approach one, use the provided data, that's not what I want. Approach 2, modify your workflow. So use a merge node for, uh, after the JSON input node and the categorization node to combine the two sets. And so we'll do that, we'll please it, we'll go back just before our code node here and we'll add a merge node. And that will allow us to test this merge node. In fact, what does the merge node do? We pass it the inputs of two elements and the JSON of two nodes, and it will combine these two JSONs according to how I want it to combine them. OK, so we'll put it in append mode. OK. And what we'll do is, so in input 1, we have what comes out of, actually, we'll do it differently, we'll do it in input 1, it seems more logical, what comes out of what comes from outside, and in input 2, what comes from the categorization. So, in fact, uh, to make it as clear as possible, we'll put it like this, a bit higher. So we have what comes here with the JSON as input and what has been categorized. All of this merges into a single JSON. So if I relaunch this module, hop, I see that it put everything into the same JSON with two elements. Well, we'll put the code back here. We'll copy the JSON. We'll go back to Claude. We'll tell it, here's the combined JSON. Return me the adapted code. OK, it regenerated the code. We'll do another test. We'll go back here. We'll exit the merge. We'll take the code. We'll remove the old code. We'll put the new one. As you can see, there's no data in it. It's really dynamic that it calculates this. We'll see. OK. So, it made a small error again. I sent it back the error message it returned. It checked. And, uh, it did its calculation. Well, at the output, we have, uh, we have an output, but I have the impression, well, it put the budgets correctly, but the expenses, I have the impression they are at zero, which seems strange to me. So we'll ask it to recheck. It detected that the calculations are not being done correctly. I sent it back what it outputted earlier. There were a lot of zeros earlier, remember? And I told it, here's the input. I gave it back the JSON as input. I gave it back the output, it rechecked its code, and it outputted code that seems to work. So it calculated, uh, €877 in marketing budget expenses. Uh, and so there are 2000 and some percentage left to use. It calculated on the SAS tools we consumed €600, €698 on travel, €700 on training, that on the equipment we exceeded the budget. So we had a budget of 500, we spent 1300. So we're rather in the negative. So, uh, here's the code tool and the power of this code tool where in a few steps with Claude or ChatGPT, you'll be able to do super powerful calculations. This is where I told you, it's one of the elements that makes me decide if I want to, uh, finally, if I want to use N8N or Make. It's really this. If I have a lot of calculations that are a bit complicated, I'll go directly into N8N and I'll ask for help from ChatGPT or Claude to produce the code. The key is to describe well what you expect from it. So that's, uh, the calculations. Now, what we're going to do is we're going to manipulate this data a bit. Uh, in fact, uh, by manipulating the data, it will allow us to understand a bit all the, uh, functions that exist, uh, in, uh, in N8N. OK. So we'll take a quick look at the functions in N8N, or at least the most important, the most used ones. To do this, we've already done our calculation here. What I'm going to do is I'm going to pin all of this, uh, to avoid having to re-launch everything. And in fact, at the output of the code, so I'll add a node 7 to define variables and to play around with all of this a bit. So at the input, we have the code. I'll put it in a clearer schema mode. So we have the totals by category that were calculated by the code we had Claude generate. We have the overall total. We spent €4000 this month. Uh, and then we have, uh, by category, the budget, the expenses, the difference, uh, between budget and expenses, and then the percentage used. What we're going to do is we're going to add a variable, uh, of string type. In fact, uh, we'll, uh, like this, uh, play around with it a bit. So, what can we do with this? We'll go look at what information we have. So if I take, for example, here a number, let's say marketing. So here, I'll call it, uh, manipulation, and I'll take the value. So, you agree with me that this is a number. So there's the hash just before it. That means it's a number, it's a numeric. Uh, it's 877.5. If I, if I want to transform this into a string, how can I do that? So, first, look closely at the expression I have here. I'll enlarge the expression precisely to make it as clear as possible. Uh, you see a dollar JSON. So I explained to you at one point, the dollar JSON is to call the node just before. So the node just before my variable creation node. This node allows me to create several variables. There was a code node, and so when I put dollar JSON, I'm calling the previous node. So, of course, every time I put expressions like this, I must put the opening and closing curly braces. Two opening curly braces and two closing curly braces. So I'll do it again. Instead of doing a drag and drop, I'll write it. So what I'll do is I'll write two opening curly braces. You see, it does it by itself because it knows it's an expression. I had clicked on expression. It added two closing curly braces by itself and it's suggesting things by itself. So, in fact, there's an input assistance available in N8N by default, and it offers me the possibility to use the default variables. So, the first one it offers me is dollar JSON. And in fact, dollar JSON is, well, it explains it, it's a tab, but it explains it, it's the element just before. So when you want to call the element just before, you do dollar JSON. If you want to call a specific element, so a specific node, if you scroll down here, you'll have a section called earlier nodes. And so there's the node just before called code, but also the merge, the edit field that was before the basic LLM chain. So it was the chain, the LLM that allowed us to find, to classify, and the one-clicking. So it was the very first node, the workflow trigger. And then there's a methods section and a metadata section. So, in fact, each time you'll find, depending on the case, more or less these sections. A section with default suggestions. There's a section for previous nodes, a section with methods if there are methods we can call directly, and a section with metadata. So it's data that exists by default in N8N. OK. So, what we'll do is I'll take the dollar JSON, so it will take all the JSON from the previous node, and I want to access, for example, the value of the total by category marketing. And so to access, the code is, uh, the JSON, it's the JSON of the previous element, and I want to access an element in that JSON. And so to access an element in the JSON itself, I'll put a dot. And when I put a dot, I'm telling it to go into the JSON and look in the JSON for key-value pairs. So, remember, there's a key-value notion. Here, I want the total by category. So, I'll start typing toto. And here, it suggests total by category. So I'll press enter. I select it and I press enter. So I go with the arrows and then with enter. So now I'm in this, uh, in this object called total by category, and inside it, I have, uh, categories with numbers. So by category, if I want to go further inside the total by category object, well, I'll add another dot. So I add a dot, and here it suggests all the, uh, all the elements, uh, that are in the total by category object. So it suggests travel, miscellaneous, training, marketing, equipment, uncategorized, and SAS tools. So I'll go get the marketing, and when I typed marketing, automatically on the right, you saw it displayed 877.5. So, in fact, the act of dragging and dropping an element here from the left into the expression part is nothing more than, uh, an aid to avoid having to type all this code yourself. Then, we are on a value of type, uh, of numeric type. So marketing is a number. Let's say I want to transform it into a string. It can happen that you want to transform it into a string to split it or something. So, I'll add another dot. And I'll call a function. So, to string. And so what will this do? It will convert the number to a string. Well, it will display it in the same way, but it will no longer be a number, it will be a string. OK? So that's one of the functions we use. Well, it's not used a lot. You might need to use it, transform a string into, transform a number into a string. Second example on strings. So, what I'll do is I'll take a real string. In this case, well, I'll go into transactions and I'll take the description, for example, of the first, uh, I'll remove this text. I'll take the description of the first element of the marketing array. Well, there's an interesting element because it's an array, we haven't, we haven't used arrays until now. So I'll do it like JSON. The first thing, now you know, is dollar JSON dot. And so here, I'll go into the transaction by category object. So, I'll start typing transaction, it will suggest it to me. I'll add a dot because I want to go into this object and I want to retrieve the marketing array. So, let's go, I'll retrieve the marketing array. And so here, marketing is an array, an array with three elements, with the three, three transactions that are in the marketing category. So transaction by category dot marketing. So, I'm in an array. An array is not an object. To access an element in an object, you use a dot and then you put the element's name. That gives you the object's value. When you're in an array, it doesn't work like that. What we need to do is use brackets. So we use brackets, not curly braces. Opening bracket. We put the index of the element I want to retrieve. So, typically, in the marketing array, I have 1, 2, 3 elements. If I want to retrieve the first element of the marketing array, I need to retrieve element number 0. And so in arrays, in JSON, and in JavaScript, the very first element of an array is always element number 0. Then you have the element, so the first element is 0. The second element is the element with index 1, and so on and so forth. So, if I want to retrieve the description of the first, of the first transaction, well, I'll do marketing bracket 0 bracket. So it will retrieve the marketing object with all its information, but the marketing zero object, so the first object of the marketing array. Then, we want to retrieve the description of this element. So marketing of zero is an object. And so I'll use a dot and I'll write description. And so here, it retrieved LinkedIn advertising - Spring campaign. And that's how, uh, you access elements, whether it's from an array with indices because, remember, arrays are, uh, a collection, a JSON object with elements, but they are ordered. So there's no notion of key and value, there's a notion of order. That's why we used brackets with an index inside. Collections or objects, on the other hand, are, uh, objects are collections of elements that are identified by a key. And when you give the key, well, it gives you the value. And so here, I went into the transaction by category array, the first element of the marketing array, and I retrieved its description. So its description is a string. So it retrieved the string. Now we can play around with this string a bit. So, what can we do with a string like this? We can already retrieve, uh, the number of elements in this string. So if I add after description, I add another dot, I'll now have access to, uh, to functions. So one of the functions that exists is length. So if I type length, it will give me the number of characters in this string. We have other functions for string manipulation. So we'll look at them one by one. We'll go into the edit section. So base64 decode, in fact, it converts, so it does decoding and encoding in base64. It's mathematical calculation that can be used. We won't go into detail on that. I think you won't need it. 1% of people will need it. So we won't detail that. Concat, it allows you to concatenate a string with another string. So if I type concat here, it will concatenate the description with a string, another string that I'll indicate inside the parentheses of concat. So, let's say I want to concatenate it with, uh, hello. Well, I type hello here, and you see here the result LinkedIn advertising campaign spring, and it concatenated it with hello. If I want to add a space, I just add a space here. It added a space. So concat allows you to concatenate the element I called with another string. We continue. We were on concat, extract domain. So if it were a URL, I could use this function to directly extract the URL. So directly extract the domain, sorry. If it were a URL, I could directly extract the domain, which can be super powerful and simplify your life when you have, perhaps, an email address, and you just want to retrieve the domain name, you take the string and you put dot extract domain, it directly gives you the domain of that email. Extract, it will extract the first email it finds in a string. So if our string contained an email, it will extract the email inside. Extract a, it will extract the first URL it finds in a string. So all of this is similar. Well, it's similar, it's in the same category, let's say. Extract URL path, it returns the link of the first URL it found. So, in fact, the link after the domain. So, let's say it's google.com/search. Uh, if I call extract URL, it will return https2./google.com. And if I call extract URL path, it will return the slashsearch. H, I'll skip, quote, quote, it can be useful if there are, if there are double quotes in the string, it will allow you to add backslashes to avoid it being misinterpreted by JavaScript code. You won't necessarily need it. Remove markdown. So if your string contained markdown notation, it's with this function that you can directly remove the markdown. Remove tag. So if there was HTML in it, so if it's HTML code, you'll be able to remove all the tags that make it HTML with this function. Replace, it will allow you to replace in a string. So if I do replace here, well, there's replace and there's replace all. Replace all will replace all occurrences. Replace will replace the first occurrence. So, let's say I'll use replace all. And so here, I'll tell it to replace, uh, in my string LinkedIn. [Music] with Twitter. And so it replaced LinkedIn with Twitter and it gave me Twitter advertising - Spring campaign. So, in fact, it's a function that allows me to replace a string with another string in my input element. We'll continue with strings. So we've reached replace. Uh, in advance, we can replace a character in particular. Uh, so if you want to replace a single replay, in fact, replace special characters, sorry. If you had accents in your string and you want to, uh, remove them, uh, it's with this function. So here, I had publicité with an accented e. Uh, it removed the accent, it put a normal e. So this allows, for example, if, uh, you want to process variables and so on and remove accents and special characters. Then, we arrive at slice. Slice allows you to return a substring. So, we were on LinkedIn advertising. If I want it to return just the first three characters of this string, I'll tell it to start at zero and end at 3. So, in fact, I'm telling it to return the characters from zero to, so start at zero and return me three characters. OK, let's go back to the list. There's quite a lot in this list. There's split. Split is a function that can be used. I think we've seen it, we must have seen it, I don't remember. Uh, and so split, what does it do? Well, it can be super practical for cutting a string. If you have, for example, a string, uh, where there are, where there are commas, well, instead of putting the delimiter, what I'll do is I'll put directly a string, a string with first names, for example. OK. So here, I'll split it. So I'll cut it. I'll tell it to cut it, but to cut it by taking as a separator a comma and a space. And so here, when I tell it that, it returned an array. You see, it returned one with three elements which are Jean, Julien, and Julie. So, I had passed a string, I asked it to split it by taking the comma and the space as a separator to, uh, to, uh, cut my string. Well, it found that there were three elements, it cut it. So this can also be useful when you're manipulating strings. Where were we? We were on split, substring. So it returns a substring. So it extracts a part of a string, usable a bit like what we did with the slice function. toString. This one can be useful when you want to pass an entire JSON, for example. That's what I did earlier. I used toJSONstring. So I passed it the entire dollar JSON. I put dollar JSON. toJSONstring, and that passed it the entire JSON I had as input. So dollar JSON.toJSONstring. Hop, and in fact, it transformed the JSON string that is readable by the LLM. And like that, the LLM has all the information if I want to pass it the entire JSON I got as input. I'll go back to a string. And we'll review the functions. So we had seen casts, so we transform into boolean, into datetime, into number. So if I had a string with a date in it, I can transform it into a real, a true date. So I'll take this date. This date is a string because there's an A in front of it. And what I'll do is I'll transform it into daytime. So I'll use todaytime. And in todaytime, todaytime takes a format. So I need to tell it the format of the date I gave it. So the format of the date I gave it is, uh, year in four letters. So YYYY, then there's a dash, month MM. Then there's a dash with the day DD. There. So here, I'll put the format, and in fact, the available formats are indicated on this page. So I'll open it on another page to show you. There. So here, on this page, all the available formats are indicated. Uh, so the four letters in lowercase Y is the year. The lowercase MM is minutes, not months. However, uppercase MM must be months. There, they are. So it's uppercase MM, uh, and also uppercase. And then lowercase DD is the day, and it's indicated somewhere here. There it is. So the day of the month. And if I don't want the zero, I put a single, a single D. OK. So here, I was able to transform a string into a date. And so, of course, if it became a date, well, I can manipulate it as a date, and I can access all the functions that allow me to manipulate, sorry, dates. So, here, we've done a quick tour, but we've still covered all the functions that are available that allow us to manipulate strings. OK? Now that we've covered the functions related to strings, we'll tackle a second type of element, which are numbers. Uh, and so what we'll do is I'll take a number here, for example, marketing. We'll look at all the functions we have for marketing. First, we'll put a dot as usual, and we'll go into the methods section. ABS is the absolute value. So if it's a negative number, well, it will return it as positive. And if, uh, and if it's positive, it will return the same value. So here, if I put ABS of this value, you see, it returned the same value, it didn't change anything. Ceil. Uh, ceil, it rounds up to the nearest whole number. So, here, my marketing value is 877.5. If what I said is true, it will return 877. So it's ceil 878, sorry. And so it's the superior number, and so 878. Floor is the opposite, so it will round it down to the lower value. So 877. Format. This will allow me to format a number according to the local format I'm interested in. So here, remember the number, it has a dot as a decimal separator. In France, I want it to be a comma. So, I'll use format and I'll tell it to format it in fr-FR in uppercase, not fr. Here, you see, it replaced the dot with a comma. If I had a number with thousands, so if I take, for example, the total, the general total, so instead of taking marketing, I'll take general total. General, it's missing an E. And here, you see, it put a space as a thousands separator here and a comma.

As a decimal separator. So in fact, we can format with the local value, or rather the local format that interests us. Next, I'm going to focus on an integer. So for example, I'll take "formation". So "Toto by category point formation". So it's at 799. There's a function called "is even" and another called "is odd". "Is" allows me to check if it's an even number. So here it's an odd number, it should return false. So "is even" returns false. "Is odd". Here, it should return true. It returns true because it's an odd number. So "is even" for numbers to check if it's an even number. "Is odd" to check if it's an odd number. We continue to move forward with numbers. We'll take our "total marketing" again and here we'll tell it to do a "round". In fact, "round" is rounding. It's the classic normal rounding. Not like "ceil" and "floor" where we could choose whether to round up or down. Here it's normal rounding. So from the 0.5 mark, it rounds up. If it's lower, it rounds down. So if it were 877.4, it would have rounded down. So if we take for example "outissas difference", I'll take this figure here and I'll tell it to "round" and so it will return 883 because it removed the 0.02. So "1" is rounding with one digit after the decimal point. "2" is rounding with two digits after the decimal point. That's it for the number part. Now, we'll move on to the date part. So what we'll do is create a date because we don't have any dates in our JSON here. So I'll take a date that's a string. It says "A", so it's a string, and I'll transform it into a date. So "today time". And what's the format? It's year-month-day. So, it recognized it on its own and directly told me it's March 5, 2025. So in fact, it recognized it. I don't even need to tell it the format in this case. Now, what are the functions we can use on dates? Well, we have useful functions like "end of". "End of" allows us to return the last date of a period. So if I tell it "end of" and I tell it "month", it means it will return the last day of the month of the date I passed as a parameter. So remember the date I passed as a parameter was March 15, 2000, or rather March 5, 2025. The last day of March is March 31, 2025, and that's what it calculated here. So "end of". Similar to "end of", we have "start of", and so it's the first day of the current month because I indicated "month". If I had indicated "year", it would have returned January 1, 2025, because we are in the year 2025. So in fact, it really indicates, we can ask it to return the first or the last day of a date, so of a year, a quarter, a month, a week, a day, an hour, a minute, a second, and a millisecond. So this can be super useful for example with weeks. If I put "week" and it's March 5, 2025, if I put "week", it will return March 3rd. When does the week start? It's March 3, 2025, so the first day of the week. We'll continue to move forward. So "start of minus". So here, we can subtract units from a date. So if I do "minus 2 days", so I'll do "2" and in double quotes, I'll do "days". So it will subtract 2 days from this date. So March 5th, it subtracted 2 days. It calculated March 3rd. I say subtract 2 months. it went back to January 5, 2025. So we can subtract, of course, if I can subtract, well I can also add, so "minus" and "plus". "Minus" to subtract and "plus" to add. I can also assign a specific value. So I can use "set". So "set", I can tell it to assign for example to the year, assign the year 2023. I'll tell it to change the year to 2023 with "set". And so it returned March 5th, still, but in 2023 because I asked it to set a very specific date, a very specific year. So that's "set". We can change an element in the date, not necessarily the whole date, that can also be interesting. "Set locale" is for defining the time zone. What is the time zone? "Set locale" will define the language and the date formatting, so in what format it will be formatted. So if I do "set locale FR-FR" in uppercase, well it will format it. It will put the locale. When I use "to locale string" here, the "to locale string" function, it will automatically return it in French date format. So with slashes, the day first, then the month, then the year. So "set locale" allows defining the local display at the moment I call "to locale string" which will transform my date into a string. "Set zone" allows me to define a time zone. So if I want to define a time zone for my date, what functions are left that are interesting? "To UTC", so to put it in UTC format, or rather UTC time, we use "to UTC" and then I think we're pretty much done. We've had a quick look at the most interesting functions. There's also "diff to". So we can calculate the difference between two dates. So we pass it a first date and a second date. It tells us how many days there are between these two dates. "Diff to now". So we pass it a date and it tells us how many days there are between that date and today. "Equal" is for comparing two dates to check if they are equal. "Is between", so we pass it two dates and in fact we pass it dates as parameters and so it can check if the current date is between such and such a date. So we can do a check, we can check if it's in a date interval. One last function, I think, that could be interesting, I'm looking for it. I'll type it. It's "is weekend". And in fact, it checks if the date falls on a weekend. This can be interesting if you are checking for prospecting, etc., and to tell it if it's a Saturday or a Sunday, do nothing. So you test with "is weekend" and it returns true or false for a date. So these are the functions for dates. OK, we'll move on to arrays. So we'll take an array here. For example, the marketing transactions array. So here, I see the three little dots next to it. That means it's an array. I'll put a dot and see what operations we have. We have quite a few operations. Let's go through them. So "append". What does it do? It allows adding elements to the array. So if I want to add a new element to an array, "append" will allow me to do that. So what I'll do is I'll create a small "test" array here. I'll put "Jean" and "Julien" in it. And if I do an "append" and add "Julie", well you see it returns an array with three elements. So it added my third element that I added with the "append" function. So that's the "append" function. "Chunk" rather, it will split an array into several sub-arrays. So here, if I tell it to split my array here into sub-arrays of one element each. And so here, it returned two arrays, and in the first array, there's one element, "Jean". In the second array, there's one element, "Julien". So "chunk" allows splitting an array into several arrays according to the number of elements I want in them. "Compact" will remove empty elements from an array. So if I had an empty element in my array here, and I tell it to do a "compact", you'll see it will return the array without the empty element. So it removes empty elements from the array. "Difference" will return. I can pass another array and so it will return all the elements that are not in the first array. So if I return it, if I do another array here like this, well "Julien" is in the first array but not in the second. That's why it returns an array with only "Julien". So that's the "difference" function. "Find" is for finding something. The first element that satisfies the condition we pass to "find". So here, you've seen, I told it, I defined a variable, so it's the element of the array, so I called it "names" and I tell it "Find me the names, the first name". So "find" finds the first element such that the length, the number of characters of the name is strictly greater than two. So it found "Jean" because it has two characters. If I had put strictly greater than 4, "Jean" doesn't match, the second one doesn't match. So it found "Julien", it displayed "Julien". So that's the "find" function. "First" as its name indicates, returns the first element of the array. "Index of" so if I return the element, so if I tell it "index of Jean", it will tell me zero. In fact, it returns the position of the element I'm looking for. "Intersection". So I can ask it to do the intersection of this array and return what is common between the two arrays. "Is empty" is to test if the array is empty. "Is not empty" is to test if the array is not empty. "Join", what does it do? It allows joining all the elements of the array by adding the separator that I define in the "join" itself. So here, I tell it "Put all the names, all the elements of the array, separated by a comma and a space." And that's what it did. So it returned "Jean, Julien" separated by commas and spaces. We continue to move forward. "Merge" allows merging two arrays and returning the complete array of the two elements. In fact, there are many, many functions available. When you need to manipulate arrays, you'll surely find what you're looking for there. You can do almost anything with them. Now, we'll move on to the object part. So, object part, what do we have on objects? So what I'll do is I'll take an object, for example, the "total by category" object, and we'll look at the functions we have. So first, there are the "fields", so these are the fields available in it. So we had "marketing", "outilas", etc. We looked at that earlier. In terms of functions, what do I have? I have "keys", it returns all the keys in the object. So if I call it, it will return "marketing", "outissas", "deplacement", etc. These are all the keys available in the array that are in the object, sorry, that are in the object. So if I need to find all my keys, that's how I do it. In the same way that I have "keys", I also have "values". I can take all the values of my object and put them in an array. So it returns them in an array. We continue. "Is empty" is to test if it's empty. If the object is empty, well it will return true, so it returns a boolean type true or false. "Has field" returns true if it finds an element with the name I passed as a parameter. So here, if I tell it, does it contain a field called "marketing"? Does it contain? Does the "total by category" object contain a field with the key "marketing"? It returned true. That's true because there is an object called, there is an element called "marketing" in that object. "Compact" will remove all empty fields. "Is not empty" is to check if it's not empty. So it's the opposite of "is empty", and then there are a few functions left here. Generally, they are very little used. "Remove fields containing" removes fields with a given value. "Remove field" removes a given field from the object. So we haven't talked about that. This removes a given field from the object. So you pass it the key and it will remove it. "Keep fields containing". So it keeps only the fields with a given value. So "keep", "remove", "remove containing". "To string". So it will put the object in string format. And then I think we've covered everything. "URL encode". So it will generate a URL with the parameters in the object as URL parameters. So something like this. And this can be practical when you have an object with parameters that you want to send all these parameters to an API, you call "URL encode", it will directly provide you with what you will put directly in your URL with the values that are in place. So this can be interesting. So I think we've covered almost all the functions that are available in "Edit Field". Of course, you can go back to the masterclass when you need to. Otherwise, you can go to the N8N documentation. So if you go to this link, you'll find all the information related to the masterclass. You have all the functions available for arrays, for booleans, for dates, etc. And since this is something that evolves over time, you will always find the latest version in the N8N documentation. Now, we'll move on to another part, which is webhooks, APIs, REST APIs, and how to make API calls. To do this, we'll go back to our first workflow. We were creating a commercial proposal. So we'll set aside this first version and create another version. And so here, what will we do? Well, in fact, generally when we make commercial proposals, how does it work? We have an appointment with the client, we have a discussion during the appointment. What I usually do, if I use Phantombuster, is to record the discussion I have with my client automatically. So it will connect to your meeting with you, it will transcribe the meeting, and it will save the transcription directly. So what I like to do is to retrieve this transcription and instead of filling out an Excel file, I'll give it the raw transcription and it will try to prepare a proposal for me. To do this, we'll need to set up a form to fill out, to pass it the transcription, etc. And to create our form, we'll go to our favorite form tool, which is Uform. So on Uform, it's a form tool that is rather free. In any case, the largest part is free. You don't need to go to the paid version to use Uform. And so, we'll create a new form, a nice blue one. Let's use this one. And we'll create a form. And so in fact, I'll delete all the pages it put by default. I don't need them. We'll create a new form. So in settings, normally I can directly tell it the language and so I can tell it that it's French. And normally, if all goes well, when I build it here, it will take that into account if I'm not mistaken. Yes. So I'll delete this. Hop. I need the first name, last name, email. I'll leave the phone number just in case, and the company. That's perfect. So here, instead of saying "Please fill in the following", "Client or prospect details, sorry". Then I'll try to remember what we had in the Google Sheet. There were a lot of information that would ultimately come from the meeting I had with the client. So what I'll do is I'll just add a long text here and I'll put "Meeting transcription" here, and that's it. I won't need anything more than that. With the meeting transcription, it will be able to manage on its own. We'll see how the LLM manages. So here, this is my form, I'll publish it. It gives me a link, I'll copy the link and I'll open it. Here. So there's the information that I'll fill in. Another thing I need to do is go to settings and I'll configure an integration, sorry, sorry, sorry, integrate, and I'll connect a webhook. So what is a webhook? In fact, it's a URL that N8N will give you that will be constantly listening. It's waiting, and every time someone calls it with information, it will trigger and it will trigger a workflow in your N8N instance. And this is particularly useful when you want to retrieve information from other systems, when you want to retrieve transactions from your bank, when you want to retrieve information from your CRM, when you want to retrieve information from a form, as we're going to do here. Typically, you put a webhook in N8N and you wait. And in fact, this webhook, when you put it into production, it will be constantly waiting. Every time it receives information, it will trigger the workflow that follows. So what we'll do is, should we do this in this workflow, or should we create a new one? I think it would be good to create a new one. It would be better, I'd say, than to touch this one. So, we'll create a new one. We'll call it "Commercial Proposal Power". OK, and we'll add a webhook. OK. So you see here, the webhook has some default parameters. First, there's a URL that N8N gives you by default. There's the method, so the method is defined here. So there are several methods. The two most used methods on the internet are GET and POST. GET is for retrieving information. POST is for sending information. Most of the others we rarely use. They exist, but we rarely use them. So here, what we'll use is POST, because the form will send us information. It won't try to retrieve information from us. It will send us information, and we'll process it in our workflow. So here, I'll put POST. You can choose the path. So you see here, the identifier here, 473 to 65. You can define this. You can define something to your liking, and you can define it. So I could tell it, I could put "Toto" for example. And so my webhook will be webhook-test/toto. If I want to go into production, I click on "Production URL" and so it will remove the "-test". OK. So here, I'll put "toto". I'll put the webhook from earlier back. Authentication, there's no need for it. I don't need it to authenticate. And the response should be immediate. So what I'll do is I'll put this webhook in listening mode. So "listen" means to listen. I'll put this webhook in listening mode. So I'll copy it. I'll copy its value. I'll put it in listening mode. I'll go back to my Uform form here and I'll paste the address of my webhook and I'll click on "Test this webhook". Here. So it tells me there's an error. Why? Because it wants me to test the, to fill out the form at least once to test the webhook. So what I'll do is, it's still listening. I'll go back here. I'll fill out the form. So I don't remember what we called our first client anymore. We'll manage. We'll call it something else. So the company, we'll call it "Export Verdure". For example, "Verdure" phone number, not needed. The company. Ah yes, "Export Verdure" is here. I'll put the email. Do I need an email? Yes, I might need an email to send it later. Let's do that. Julie@exportverdure.com. OK, next. So here, the transcription. So what I'll do is I'll connect to my Phantombuster. I'll take an old discussion I had with a former prospect. I won't show you his details, of course. These are private discussions with clients. So I don't want to reveal the details, but I'll paste the discussion generally. So it will be a general thing. So here, I've submitted my thing. I'll test the webhook again. OK, it succeeded. I'll go and look on this side. I see that everything has arrived. I see that it received the email, the company name, the first name, last name, and the meeting transcription. Everything is there. So what I'll do is I'll go back to my Uform form, I'll click submit, and in fact, hop, I'll do it again because I had to reactivate. So I'll pin this. I'll save these values to keep them to do my whole workflow. That way, I don't have to resubmit the workflow multiple times. I'll put it back in listen. So, I have to unpin it, of course, otherwise it's not nice. I'll copy this and put it back in listening mode. I'll submit to connect my webhook. And here, I'll come back and I'll have received all the values. So what I'll do now, the first thing is I'll pin this so I don't have to resubmit my form multiple times to do my tests. So I did it once at the beginning and I use it afterwards. So, I received an item from my Uform. Now, we'll use this information to build our proposal. So, we no longer need Google Sheets. However, we will need this part. So here, hop, I select what interests me. I do a Ctrl+C, I go to the other workflow and I do Ctrl+V, and it pastes the information. So I'll reopen my proposal data generation here and I'll see what information I have. So all this doesn't change. It's the structure of the response I expect from it. The system input doesn't change. However, the input will not be the same. And so, I won't give it an input. So I'll remove the example. And I'll leave here in the user information. However, the user information is no longer the same since my inputs have changed. So I'm no longer retrieving this from a Google Sheet. So here, the client, well, I'll put his first name space last name. I'll put the company name that I retrieved here. Sector, all that, I don't have it. All I have is the meeting transcription with the prospect. And I'll put the transcription here. And that's it. I'll launch it and we'll see what result it returns. So, "Hello, we thank you for the opportunity to collaborate with Export Verdure on the internal launch of your innovative application..." and so on and so on. And so it proposed three services: automation of content creation and distribution in multiple languages, automated prospecting and influencer management, automated monitoring of marketing trends by country, and it proposed the processes with the time I'll spend per phase, etc., etc. The investment, we're looking at an estimated investment between €15,000 and €25,000, etc. So you see, it's quite powerful. From a transcription that I gave it as input, it was able to prepare an almost complete proposal. And so here, if I relaunch the entire workflow, it will recalculate the proposal data generation part, but it will also generate the entire document and so it will put it directly on my Google Drive. And if I go to my Google Drive, I'll probably be able to find the document there. Ah, here it didn't like it. It didn't like it because it's referencing a node that no longer exists. So it's retrieving the info from the Google Sheet, except that it no longer exists. And so, I need to pass it, from the webhook, the company name that it will put in the file name it will create. So, hop, we'll do it like this. We'll save again and we'll relaunch. Ah, it didn't like the final proposal. Why? Because maybe, yes, the same. I need to give it the client name. So, what does it expect here? Ah, yes, the first name plus the last name. So what I'll do, I'll go to the webhook, we'll take the first name space the last name. The company name, we'll replace it too with "company". And normally, everything else is green. So that's perfect. I save again and I relaunch. My workflow has finished running. I should normally have a document here, and so it will generate my proposal with my information, with my deliverables, with my planning, and so on and so on. So in fact, I have all the information, and that way I've transformed a proposal that was a bit static, that started from a Google Sheet, into a proposal that starts from a Uform form and can be automatically generated like this. What I'll do is I'll remove the pin here, and we'll consider our workflow here, the workflow with a webhook, as finished. So that's what webhooks are. Webhooks allow listening. You can also respond. There's also a webhook response that can be useful if you need to respond to the URL that called you. So if you want to send data back to it, that's with the webhook response you'll do it. For example, if it called you with a GET. With a GET, it expects information in return. It's with "response to webhook" that you'll send it data. And so with the webhook and "response to webhook", you can create your own API. In fact, you define your API, and that way you define a workflow for each element of your API or each call to your API, and you can use it like this. Now, we'll tackle the REST API part. So in fact, if you remember at the beginning of the masterclass, we set up a connection to Google Sheets, we set up a connection to Google Drive, etc. All of these are API calls. These are API calls, but they are encapsulated within N8N. N8N manages them for us. So, just like these API calls that are encapsulated for us, we can ourselves make API calls to any API that is not already integrated into N8N. And to test this, we'll take an API. There's an API that I like, it's called Tavelli. Tavelli is an API that allows you to search the web or to retrieve, or rather, to scrape pages on the web. In fact, we'll use the search part. So, you can do up to 1000 searches for free, if I'm not mistaken. Yes, there are 1000 free monthly searches, and then you pay, a bit like LLMs, you pay on a pay-as-you-go basis. There are also monthly plans, but otherwise you pay, let's say less than one euro cent per search, so $0.008 per search, so less than one euro cent per search. So, in fact, how can you do this? So if I go to the API Playground, I'll be able to use their API. But I don't need to use their API. I'll just take their documentation. We'll go to their API documentation. And that's how it works. Generally, you have an API that you want to add to N8N, you consult their documentation, and you'll see how to make these API calls. So, where you generally need to go is to "API Reference". So there you'll have all the API calls available in Tavili. So there's search, there's extract, there's crawl, and there's map. Crawl and map are apparently in beta. So here it traverses an entire site like a graph. What might interest us is "search", and we might do "extract". So, search. Search is like doing a Google search but via API. So, in fact, when you look on the right, they will generally give you the request to make in curl mode. And it's this mode that is super interesting. In N8N, we can directly copy-paste this curl. So, I want to do a search. Can I indicate my search somewhere? In fact, the parameter that is really necessary is "query". All other parameters, I don't need them. So, what I'll do is I'll perhaps go back to the playground mode here and look in shell mode if it gives me anything. In shell mode, in curl mode, in fact. Yes, that's what interests me. So, let's say I want to do a search, let's search for myself and see what the results are. So, I'll copy this curl. I'll go back to N8N, I'll create a new workflow in my masterclass. I'll call it "API Manipulation". We'll add a little emoji because we're gentlemen. I don't know which one I'll put. Let's put this one. I don't know what I did. Ah, so here I'll add a module. First, I'll add a trigger. So it can be a manual trigger like we've been doing. And in fact, how, what could we put? We can put something "on schedule". That means it will trigger at a given time at a frequency that I will define. So I can launch it, for example, every day at midnight. So every day, so the number of days between launches is every day. I put one, so every day at midnight it will launch. That's my trigger. Then I'll make an API call. So I'll use the "HTTP Request" module. And so here, if I go back to the documentation here, so you see, it's normally a POST, but it's not a big deal. Since I copied the curl, I'll go back here. And you see here, there's an "Import" button. You click on "Import", you paste your curl, you click on "Import". It has put all my variables correctly. It has put a first variable in the header, so in the header of my HTTP Request API, which is my key to connect to Tavelli. Then it has put a body, so the content of my request. So a request consists of a header and content. The header, generally, we put the key in it. There are other information that circulates in it, but that doesn't interest us. And the body, the content, is where we put our parameters that the API expects from us. So here, the API expected a "query" from me, I passed a "query" with my first name, last name, and last name. And so here, it returned the results. So you see, it returned five results. Five results indeed, and it returned the sites where it found my name available. So it found quite a few things.

She found me on a masterclass on Gumroad. She found me on Codeur. She found me on Insta. She found me on YouTube. So there you go, you see, we've just made a typical call to an API. The connection parameters are in the node itself. If I want to keep these authentication parameters somewhere to be able to reuse them elsewhere, there's a way to do it here in the authentication section. So, there are two types of authentication: predefined authentications. For example, I want to call the Google Sheet API. Yes. Well, I had already defined a connection to Google Sheet. So if I look in there for Google Sheet, I had already defined a connection to Google Sheet. And so it's possible to use my Google Sheet connection to call the Google Sheet API. If there's a call that I don't have by default in the available nodes in N8N, I can use Make Request to call that node because you should know that NN will integrate an app but probably won't integrate all the APIs, well, all the endpoints, we call them API entry points or API exit points, it won't be able to include all the nodes. So it includes the most important, the most used ones. If there are nodes you want to use but they don't exist, well, you use the HTTP request and you use the authentication you've already predefined elsewhere. The second possibility is generic ones, which don't correspond to an authentication defined by an app already integrated into NN. And so there, you have different types of authentication. In our case, it's a bearer type authentication. And so there, I'm going to define a new credential and in bearer, I'm going to put, normally, authorization: 2.0 bearer space bearer space with my key. So the generic part, you'll be able to define authentications that aren't integrated by default in NN and reuse them. And notably, our Tavili connection is a bearer type connection. How did I know it was a bearer type connection? Quite simply, in the playground here in the shell, I saw it was a bearer type authentication. In the documentation, I'm sure they mention it somewhere where they say how to authenticate. There. So they say it's bearer. It's a bearer type authentication. Okay. So that's the API. So what I'm going to do is I'm going to put it back, no, we'll relaunch to check that everything works. There, it works and it returns my results. So those are the appt request calls. And finally, with this module, you are free to make calls to any API you need. You're not limited to only the integrations that are there by default in. So you'll look up your API's documentation, you'll take the endpoint you're interested in, you'll enter your key, and you're off. You're free, you can do whatever you want with APIs, with HTTP request calls.

Another concept I'd like to cover is the human in the loop. So, in fact, NN offers a possibility to add human validation to NN workflows. And how does that materialize? So, if we open a new workflow here and name it human validation. Okay. So, we'll add a manual trigger for now. And how does human validation present itself? First, it's this human in the loop here. And in fact, we'll ask the user to validate through all these means. So, all these validation methods are available, whether it's email, Discord, Teams, Slack, Telegram, WhatsApp, and so on. All of that is available and can be configured to request human validation. We'll do it by email. And how does it present itself? The first thing is to configure your email access. So, I'll do it with Gmail. So, there, I give NN access to my email. Okay, so it has successfully set up the connection. I'll rename this with my email address so as not to lose the info and to be able to find it later. And then I'll save it. So, that's my credential. How will it be? It will be by send and wait for response message. So, this is where the human loop comes into play. That is to say, it will send an email, it will wait until the person responds to the email and provides a response to continue the workflow. We'll send it, I'll send it to a personal address of mine, and then the subject, we'll say validation of a quotation of a citation, sorry. And in the message, what I'll do is, just before, I asked Chat GPT to generate a random citation. Any one. So, in fact, I'll do my LM, I'll do define and there I'll say generate a funny quote. Perfect. Here, I'll add the model 4 mini. That's perfect. So, the model is there. Here, I'll go back to Gmail and I'll test the workflow. So, I'll test what comes before first. So, I'll remove the link and I'll test. So, it generated a funny quote. I'm in shape, well, in potato shape. Great. And so I'll send it as a message, by email, and I'll ask for approval. Now, there are three types of approval available. Either it's an approve or disapprove button. Either it's text, and then we can ask an LM behind it to interpret the text and take action based on the text. Either I can put a custom form, and in fact, I define all the fields I want in my form. So, for now, we'll keep it simple, we'll put approve. So, it has two choices: either it approves, or it doesn't approve. And so, then, I can add options, so the options for approving. So, approve or decline. Primary decline. So, I decline. So, that doesn't suit me. And that's the second button. There's the possibility to remove the NN branding in the email. So, that's what I'll do. I'll remove the branding. And what I'll do, I'll do a test. Okay, so let's go to my inbox and let's look at that. So, here's the email I received from N8N. There's the message I put. I'm in shape, well, in potato shape. And in fact, if you come back here to the workflow, you see, it's still waiting, meaning it's waiting for a response to continue the workflow. So, I'll click, I have two buttons. Either I decline, or I approve. If I say I approve, so there's a page that appears. And if I go back to the workflow, my workflow has finished. So, it continued, so it launched the rest, and I see that the approved here is true, so it approved the message I sent it. So, this node will allow you to validate or decline, but it will also allow you, you can also put a free text field and give the person the possibility to express their opinion. And so, we'll test that. So, we'll put a free text. And based on the free text, we'll call an LLM behind it again, and we'll call an LLM behind it to rework the message. So, we'll put another LLM, which is, when I connect it to a model, I can create another one, but I can also connect to the first one. If I want to use the same model, I use the same model. It's simpler that way. So, here, what I'll tell it, I'll tell it, I sent a first quote to my manager. Here it is. Here, I'll put expression, and I'll put the quote, the first one that was generated. Here's his feedback. Can you revise it accordingly? So, here I'll put the feedback from, which will arrive from here. So, I'll remove the rest for now. We put it in free text, and I'll launch it. Okay, I'll go back to my email. And there, I see, if the gardener doesn't grow a plant, he'll never grow very far. So, there, I can make a response, and I can make a written response. Can you make this quote even funnier? So, here, I'll connect, and I'll come here, and I'll put, well, it's not returning yet. So, I'll have to launch it a second time. No big deal. So, I'll submit, and I'll come back to my workflow. And I see that my workflow has finished. So, there I can connect it to my LLM, take back the message. So, the message that arrived from Gmail. So, can you make this quote even funnier? So, the message that I gave it, and I'll ask it to revise it. Of course, here's a revisited version of the quote to add a touch of humor. If the gardener starts believing he's a plant, he'll surely end up asking his roses for advice on his career choices. Great. And so, there you see, I asked for human feedback. Now, it's not a business case, it's just to illustrate quickly. But I asked an LLM to produce content. I sent it to a human and asked for validation. Here, it's by Gmail, it could have been by WhatsApp, it could have been by Telegram. And then, based on his feedback, I went back to ask the LLM to revise the response. You see, with this simple example, where can we go? In fact, right after the response, we can put a loop and loop on the response. So, if you're in a customer support company, customer support emails, you can very well, with this system, by putting a loop right after the customer's response, to review his response, to first produce a response to the email according to rules defined by the customer, and in fact, it produces a response to a support email. Then, you put a human loop and ask someone to validate the response. If the response doesn't suit him, he can say, resend the response until it's good, or he can say, that's fine, send the email. So, in fact, we can go really far with this human loop in the workflow, we can add quite a few things, and we can go far, and in fact, that's the whole point of this human loop in the workflow, it's that we add a human touch in the company, we always need to keep in critical processes, we really need to keep a human touch and a human review. And this fixes that problem, and it will allow you to integrate AI smoothly into any company, even if they are afraid, or the company is afraid, precisely of the errors that AI can produce, well, with human validation, in the end, AI has done all the work that is complicated to produce content, but the human always has the eye, and it's he who sets the rules, and it's he who asks to revise if the answers don't suit him.

Okay, now we'll focus on the agent part and agents with tools, which is what's buzzing this year. And for that, we'll create a new workflow. We'll call it agent AI tool power. We'll give it a little bot, a little bot emoji. In fact, generally, the trigger for these workflows is a chat. So, we'll use the NN chat because NN has a default chat. Now, you don't have to use the NN chat, but you can use Telegram, WhatsApp, and so on and so forth. So, any app can be used. So, here, I'll use the NN chat. And when I want to test it, I'll click on Open Chat. It will open a chat window. Here, I'll be able to chat with the bot, the agent, sorry. I'll click on the plus, I'll go to AI and I'll click on AI agent. And so, what is an AI agent? It's nothing more than an LLM. So, I'll chat with an LLM, but I'll add tools and memory to it. Tools, so that it can act if it needs to act, and memory, so that it can keep in memory the information I've already exchanged with it. And that's what has transformed our relationship with ChatGPT, Claude, and so on. That is to say, until we had this functionality and this access to memory and tools, LLMs were simply interfaces that produced content, and that's where it stopped. They didn't go any further than that. With AI agents, they now have tools. So, they can take actions, but above all, they can take actions autonomously. It's no longer a workflow concept where we define step by step what will happen. It's the agent who will think and decide on its own if it needs to call this or that tool. And that's what has changed the game for agents and what's buzzing. So, how does the AI agent present itself? It presents itself with three little, three little lines at the bottom. The first one, well, it will be the model. So, we'll give it a ChatGPT 4.1 mini, I think. We'll start with that. Perfect. We'll give it a model. We can give it memory. What is memory? It's in fact, if we're chatting with it, we can tell it to keep in memory all the chats we've had together. Something we couldn't do, we couldn't do until now with calls to pay or to ChatGPT. So, remember earlier we were doing a basic LLM. So, I was making a pay call, but I sent my message with my prompt once, I received a response, and the discussion stopped there. We didn't have any back and forth. Now, since we can keep memory, we can have multiple back and forth and have a whole discussion like that with AI. So, there are several types of memory. We'll take the simplest one here, it's NN memory. So, it will be stored more or less in NN. If you want something in production and memory that lasts over time, you can use a PostgreSQL database, and for that, you can potentially use Supabase to store this memory. Speaking of memory, there are two types of memory. So, there's the memory that will be used in the chat. So, here, we've taken the NN memory connect trigger node, and I'll let it, I'll tell it to keep the last five messages, for example. And so, it will keep the last five messages in memory, and it will use them to chat with the person if it needs to remember something. Then, the tools. So, the tools, what can I put in it? I can put all the tools, in fact, here they've put quite a few tools, and they're adding new tools every month. Now, what are the tools we can add? First, we can add simple tools, like Airtable, Asana, and so on and so forth. So, do I have Tavili in there? We did a Tavili test earlier. I don't think Tavili is there. No, Tavili isn't there. But I can do an HTTP request. So, I can do an HTTP request. I'll go and do, but so, we'll do a web search. I'll go back to my Tavili. I'll take my search. So, search. I'll copy my shell here. Copy. I'll go back to my agent and I'll do import. And I'll import. So, there, it imported the Tavili data. And so, there, instead of http, I'll rename Tavili. And there, query. So, there's my access key, and here there's a query. So, the query is, what do I want to search for? And to search, well, I'll tell it, let the AI agent tell you what search you need to do. And for that, I'll click on this little button with the stars. In fact, it says automatically defined by the model. So, in fact, it's the AI agent that will define what query it will launch. So, in fact, I've given it an internet search tool that it can call whenever it needs to. So, here, we've connected a model, we've connected memory, and we've connected an internet search. And we'll start a chat. So, I'll say hello. So, it will call. You see, it made a call. So, we can look here at the logs, we can see what it did. It looked at the memory, it found nothing, it's empty, of course, for now. Then, it called ChatGPT, it sent it my message. So, it said, the human, it said hello. ChatGPT, it replied hello. How can I help you today? It went back to check the memory, stored it in memory, and it replied to me. So, it replied to me here: "Hello, how can I help you today?" Well, we'll tell it, can you, check, can you give me, check if the JSON still exists? Silly question. Okay. What did it do? It went into memory. It didn't go on the internet, and it told me to check if a file still exists because my question is a bit strange, after all. I'll ask it another question. Can you check if the inventor of JSON is still alive? You see, I asked it a question. Can you check if the inventor of Gizon is still alive? So, it went to ask the LLM, it went to check the memory, and this time it went to search the internet on its own. So, what did it reply? First, it found the name, it's Douglas Crockford. The inventor of Gon is still alive according to available information. If you want more details about him, I can provide them. I'll tell it, I'd like that. And again, it will ask the LLM. It went back to search the internet, it retrieved the information from the internet, it asked the LLM again, it gave it the information it found on the internet to structure it, and it replied to me. So, Douglas Crockford is an American programming expert and JavaScript specialist. He is known as the inventor of Gizon, and has written books on JavaScript, and so on and so forth. So, you see, with this rather simple example, we were able to have an agent that went, that decided on its own that it needed this or that tool. So, we only gave it one tool, which is internet search, but it decided on its own that it needed a tool to get information. It went to get it on its own. So, this summarizes very well what an AI agent is. It's an LLM that has access to tools and memory. So, since it has access to my memory, let's go a bit further. What else can we add? Let's look at the tool side here, what we can do. So, in fact, there are different types of tools here. Let's look at them one by one. So, what do we have here? We have the call N10 workflow tool. So, in fact, from an AI agent, it can call an N8N workflow, which will execute things. So, we can very well create a workflow in NN and call it as if it were a tool of an AI agent. So, you see the number, the complexity we can go into. So, we can have an agent that calls workflows, which themselves might contain other agents, and so we can have agents of agents of agents calling each other and communicating with each other in cascade. A code tool. So, I can literally write code in JavaScript or Python, and the AI agent can call it directly. I can do an HTTP request, I just did that. I can call a contextual protocol model, an MCP. An MCP is a concept I'll explain to you just after. I'll explain the concept to you, but for now, it's something that's under development, that's not fully in place. We won't go into full detail, but just to understand the concept. I'll explain it to you right after. Then, there are vector stores. So, what are vector stores? In fact, the LLM has a limit, we can't pass it an infinite amount of data. So, we have to pass it a finite amount of data. So, a few months ago, it was very limited. Now, we can pass a significant amount of data, but it remains limited. We can't pass it the entire François Mitterrand library with all the books in it, for example. So, for that, we use what are called vector stores. So, what is a vector store? A storage base called RAG that will contain a lot of information that will be used as a tool for the AI agent, and it will call this base when it needs information, it will go and ask the vector store on its own, and the vector store will return the information that is relevant to it at that moment. Now, I used RAG in another video. It was the video where I was reviewing the, well, I was setting up a system to manage an Airbnb agency, and specifically, I had created a RAG on Supabase, a vector store on Supabase where we stored all the company's information. So, the company entered its information in the form of Google Docs. There was an N8N workflow that automatically took that information and stored it in the SP vector store. And then the AI agent had access to this vector store and could use the information from this vector store in its calls. I invite you to watch that video if you want to go further into the RAG and vector store part. Really, I detail the thing to you completely. That is to say, I give you the workflow to use a RAG, and I give you the complete workflow where you'll be able to update and enrich your RAG with Google Docs in this case, but it can be any information, it can be any document, and above all, I give you the method to update the RAG information. So, suppose there's a rule that applied today that tomorrow no longer applies, well, you'll have to delete the old information and inject it into the RAG. I cover all of that in this video. Go ahead, I invite you to watch it. You'll understand RAGs completely from start to finish. You'll be able to use them in your business or for your clients. So, that's RAG. It's a knowledge base that an AI agent can use to retrieve information because, of course, an LLM has a limit on the amount of data it can process at once. And so, we pass it small pieces that will interest it at the moment we ask it the question, on the particular question we're asking it, and we ask it to give us feedback. Then, right after the vector stores, there are all the tools that are integrated by default in N8N. And so, what do we have? We have Airtable, for example, we have Asana, we have AWS tools, so everything that is, well, Amazon AWS. We have tools like Brevo, what else? We have ConvertKit, in short, we have quite a few tools. And Nen keeps adding them. So, there are almost every week. Every time you update your version of Len, you'll find new tools. You have Gmail, of course, you can send emails, you have your calendar, so you can have your agent add appointments to your calendar. And so, like that, you can add quite a few tools to your AI agent, and you can give it possibilities like that to interact or respond to a very specific request with these tools and perform actions directly with the tools it has connected to it. The problem with these agents is when we start adding lots of tools to them, their hallucination level increases. In fact, according to the creators of LLMs themselves, when we start exceeding 10, 15, 20 tools connected to AI agents, they can't handle it anymore. In fact, there's a known limit today in LLMs. They can't have multiple tools or more, say, more than 10 tools connected directly in this way to the LLM. They'll start hallucinating, they'll start doing anything, there will inevitably be a significant error rate. And in a production environment, in a business environment, when the error rate is high, it's difficult to deploy and implement a tool or an automation that brings a lot of errors into the company. A company needs to run normally without errors. When there are errors, they must be very few, and the error rate must be low because the losses it can generate can be very significant. And so, there's a limit on the number of tools. Claude, well, Anthropic, the creator, the company that created Claude, proposed a new standard for communicating with AI agents, and they called it MCP. Hence the node that is at the top here, MCP. It's a standard they created, proposed in November or October of last year. I think it was in November of last year. But the concept started to emerge much more a few weeks ago, perhaps in March or April, when we started hearing about it. Why? Because it started to be implemented, and OpenAI also followed suit with Claude, with Anthropic, and they said they also adhere to this protocol. In fact, this protocol is of the same importance as the API launch or the protocol defined for REST APIs. A few years ago, there was a consortium that defined the communication format between APIs, and notably, it was REST APIs. And this is a format that was defined, and from the moment it was put in place, many companies, all the companies you know today, all the well-known SaaS software, exploded with this standard, with the implementation of REST API. You should know that before Google Gmail implemented REST API, to see if you received new emails, you had to refresh the page. You had to click refresh, and the whole page would refresh. Since REST APIs have existed, new emails in Gmail appear without you having to refresh the page. And it was a turning point on the internet and a turning point for software. Suddenly, we no longer needed to have software installed on our laptop, on our PC, for live refreshing, for data to be fluid, and so on. Since REST API appeared, suddenly, software installed on computers became old, and we could have production software, software used in businesses, that was directly in your browser. There was no longer really a need to have software installed on a computer for it to work. But this took time to implement. APIs took time to develop, for everyone to adopt them, and so on. MCPs are the same thing. MCPs are the model that Anthropic proposed for communication between agents and tools. And they just proposed it a few months ago. So, for this communication model between agents and tools to be implemented everywhere, it will take time for everyone to adopt it, for all companies to implement them. But in short, what does it mean? Here, I created a tool to connect to Tavili. If I want to add, for example, a tool to connect to Google Calendar, it's there, Google Calendar. So, Google Calendar, there are several actions in Google Calendar. There's creating an event in my calendar, deleting an event in my calendar, retrieving an event in my calendar, retrieving multiple events, there's an event, and then other calls that are not available by default. But already, that's 1, 2, 3, 4, 5 different operations. If I want to give my AI agent access to these five operations, I have to create five tools for each operation. I have to create a first tool and give it the credentials, and I create a first tool of the creation type, a second tool of the deletion type, a third tool of the event retrieval type, and a fourth tool of the event update type. So, I would need to create as many tools as there are operations. If I wanted to give my AI agent access to all the operations available in Google Calendar. With MCPs, that has changed everything. With MCPs, you will give your AI agent access to an MCP, and so it's the MCP that will make the link between you and Google Calendar. It will contain all the Google Calendar operations. And so, the AI agent can chat with the MCP, it will chat with a single MCP, and the MCP will be the Google Calendar MCP. There will be an MCP for Gmail, there will be an MCP for, and so on and so forth. And so, instead of having five or six tools for Google Calendar, it will have a single Google Calendar tool that will contain all the operations available for Google Calendar. And in fact, it's a way to standardize communication between AI agents and tools, but it's also a way to reduce the number of tools we connect to our AI agent. And necessarily, it will make AI agents more robust. They will hallucinate less because they have fewer tools, they have to communicate with fewer entry points, and therefore they will be much more efficient, and there will be less information loss over time. But this is still in development mode. That is to say, today, even the node that exists in the cloud version of N8N, the node here, MCP, allows connection to a very small part of the MCP nodes. So, we can't yet connect to a large part of MCPs. So, there's a Community node that allows connection to quite a few MCPs. And to get the community node, you'll need to do a local installation. But otherwise, the node that exists today, which was launched a few weeks ago and is called MCP client in NN, doesn't yet have access to all the tools. It has access to very few tools for now. So, you see, it's a world that is being put in place. All of this, the world of MCP, will improve things, of course, it will make agents much more efficient, but as of today, it's still in development and implementation mode. It will probably take some time, maybe another 6 months or so, for it to be generalized, for it to be in place everywhere. Of course, I could be wrong, it could be much faster. What we've seen with LLMs and AIs, it's going super fast. So, it could be much faster than that. Here's a quick overview of what we can do with AI agents. If you want to go further, as I told you about the RAG part, I recommended a video on the agent part. I've made quite a few videos on my YouTube channel where I've actually made an AI agent that will generate YouTube video ideas for you. And it can be a good exercise that you can watch and apply to understand how AI agents work with tools, how we call tools, how we add tools to AI agents, and so on and so forth. And there you have it, you now have all the information to create automations and AI agents in Nen. If you want to go further with this and offer your clients not only N8N automation and AI agents, but also attractive interfaces, I've implemented a complete system for my sports coach under NN with an interface made with Lovall. It was great and the result was excellent. I invite you to watch the video. I'll put the link right here. And then, don't hesitate to like, comment on this video, and share it. That's what helps me continue to make videos that help you improve. And I'll see you next time.