📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

My 18 Most Useful n8n Tips After 100+ Workflows

Ed Hill | AI Automation13:02

Transcription

After building over 100 and at end workflows, I found 18 tricks that make your AI automation run faster, cost less, and feel a effortless to manage.

Tip number one is using open router. It's a service that gives you with one API key access to all available LLM models. They support over 60 providers and over 500 models. This enables you to test many models quickly. And the best part is the price is usually better or same as from the native provider. Plus, it's directly integrated in NN, so you can easily select it from the menu here on the right, open router. And this gives you access to all available models directly here in NN. And it's also perfect to track the usage because for each API call, you see which model you use, how many tokens were used, and how much it costs you, and even the speed. It's much better than OpenAI where you only have an overview how much you spend for a day. Besides that, it also offers you free models that you don't get otherwise, and you don't even have to self-host them yourself. and it's future proof for your stack as new models drop. I highly recommend to check this one out.

Tip number two is to pin data and edit this pin data. Imagine you have workflow like this one and you click here execute workflow. What usually happens is a form element pops up and you fill out the form and then you click submit. Now the rest of the workflow is executed. If you would now close this workflow or reload the page and now you click again execute workflow then again this form pops up. Then you have again to fill out this form and click again submit. And now again the whole workflow is executed. What could be a little annoying to solve this issue? You can click here pin data and click save. If you now reload this workflow then you see here a little pin icon. When we now double click on this note then you see that the inputs that we gave are still saved here. If I click now execute workflow this note is skipped and it continues here. The same you can do with each note here. For example, if I click here now pin node, click here save and then reload this whole workflow and then click again execute workflow. This both nodes are skipped before it continues. This comes especially handy when you're testing expensive API calls like the view for example. Then instead of rerunning them all the time when you're testing a certain workflow, you can simply pin the data. This way the input and the output of this node is saved and used statically in the next execution. What also nice is when you click here save and download this workflow you then click create workflow and import now again the same workflow then you see the data is still pinned. What makes sharing workflows especially handy and when you double click on a pinned node and click here on this edit icon then you can even edit this input. For example, let's change the description to man sitting in a super car and click here save. This way this input gets changed. But be careful since this note is also pinned. This input isn't used. So if you want to use this new input, you have to unpin first this note and rerun it.

Tip number three, name your notes. For example, when you click on this note here, you can click here and give it any name. This way, it's much easier to reference any note. For example, in this note, I can quickly find the telegram trigger and know where to find the chat ID and reference it here. Additionally, NN is using this note name to reference it in this variable. Besides that, it makes it much easier to hand off to other teammates or community members. It also enables you to quickly understand what's going on. For example, without naming this note create video, I would not know what's happening here without opening. So, I highly recommend to name your notes.

Tip number four, load execution data from history. Let's say we have a simple workflow like this one. When I test this workflow, I can type in here my name and my email and click submit. Then my email gets verified and I get redirected if the email is wailed or I see an error message if it's not wailed. Once I'm satisfied with this workflow, I click here activate. Now when I click on this note and click production URL, anybody with this URL can open this page. When I type here now on the name test 123 and email and click submit, I get an error. But when we go back here to this workflow, I have no chance to see what's going on. But I can click here now on executions and see exactly what happened. When I double click here, I see here the inputs I just made. But let's say I want now to adjust this workflow based on this inputs. For that, I can click here, copy to editor. And now I got exactly this inputs. When I double click now here, you see here this inputs pinned. And you could simply click here execute workflow and test it out.

Tip number five, speed up executions with sub workflows. For this, let's take this example here. When I click here, execute workflow in this Google Sheets, the numbers 1 to 500 are inserted. But like you can see, it's really slow because each time a request is sent to Google Sheets, we have to wait for the answer. If it's unnecessary to wait for the answer, like in this case, we can do a simple trick. First, let's stop this workflow and do the right click here and select convert note to sub workflow. Then click here, confirm. Then double click on this workflow. Then click add option and deactivate wait for sub workflow completion. Then go back to canvas. Click save. I clean this up real quick and click again execute workflow. And like you can see it's much much faster because it does not wait for the executions to finish.

Tip number six using telegram. Hello, how are you doing? And like you can see it directly works. The main reason to use telegram is because it's super easy to set up. We just type in here slash and then select new bot. Give it a name like hello world 1 2 3 bot and then I already receive this API key that I can simply copy and add here under create new credentials and click save. Then I can close this window and go back to canvas. When I click here now execute workflow and open this chat here and click start it directly works.

Tip number seven, human in the loop. If you have a multi-step workflow like this one, where an image is first generated and then based on this image, a video is generated, you usually want first to approve the image before you generate the video. For that, you can click here the plus icon and select here human in the loop. Here you can select multiple services like Slack, Telegram, WhatsApp or even email. Then you simply fill out this. And now when an image is generated, you have to first approve it through email before the e video is generated.

