00:00:00
in this video I'm going to show you how
00:00:01
to build automations that can help you
00:00:02
save thousands of dollars on your
00:00:04
monthly make.com subscription I'm going
00:00:06
to show you an advanced way of using
00:00:08
fewer operations to process complex data
00:00:11
so instead of having to Loop through a
00:00:12
lot of data and burn through a bunch of
00:00:14
operations that might burn through
00:00:16
thousands of operations I'm going to
00:00:17
show you how to do that in just one or
00:00:18
two operations so make automations are
00:00:21
very powerful and I don't tend to obsess
00:00:23
too much about how many different
00:00:25
modules I add to my automation sometimes
00:00:28
we just need the module that we need and
00:00:30
the way make works is that each one of
00:00:32
these modules is going to cost you one
00:00:34
operation except in the case where you
00:00:36
are looping through data like we are in
00:00:39
this automation so you can see if this
00:00:41
automation is running every 15 minutes
00:00:44
and it's downloading 100 different posts
00:00:47
and then every time we come to this
00:00:49
iterator here we are going to Loop over
00:00:52
a 100 different post and then it's going
00:00:55
to Loop over two different modules you
00:00:57
can see here we're going to Loop 100
00:00:59
times across two modules which is going
00:01:01
to cost us 100 operations time two
00:01:05
modules which is 200 operations and then
00:01:09
you can imagine if we had other modules
00:01:11
here because we needed to process this
00:01:14
data even more than we are here which
00:01:16
just this one module then for every
00:01:17
module we had here it would increase the
00:01:20
number of operations that we had to
00:01:22
spend so in this automation here I'm
00:01:24
going to show you three different ways
00:01:26
of processing the same data this way
00:01:28
will cost us thousands of operations per
00:01:30
day and these other paths will only cost
00:01:33
us one or two operations each time we
00:01:35
run it instead of potentially thousands
00:01:38
and we're doing that by processing the
00:01:39
data in a different place here I'm
00:01:41
processing the data in make and in these
00:01:45
two examples I'm going to process the
00:01:47
same data using air table automations
00:01:49
and their scripting language instead of
00:01:52
make automations so again this
00:01:53
automation here is just a demonstration
00:01:56
we're making an API call here to a
00:01:58
popular Community platform where asking
00:02:00
for all the recent posts sometimes there
00:02:02
are 100 plus posts and then we've
00:02:04
designed three different ways of
00:02:07
processing that data so if we look at
00:02:08
what's happening in this module here
00:02:09
we're making an API call and then if I
00:02:11
expand the data here just into the guts
00:02:15
of the information we can see here that
00:02:17
we've got a bunch of different posts
00:02:19
that we need to iterate through and so
00:02:20
right now you can see that these two
00:02:21
paths here are disabled that's what
00:02:23
these little icons mean here and when I
00:02:26
run this automation it's only going to
00:02:27
go down this path just like that make
00:02:30
the API call it's going to process the
00:02:32
Json that they provided and then it's
00:02:33
going to iterate over the post it's
00:02:35
going to do some minor modifications to
00:02:37
the data and then it's going to insert
00:02:39
that data into air table so if I jump
00:02:41
over to air table here and I clear out
00:02:43
these other test records and then I run
00:02:46
this automation we're going to see that
00:02:47
it's going down this path and now it's
00:02:49
just running and it's iterating over all
00:02:51
those different posts and here's where
00:02:52
you can see where we're burning through
00:02:54
all of those automations now to save a
00:02:56
few operations in this example I am
00:02:58
filtering this operation so that it only
00:03:00
processes 30 rows instead of the entire
00:03:02
data set but if I were to remove this
00:03:04
then it would process even more
00:03:05
operations so now from here if we were
00:03:07
to come back to air table we would see
00:03:09
that it has now inserted 29 different
00:03:13
rows now if we wanted to explore an
00:03:15
alternate way of processing this data
00:03:18
then I could come here and I could
00:03:19
disable this route and I could come here
00:03:22
and enable this route and so now instead
00:03:24
of processing all this data and
00:03:26
inserting those rows directly into make
00:03:28
I'm inserting the data from our HTTP
00:03:32
call directly inside of air table and so
00:03:34
if I jump back to air table here you can
00:03:35
see that I have a table called tasks and
00:03:38
instead of trying to write the post
00:03:39
directly what we're doing is we're
00:03:40
writing the data directly into this
00:03:43
tasks table and we're going to process
00:03:45
the data here in air table because what
00:03:47
I have found is that make.com is really
00:03:49
good at processing API calls and
00:03:52
creating records but iterating over a
00:03:54
lot of data it's just not very efficient
00:03:56
so we're going to save that raw data
00:03:58
into air table into this tasks table so
00:04:01
let's come back to the automation now
00:04:03
and I'm going to go ahead and run this
00:04:05
automation this time it's going to make
00:04:06
that API call and instead it's going to
00:04:09
write that data directly into air table
00:04:11
so if I jump back to air table we now
00:04:14
have this new task here that is not been
00:04:16
processed and I'll go ahead and delete
00:04:17
these other examples and so now we have
00:04:19
that Json data right here of all the
00:04:22
posts coming from the API and now what
00:04:25
we can do is I'm going to jump over to
00:04:26
our air table automations where I've
00:04:28
built two different automations one of
00:04:30
these automations is going to help us
00:04:32
process the data in this condition and
00:04:33
this other automation is going to help
00:04:35
us process the data in another scenario
00:04:38
so again here jumping back to a table
00:04:40
What's Happening Here is that this is
00:04:42
going to trigger when the HTTP code is
00:04:45
200 and all that means is that when this
00:04:47
API call Ran we're going to see that the
00:04:49
status code was 200 we only want to run
00:04:51
this automation if it was successful and
00:04:53
that's what 200 means and we also want
00:04:55
to make sure that the Json column is not
00:04:57
empty and that this has not been
00:04:59
processed before under those conditions
00:05:02
then we can move forward and process the
00:05:05
data and so now what we've done is we've
00:05:07
basically taken what we've done right
00:05:10
here and we're processing that inside of
00:05:12
this script here so if I open up this
00:05:14
code we can see here there's a function
00:05:16
to capitalize the words and you might
00:05:18
wonder why we have that well if I jump
00:05:20
back to our make scenario and we look at
00:05:23
this module here which is after our
00:05:24
iterator if we open this up what this
00:05:26
process is doing is it's taking the post
00:05:29
name and it's capitalizing all of the
00:05:31
first letters of that post name so that
00:05:34
when we insert it into air table we can
00:05:36
see that the post names always have an
00:05:39
uppercase on the words so you can see
00:05:43
here we have this code here that will
00:05:44
capitalize the first word of the
00:05:46
sentence and then we also have code here
00:05:48
which is going to access the data it's
00:05:51
going to access this Json that is in
00:05:53
this Json column we have some example
00:05:55
code here that I can remove so we're
00:05:57
passing this script the record ID of of
00:06:00
this particular row here and then we're
00:06:02
also passing in that Json data from this
00:06:05
column here and so then what that code
00:06:07
does is it takes that Json and it parses
00:06:09
it into an object and then it Loops
00:06:11
through all of the posts in that object
00:06:14
and creates the rows into air table
00:06:16
directly so if we come back here and we
00:06:19
look for a new record to process we're
00:06:21
going to see that row six that's this
00:06:23
row here six so I'm going to go ahead
00:06:25
and select that then I'll go ahead and
00:06:27
run this script we'll go ahead and test
00:06:29
it if I jump back over here to air table
00:06:32
and go to the Post we should start to
00:06:34
see it insert the new rows there we see
00:06:36
the new rows getting inserted so this is
00:06:38
going to
00:06:39
insert all the way to 50 in this case
00:06:43
the data that we have coming in has 50
00:06:46
different rows that's coming from the
00:06:47
API right here and so again you can see
00:06:49
in make all we do is the API call and
00:06:52
write the data directly to airable the
00:06:54
data comes into air table as a task with
00:06:56
the data unparsed right here that ends
00:06:59
up triggering this automation which will
00:07:01
then run this entire script this script
00:07:04
here will Loop through the data emulate
00:07:06
What's Happening Here a capitalizes the
00:07:08
words and then inserts it into air table
00:07:10
except we don't need to pay for all
00:07:11
those make operations and this is a good
00:07:13
time to talk a little bit about how make
00:07:15
and air table are a little bit different
00:07:17
in terms of how they manage their
00:07:19
operations make.com charges you for
00:07:23
every operation that is run in your
00:07:26
scenario so if you have all of these
00:07:28
different operations and then again if
00:07:30
you've got a loop here where it's going
00:07:32
to Loop through a bunch of different
00:07:33
posts let's talk about the 100 posts
00:07:35
here and then we have a few modules here
00:07:38
it's going to charge you 1 2 3 4 five
00:07:41
and then however many times we Loop so
00:07:43
if there's 100
00:07:45
here times 1 2 3 4 so we've got 1 2 3 4
00:07:49
5 and then we've got four * 100 so
00:07:53
that's 400 so in total this is going to
00:07:56
cost us 45
00:07:59
operations but with air table the way
00:08:02
they charge for automations is they only
00:08:05
charge for a run of an automation so if
00:08:10
we jump back here to air table air table
00:08:12
is going to charge us for one automation
00:08:14
for running this entire thing it doesn't
00:08:16
matter how much we do inside of this
00:08:18
script everything that we do in this
00:08:21
entire automation will only cost us one
00:08:24
automation so you can see how powerful
00:08:27
that is if you use it correctly again if
00:08:28
we jump back to make.com this is going
00:08:31
to cost us 400 operations and then again
00:08:34
remember if we had additional modules
00:08:37
here because we needed to do additional
00:08:38
processing of that data before we did
00:08:41
the create Row 1 2 3 4 5 6 7 8 n 10
00:08:46
different operations that we needed to
00:08:48
run before we did the insert this one
00:08:50
automation could cost us a th000
00:08:53
operations now an air table it would
00:08:55
only cost us one and inside of this
00:08:58
script we could do those 10 operations
00:09:02
but we would just do them in
00:09:04
code so we can turn a th000 make
00:09:08
operations into one air table Automation
00:09:14
and again it doesn't matter how many
00:09:16
other subtasks we add to our air table
00:09:19
automation it will only cost us one
00:09:21
automation to trigger this entire thing
00:09:23
now there is a limit in that this script
00:09:27
can only run for 30 seconds
00:09:30
so that is something that you do need to
00:09:32
consider if you're processing so much
00:09:34
data that this takes longer than 30
00:09:37
seconds then you would need to split
00:09:39
that up into multiple runs here so you'd
00:09:42
have another script that was here and
00:09:44
then if that one took longer than 30
00:09:46
seconds then you'd have to have another
00:09:47
one here but there's really no limit to
00:09:49
how many of these scripts that you can
00:09:51
have so done right using these error
00:09:53
table automations you can save thousands
00:09:56
and thousands and thousands of
00:09:57
operations and then because of that you
00:09:59
can save thousands of dollars on your
00:10:01
make.com subscription now one thing I do
00:10:03
want to point out here is that in this
00:10:06
solution here we are directly taking the
00:10:08
Json object that is coming out of this
00:10:10
module here again if we look at the
00:10:12
output here and we look at the data
00:10:15
coming back and we expand this open we
00:10:17
can see all of the different posts that
00:10:19
are right here and so what this module
00:10:21
here is doing is it's simply taking that
00:10:24
data and writing it into the Json string
00:10:28
column that is right here so it's taking
00:10:30
that raw data and just inserting that
00:10:32
into the column here if I open this up
00:10:34
we have all of the data here now the one
00:10:36
problem with this is that this text
00:10:38
field here if we open up this field we
00:10:42
are using a long text there is a hard
00:10:44
limit with how much text you can
00:10:46
actually put into this long text column
00:10:50
type I don't know exactly what the limit
00:10:53
is in terms of characters but you will
00:10:55
hit it and if the API call that you are
00:10:56
processing returns a Json that is too
00:10:59
big for this text area then your make
00:11:03
automation right here is going to fail
00:11:05
it's going to say hey I wasn't able to
00:11:06
insert all of that Json data into the
00:11:10
column so this works really well if the
00:11:12
Json and the data coming out of the HTTP
00:11:15
call isn't too large and so in those
00:11:18
cases there is a slightly more complex
00:11:20
solution that I'm going to show you now
00:11:22
so now I'm going to come up to this
00:11:24
route here and I'm going to go ahead and
00:11:26
disable it and then I'm going to go
00:11:27
ahead and enable this route and so now
00:11:30
what this routee is doing that is a
00:11:32
little bit different instead of just
00:11:33
taking the data and dropping it right
00:11:36
into that text field for the Json we are
00:11:38
going to take the data and we are going
00:11:40
to upload that to a remote file on the
00:11:42
Google Cloud Storage platform and then
00:11:44
we are going to save that file as an
00:11:47
attachment inside air table so if we
00:11:50
jump back to air table here instead of
00:11:52
saving this Json here as a text we're
00:11:55
going to download it create a file and
00:11:58
upload it as an attack attachment in
00:12:00
this Json file here so now let's go
00:12:02
ahead and come back to make and then I'm
00:12:03
going to go ahead and run this
00:12:04
automation so this time we're going to
00:12:06
see it come down this path so you can
00:12:07
see here that it created a file and then
00:12:10
created a new row in our tasks but
00:12:12
instead attached a file so if we come
00:12:13
back to air table we're going to see we
00:12:15
have a new row here and instead of that
00:12:17
Json data being in this Json column it
00:12:20
is now a file in this Json file
00:12:23
attachment and so then if we come back
00:12:25
to our air table automations and we go
00:12:27
to process Json 5 it's set up in much
00:12:30
the same way in that it's looking for a
00:12:32
successful HTTP call Cuz again remember
00:12:35
we only want to process successful calls
00:12:38
to the API here which is represented by
00:12:40
the 200 status code but instead of just
00:12:43
checking to see if the Json column is
00:12:44
not empty now we're trying to make sure
00:12:46
that the Json file is not empty and that
00:12:48
this hasn't been processed before so now
00:12:50
if I go back to the trigger here and I
00:12:52
choose a record and this time we're
00:12:53
going to choose row seven which has the
00:12:55
attached file and then I'm going to go
00:12:57
ahead and process that script jump back
00:12:59
over to air table going to jump to the
00:13:01
post notice what you'll see is that now
00:13:03
it's processing that data from the file
00:13:06
and it's going to run through and add
00:13:07
all of those rows
00:13:09
independently from make.com and so now
00:13:11
we've inserted these rows by processing
00:13:14
the data that came from the API that was
00:13:16
saved into this file so then really the
00:13:19
only way to figure out whether you want
00:13:21
to use this more simple way where you
00:13:23
just simply take the data that was from
00:13:25
the API and drop it into the column for
00:13:28
processing later or having to download
00:13:30
the file is really just dependent on how
00:13:32
much data is coming out here and whether
00:13:34
that can all fit in a text column or not
00:13:37
and sometimes the only way to figure
00:13:39
that out is just to test it download the
00:13:41
information from the API and then simply
00:13:43
try to insert it as text into the long
00:13:47
text column and if it doesn't error then
00:13:49
you know that it's going to work if it
00:13:51
does then you know that you'll need to
00:13:53
use the file method and then if we jump
00:13:56
back to the automations all you would
00:13:58
need to do at this point for either one
00:14:00
of these methods is just to turn on the
00:14:01
Automation and then the next time this
00:14:04
were to run I'll run it again this time
00:14:07
it's going to download the file and
00:14:09
upload it into air table and then that's
00:14:11
going to trigger the automation
00:14:12
automatically cuz now we have this on so
00:14:14
if I jump to the automation history we
00:14:15
can see that this is running it's
00:14:17
running through the script so if we jump
00:14:19
back to air table and go to the Post
00:14:21
we'll see that it added another 50 rows
00:14:23
of data from that Json file that we
00:14:27
downloaded and then uploaded it in a
00:14:29
table and then if we were to take a
00:14:30
closer look at what's happening in this
00:14:33
air table automation remember if we look
00:14:35
at this a table Automation and we look
00:14:37
at the actual code it did nothing more
00:14:39
than to load the data from that specific
00:14:43
row right so the way air table
00:14:44
automations work is that this is
00:14:45
triggering when there is a row again
00:14:48
where the HTTP code is 200 the Json is
00:14:51
not empty and it has not been processed
00:14:53
right so in this automation when we drop
00:14:56
in that new row into tasks we're getting
00:14:58
this this new row here it simply looks
00:15:00
at this data takes this data and turns
00:15:03
it into an object in the script and what
00:15:06
I mean by that is if we take a look at
00:15:08
the script and look at the code it's
00:15:09
this line here where we're taking the
00:15:11
Json that we passed in from the variable
00:15:14
so if we again if we look at the
00:15:15
automation we look at the trigger then
00:15:16
we look at this script here we're
00:15:18
passing in the record ID from the
00:15:20
trigger and then we're also passing in
00:15:22
the Json column data into the script as
00:15:25
well and so then if we look at the code
00:15:27
again we've got the record ID and we've
00:15:29
got the data and we're also parsing it
00:15:32
into an object so what that means is
00:15:34
that it's taking it from this text form
00:15:36
and it's turning it into an object that
00:15:38
we can actually use and iterate over in
00:15:40
JavaScript and then you can see here for
00:15:43
each of those posts it's creating a
00:15:45
record it's passing in the post ID the
00:15:47
post name and the post itself and then
00:15:49
if we jump back to this automation which
00:15:51
is processing the file it's working in a
00:15:54
very similar way except this time we're
00:15:56
only passing in the record ID and then
00:15:59
if we look at the code what's happening
00:16:01
is it's grabbing that record ID but then
00:16:03
it's grabbing the attachment field so if
00:16:05
I come back to tasks here it's grabbing
00:16:07
this attached file instead it's actually
00:16:10
downloading that file so this air table
00:16:12
script is actually downloading it from
00:16:16
Air table from the actual attachment
00:16:19
column and then once it downloads it it
00:16:21
processes it in a very similar way and
00:16:23
then down here at the bottom it is just
00:16:26
doing the same thing where it's looping
00:16:28
through all of the posts here's where it
00:16:30
creates the post and here's where we get
00:16:32
the post ID the post name and the post
00:16:35
itself so if you want to get access to
00:16:37
the make.com blueprint so you can simply
00:16:39
import the blueprint and have the whole
00:16:41
thing open up just like that and also
00:16:43
access to the air table base where you
00:16:44
have this post example with the two
00:16:47
automations that will process the same
00:16:50
information that we process in make
00:16:53
except in code make sure to jump into my
00:16:55
community the no code Architects it's a
00:16:56
growing Community you can get teex
00:16:58
support access to a make and air table
00:17:00
workshop and you can also access my
00:17:02
library of automations like the video
00:17:05
that you saw today I hope to see you
00:17:07
there but either way I hope you enjoyed
00:17:08
this video and I'll see you on the next
00:17:09
one