Loading video player...
So only about 1% of NADN users know how
to use this code tool inside NADN. And
it's kind of a shame because it's like a
cheat code inside NAN that unlocks the
door to building literally anything else
that you want that previously would not
be possible inside NADN using any of
these tools over here. Now, we're going
to be breaking this down so that even if
you do not know a single line of code,
you're still going to be able to master
this in this video. Let's break down why
this matters. Then we're going to give a
couple case studies on how you can go
about using this code node in your
day-to-day life. And then we're going to
be talking about how at the end of the
video, you can deploy this in a matter
of just a couple minutes and start
building out infinitely complex
scenarios very quickly and very easily.
Now, with the code tool over here, it
effectively replaces everything on the
right side here. So, before you have all
these tools and then afterwards, you
just have this code note. Now, I'm not
saying that you should go ahead and give
up all of these different tools because
personally, I would use them before the
code node. But the thing is is that all
of these tools, they're great until they
just don't work or they don't provide
you with the functionality that you're
looking for. And trust me when I say
pretty much all of these tools will have
their limitations that you cannot
bypass. And when you encounter that
point, it's going to be really nice to
know how to use the code tool because
this is going to bypass any limitations
you're experiencing with NAND. So what
you can do with flow over here or data
transformation you can pretty much
always do with the code tool as well
because these are just JavaScript
functions or coding functions at the end
of the day which you could build it out
by yourself. And again you do not need
to know a single line of code. Let's go
into a couple other reasons why this
matters. First of all these code notes
they're very consistent. They almost
always work and they never really break.
There's no cost to them. They again work
every single time because they're very
consistent. They're faster. they can
process more data and all of that kind
of good stuff. Now, let's get into a
couple examples here. Keep in mind, I
can only go over a couple because
there's literally an infinite amount of
possibilities. Let's say you have emails
coming in with PDF files and maybe you
want to extract these documents and you
want to upload them into a Google Drive
folder or maybe you want to upload this
into QuickBooks or something like that.
Without a code tool, I literally do not
know how you'd be able to do this by
extracting multiple different documents
simultaneously at the same time because
I've tried to do it with two or more PDF
files and it just doesn't work inside
NDN. But with the code tool, what you
can do is automatically extract all of
these documents and then automatically
do whatever you want with them like
upload them into Google Drive. Now, the
rest of the examples here are going to
be using this moxym where we have
clients coming into this particular
spreadsheet. So, I'm going to go ahead
and fire this off and give a couple more
examples here. The first thing that we
can do with this spreadsheet is we can
sort all of these leads. And we can do
that based on something like the price
uh that they have to uh spend on our
services. Now, before you'd use this
sort node here, but it's very basic. And
if you want to get any additional
functionality, you're going to have to
go to coding. And so, what I've done
here is I've gone ahead and built out a
code step that sorts it based on the
price. And we can sort this based on
price high to low or low to high. But in
this instance here, let's just go
through. We have $300, $ 350, $450. So
we're sorting it ascending from the
lowest to the highest price. Another use
case is to cluster or group information
together. So let's say we have all of
these stages here and we want to get
some meaningful analytics on every
single stage. Like for example, what's
the total amount of money at every
single stage or what's the median amount
of money or what's the average amount of
money? Well, using this code tool, what
we can do is we can pull out all of this
data from this Google spreadsheet and
then we can run a formula on it to see
every single stage like contract sent,
leads, paid and uh sales call and all
that kind of stuff. And then we can see
the total amount at that stage. We can
see the average price, we can see the
median price and we can also see the
count. So we can get um math functions
on this. We can also group data
together. Now the next thing that we can
do is restructure JSON data. So if we
look at this code tool here, we'll see
that the data is coming in. It's pretty
smooth. We just have information per row
here. B A B CDE E and so on and so
forth. Now the problem is is that if
we're sending data to an external
third-party app, maybe that data needs
to be formatted a particular way. So
instead of it just being flat where we
have like for instance first name, last
name email phone price stage
country, all that kind of stuff, maybe
what we need is the lead information
here to be grouped in an object. An
object, you can think about it like an
assortment of random information like a
Google Drive folder where we have things
like stage and country and price and
it's grouped together inside this object
here. Now what we can do with a code
tool is we can reformat this JSON data
to structure it properly so that we do
group things like the stage, country,
and price together in that lead object
over there. And so this is a huge game
changer because if you're to do this
previously, you need to use an editing
tool node here. And if you've ever done
this before, [laughter] you know it's an
absolute nightmare. There's nothing that
I hate doing more than uh well, I can
think of a couple things I hate doing
more, but that's one of the least
enjoyable things. It's like pulling
teeth inside n to get this formatted
properly. You just want to like smash
your computer and and break it and then
regret every single decision you've ever
made in your life. Next thing we can do
is use create universal IDs. So let's
say you want to create an invoice, you
want to turn ID, you can go ahead and do
that very easily using the code note
down here. And you can also go ahead and
clean up text. So let's say you have a
YouTube transcript here with all the
timestamps. Maybe you don't want those
timestamps, you just want clean text. we
can run it through this code block here
and then we can pull out all of the text
very cleanly. Now, this is really,
really beneficial because if you were to
use an AI agent to do this, it would be
way more expensive, be way less
reliable. And the problem is is that
half the time it wouldn't work because
you're just trying to send too much data
and the context window wouldn't be large
enough to grab all of that information
that you're sending. Now, last thing
that I want to cover here is advanced
filtering. Now inside NAD you have these
simple filters where you can have
multiple variables separated by an and
or an or. But you can't have nested
filters or very dynamic filters going
on. So let me give you an example of a
nested or dynamic filter. Going to go
back to my blackboard here where you
could be like price needs to be over
$1,000. That can be one condition. You
can do that on a simple filter. But then
you could do or and now you have a
second condition. So we're saying it
either has to be A or it has to be B.
But here's the real magic because now
you can have d like more nested filters
over here. And so you could have ands in
the middle. So all of a sudden you could
be like maybe the country needs to equal
and I apologize for my writing. I don't
think I ever graduated like elementary
school with my writing. So [laughter]
apologize for that. But country needs to
be USA and [music]
the um the stage has to be lead and I'm
just giving like arbitrary things here
right the stage has to be lead but the
important thing is is that we have
different um nest we have a nested
filter this is a this is B and inside B
we have two conditions that need to be
met because we have this and in here so
we can have and statements and we can
also have or statements all nested from
within in one code node over here which
is not possible with the simple filter
they have available to you have
available to you inside an aden now
let's talk about how you can actually go
about building this out cuz we've talked
a lot about this but let's put this into
practice now so I have another workflow
here which is referencing the same data
in the past and we're just going to do
one simple example where we're going to
sort the data based on the price over
here and once you know how to do it one
time you're going to be able to I know
how to do this like an infinite amount
of times and apply it to whatever
situation you want. Once you see it,
it's very very simple. Cool. So, how
we're going to do this is we're going to
hit the plus button here. We're going to
enter in code. Okay. We're going to
choose JavaScript because JavaScript and
Python, they're two different languages
in coding, but JavaScript is kind of
like the the backbone of the internet
and it's what N8 is built off of. So,
all we have to do is select JavaScript
here. Now, the only thing that you have
to do with all this code is just
highlight it all and hit that massive
delete button. And then actually I
didn't hit that properly, but you need
to clear everything and then you're
good. Sweet. That is it. Like that's
that's the extent of everything you need
to know about this code in here pretty
much. Cool. Next, what we're going to do
is we're going to head over to chatbt
and we're going to type in natural
language the code that we want. So for
instance, I'm going to say please create
me code for an NADEN code uh node where
we sort data
uh based on the price from low to high.
Okay. And so that's all we need to do.
I'm going to hit a colon here and then a
space. And the last thing we need to do
is we just need to provide the data
structure that it's working with. So all
we're doing is just typing in natural
language what it is that we're looking
for. There's no code left and we just
need to grab all of this data. So inside
the code block, this is the data we're
referencing. Okay? If for instance in
your example, maybe you're referencing
other data, but whatever data you're
referencing, you just need to go to that
and then hit this copy button right
here. Copy section. Okay? And then we're
going to paste it in there. And that
conveniently didn't work. So I'm going
to try this one more time. And I think
there's like a unfortunately Well, that
was really underdramatic. Uh I think
there's a bug [laughter] inside Nad. We
just got to go back to the previous node
here. And then we'll go over to JSON and
uh we'll copy this. Oh my god, I'm I'm
mortified if this doesn't work. Okay,
we're good to go. This uh this copied in
all the code. And now we can click
enter. So all we're doing is just going
to the previous node or whatever node we
are collecting that information on and
we're just going to literally copy that
in. And then Naden is going to go to
work for us and it's going to go ahead
and create that code. Now all we have to
do is just go ahead and click that copy
code and come into the code node here.
And then we got to delete it one more
time and then paste it in. That's it.
Hopefully this works out of the box.
Let's execute the step and find out.
Cool. So we have the price here. It
looks like it's starting at 300, then it
goes to 350, then it's going to go up to
650. Oops, I skipped one. 450, 650, 700.
Awesome. So, it is officially working.
But let's take it a step further and say
that you're not happy with the output.
Maybe you want it to change because not
all the time it's going to be perfect,
right? And so, we're going to have to
account for errors and we're going to
have to account for changes and all that
kind of stuff. And all we need to do is
go back to chatbt and tell it how we
want things to change. So I could say
actually I want you to sort it from high
to low please. And then it will go ahead
and change this the the code depending
on what it is that you want. So we'll go
ahead and copy this in, paste it one
more time and execute it. And this time
it should go from high to low. Let's
take a look. 9,000 [music]
6,000 5,000
4,200
and so on and so forth. And so let's
just say for instance this just draws an
error. I'm just going to put an extra
dot here and we're going to execute the
code and it's going to draw an error
here. Okay. So what we can do in this
case is I'm just going to click other
info here and I'm literally just going
to highlight everything here and I'm
going to say
I got this error.
Can you please help me fix it? And I'm
going to paste in the code here. And I'm
also going to paste in uh the working
code here. So I'm going to say working
code or whatever. And then I'm going to
say error down here and reference that
huge error that we got. Then it will go
ahead and fix that code for us in case
we ever encounter something like this.
And you'll see that it literally spotted
it right away. And then we'll go ahead
and we'll just copy the new code in here
and then paste it back in. And it should
work out of the box. And so anytime
you're dealing with this code, maybe on
the first try it doesn't work, maybe
there's an error and you just got to go
back to Chad GBT and ask it how to fix
it. Or maybe you know you thought you
wanted it a certain way. Turns out once
you saw the results you want to change
it, you can always go back and work in
natural language with the chat GPT to
make sure that you get the results that
you're looking for. It's just a back and
forth process. Now that you know how to
do this one time, you can literally
apply this to whatever type of scenario
you're working with. And hopefully this
can unlock that cheat code for you where
you can just build the most complicated
workflows imaginable without even
knowing a single line of code. And um
anytime you run into limitations with
any of these existing codes over here,
which happens, you know, um quite often,
you can be able to bypass that by using
chat GBT in this code node over here.
Really appreciate your time. If you did
like this video and you found value in
it, please make sure to hit that
subscribe button down below and also
take a look at my school community where
there are three transformations that I
want to give members here. First of all
is to teach you these skills in depth so
you can apply it to your life to save
time and earn money. The second
transformation is for those of you who
are looking to create an automation
agency. I give you the exact blue uh
road map and blueprints to be able to
find, close, and fulfill deals within 30
days or less. And there's countless
people in this community that are
already achieving that. Let me just open
up a couple testimonials over here so
you can take a look for yourself. Uh
Mark got it in a couple weeks. Addy
closed a $10,000 deal very shortly after
joining the community. Joseph is now at
10K. Sophie hit her first $,000. Uh
Drawer hit his first sale. Winnie Lee
hit her first sale. Luca has been
crashing at like 10 plus sales. Julian
hit $30,000. And so there's a ton of
people that are succeeding using this
predefined roadmap. And then third group
of people are those of you looking to
essentially automate your existing
business. I give you the exact
blueprints that allowed me to scale to
seven figures, automate 80% of my
business. And all you have to do is
copy, paste, and deploy it into your
business. And then you should be good to
go. And ideally, you can automate up to
80% of it in less than two months. Thank
you guys so much for watching. Hope you
found value in this. And I'll see you
guys in the next video. Bye-bye.
🌍 COMMUNITY https://www.skool.com/automatable/about 📝 FREE BLUEPRINTS https://jonocatliff.gumroad.com/l/gvvqrp 📚 SUMMARY In this video, you’ll learn why the n8n Code Node is one of the most powerful tools for custom automations, see real case studies in action, and discover how to deploy it fast in your own workflows. 📣 SOCIAL MEDIA • Instagram → https://instagram.com/jono_catliff • TikTok → https://www.tiktok.com/@jonocatliff • LinkedIn → https://www.linkedin.com/in/jonocatliff/ • X → https://twitter.com/@jonocatliff 📺 RELATED VIDEOS • Full crash course on Make.com → https://youtu.be/hinLebdX8aM • Full crash course on n8n →https://youtu.be/AURnISajubk • 11 Favourite Make.com automations → https://youtu.be/dIH1F1WlE84 • 12 Favourite n8n automations → https://youtu.be/uQGT2K26W84 🎯 1:1 CONSULTING Book a time → https://jonocatliff.com/consultation 🚀 AUTOMATION AGENCY Get help with your business → https://www.automatable.co 🔗 LINKS (some of these make me money - thanks in advance!) • n8n → https://jonocatliff.com/n8n • Make.com → https://jonocatliff.com/make • Go High Level → https://jonocatliff.com/gohighlevel • Apify → https://jonocatliff.com/apify • Skool → https://jonocatliff.com/skool • Zapier → https://jonocatliff.com/zapier • PandaDoc → https://jonocatliff.com/pandadoc • Apollo → https://jonocatliff.com/apollo • ManyChat → https://jonocatliff.com/manychat • Vapi → https://jonocatliff.com/vapi • PhantomBuster → https://jonocatliff.com/phantombuster • ClickUp → https://jonocatliff.com/clickup • ElevenLabs → https://jonocatliff.com/elevenlabs • Upwork → https://jonocatliff.com/upwork • Instantly.ai → https://jonocatliff.com/instantly • Airtable → https://jonocatliff.com/airtable 👋 ABOUT ME Hey everyone, my name is Jono. I run a 7-figure service business that offers DJ, photo, video services (#1 largest in Canada), and spent years figuring out how to automate every part of it (and hired the roles that I couldn't). Conservatively, I used to work 80+ hours per week, before sunrise till long after sunset; missing gatherings, family events and everything in between. Through automation though, I was able to replace my job. My goal is to help share what worked for me, in a dream of helping others find true success with their passion. Please subscribe, like and comment below if you have any questions! Thank you 😊 ⌛ TIMESTAMPS 0:00 Intro 0:18 Overview 1:35 Why This Matters 1:52 Examples 7:47 In Practice 13:14 Conclusion