Tip number eight, select the tidy up. You probably know this tidy up feature. When you click on it, the workflow gets tidied up. But for long workflows, it will just get long. But what you can do instead is select a few notes like this one and then only tidy up this notes.

Tip number nine, data search for input and output. Let's take for example this note for voice AI agent. For this note, we receive a lot of output. But let's say I'm looking for something specific like the description. For that, I can click the search icon and type in description. And now I will see all variables with description inside. By the way, the same also works for input. This way, it's much easier to find fields in a JSON.

Tip number 10, import curl. In NN, you often use the HTTP request note. This note has a nice feature called import curl. When you click on it, you can paste here in curl command that will fill out the whole HTTP node. Let me show you an example. When we for example open in Kai API the v3 service, we can click here on API and here on the right side we find something called curl. When we copy this and paste it back in our curl command and click import, this whole HTTP request note gets filled out and we can simply adjust it to our needs and we only need to replace the token here and then it will directly work for us. This way it's much easier to set up an HTTP request note and usually most API providers provide an curl command.

Tip number 11 simplify data with addit fields note. Let's go back to our example where we received a lot of input data here. When we want to use this input data for example in the next note here we have to find the right variable what could be a little complicated and it's really messy here. What we can do instead is we go back to canvas and add a note in between. Click the plus icon here and type in edit and select edit fields. Then you click here to add a field and type in for example chat ID. And now you look here around and look for the chat ID. Once you find the chat ID, you simply drag and drop it here. And then you click execute step. When you go now to the next node, you have here the option to select any variables from the edit fields. This way you can easily strip away the noisy payloads to the essentials.

Tip number 12, open a sub workflow. When you have an automation with sub workflows like here for example, then you usually need to double click on it and then you click here to open up the sub workflow. But what you can do instead is you click the command button and double click on the subflow and then it opens up in a new tab. By the way, this is the command key here on the keyboard.

Tip number five, use the switch node instead of the if note even for cases where the if note makes more sense. Let me show you an example. This here is exactly the same workflow. But here I use a switch node and here you see if note like you can see in the switch node you can easily name the outputs. You can also easily change them by clicking here and changing them here the output names. Then you also can easily add more routes for example by clicking here add route. This alone makes the switch note much more readable compared to the if not node. Besides that the switch node can do everything what the if node can also do and it can also handle much more complex logic like for example when you have an error. If you want to achieve the same with the if not node, you need a nested logic. So it's much easier to extend the switch node. So in my opinion, it makes no sense to use the if not node at all.

Tip number 14, setting up a settings note with edit fields. So for example, this note account ID. I save the API key, the Instagram ID, YouTube ID, Tik Tok ID, and so on. So that I don't have to fill it out here. This way once I set up this note here, the whole workflow is set up. It gives you a centralized settings node where you can set up the limits, ids and formats. Once you update it here, it gets updated in the whole workflow and it even enables you to do AB testing by flicking the values.

Tip number 15, using the authentification management. So in a workflow like this one in the HTTP nodes, I usually provide the auification key over the headers parameters. But this way when you download your workflow and share it with anybody, they also have access to your API key. To avoid this you can also use the autheification management that you can find in each node. For that you copy the value here and select here generic credential type here. You simply select barrier of like you can see here and provide any API key for example this one here and I'd call it kai API and click save. This way I can remove the API key here and continue using this node. And I even can provide to the next node the same credentials by clicking here generate credential type and selecting here BA of and selecting then Kai API key. Then I can remove here the API keys in the header. This is also pretty handy when you change the API key. For example, if I change the API key here, then it will change for all nodes that use the same authentification key. This makes your workflow much safer and easier to use.

Tip number 16, always limit API spend limit. For example, in open router, when you create an API key, you can give it a name, but you also can give it optionally a credit limit. That means after this API key consumed the credits, it won't work any longer. For example, when I put here in 10, then after $10 are spent, this won't work anymore. This will protect you against runway loop and it also gives you the freedom to experiment without any fear. And when you use it for clients, then you have a predictable budget. And almost all providers give you this option. For example, in Kai API, when I click here, save spend limits, I can give it an hourly credit limit and a daily credit limit.

Tip number 17, you can use AI automation for more than just LLMs. In add you can use it also to analyze audio, transcribe a recording, analyze a document, analyze an image, or even analyze a whole video. That way you can process more than just text. This way you can build much richer products than just with chat.

Tip number 18, use rack. Using rack enables you to feed your LLMs with fresh private data. This way it can also site sources so you can trust information and be compliant. It's also super easy to set up by drag and dropping your PDF files. This way you can lower the hallucination and give the LLM access to private data. And if you're serious about learning AI and AI automation, I highly recommend you to join my community where we take you from an absolute beginner to a pro. Here we show you different use cases like an AI voice agent or how to create an UGC machine that creates UGC content on autopilot or a clipping automations that makes any long form video into shorts and many more. I hope you like this video and see you in the next.