[Music] welcome champions this is the rpa champion and in today's video we are going to be doing
something relatively easy but that is going to be building for something more complicated and
it will give you a lot more insight into power automate but not only that you will learn how to
solve some practical problems with power automate in today's video we are going to be looking at how
to download any kind of file from the web and save it inside of a folder but not just inside
of any folder inside of a folder in a cloud storage so not on our computer but in a cloud
storage in the following video we are going to be seeing how we can connect the power automate
that is working inside of the cloud how we can connect it to our computer and have it save files
in our computer via a gateway but in this one let's get started and let me show you what
we're going to be doing today so i found file that i want to download in this case is a png
of this is the png that i want to download so i want to download it at the same time
i would like to put it inside of a google drive folder now nothing easier than that
so let's test this i have named my picture yoda too and i will be putting it inside of
this folder right here in google drive now let's run this flow and see what happens
so we are going to be connecting via http to obtain our picture we are going to be creating
them that file inside of default now if i go back here we can see that we have another
picture of yoda2 that has been created and it is the same picture as we have here it hasn't lost
any quality it hasn't been shrunk it is exactly the same file that we have uh that we we want
to download all right so let's see how this is done the first thing that we need to do
is from power automate we need to create a new flow and obviously we can choose whatever kind
of trigger that we want we could even try to uh break a little bit the system meaning use
not the way that is intended by maybe using a schedule flow and then downloading every
every few seconds an image but that would just uh that is uh beyond the scope of this tutorial
right now we are not trying to break our automate but to create a file that is going
to download some files for us so we're going to call this download files it is going to be a
a process that is going to be activated via a trigger meaning we're going to click on it
and it's going to activate so the next thing that we need to do is so what are we doing we
are downloading a uh file from the internet so we need to use http so what is http http is just
a http request like any kind of request that you make to a browser so for example when you visit
this link right here of yoda you are downloading this picture onto your computer you are making
a request to the browser and the browser is returning you the files that you require to
visualize this picture so this is the same thing that we're going to be doing here and we're going
to be using the get what is the method get so you have all this meta get put post patch delete
get all it means is that you are going to get some files from the server on the other hand put
just as the word says it you're going to put some files on the server post patch and delete these
are more related database but for right now let's just focus on get so i will select get and now i
need the address that i want to download so let's just we can use a picture pdf a web page we can
we can download any kind of file that we want so let's maybe download another picture of yola
so i have taken this one but let's find something that looks maybe a little bit more interesting
maybe this picture of darth vader so if i wanted to get this picture of darth vader i would just
i could either click on the picture get the link from picture or just copy the image
link automatically now when i go back here i would paste inside of the url
and that's all that we have to do for power automate to make the request to pull that file
now the next step that we need to do is we need to create a file now as i was telling you before
in the next video we are going to be looking at how to create a file
on the file system meaning on our own computer we want to download that file from the internet
create a file on our own computer now this is not very straightforward we need to install gateway
because we're connecting a cloud cloud instance to our own local machine so we need to know
how to connect the two together so in this case to keep things simple for the first time we're
going to be using a uh uh file that is going to be created in a in a shared drive now you can use
uh you can use the microsoft share drive you can use the google search you can use any kind
of online document hosting that allows you to generate files so in my case i will be using
drive so if i go to drive and see all the actions i have one that is also to create a file
so i will choose to create a file and since i have already authenticated with my account it
will allow me to select the folder where i would like to to save my pictures now i will choose the
folder as before it's called power automate and inside of this folder well let's let's actually
change folder let's go inside of power automate now when you click on the folder you will select
that folder when you click on the arrow you will go inside of that folder so i will select
test this is the same folder where we save the picture of yoda and we will call this veda dot
j jpeg now fold the file content automatically i have the body that is generated from hdp now
inside of the body that is the that is the content of our file now if we save this and run it we
should have created our own first power automate voodoo magic now i have already saved this
now let's test this and let's see if this is working now if it's working we should
go back to our file system and we should get a picture of darth vader here right along yoda
now is this running no it's not running yet
once it has made it has made the request so probably it will be successful in creating
the file as well and we can see that we have created the file now for some reason
i have i'm unable to visualize the file probably because i have saved it
with the wrong extension so jpg let's see how do we save here
media type all right very good
and this is how this process to download files would work obviously you would you would you have
to either do this dynamically what i'm doing right now or you would have to or you have to find a uh
always match match the file that you are trying to download uh with the extension that is
being created now this is what i want to show you i hope you guys that you uh you enjoy this
video um in the next video we are going to see how to connect to the file system and create
files in the file system on our local machine if you like this video subscribe to the channel
i really hope that you learned something and that we had fun while working on this
so see you in the next one leave me a thumbs up and thank you so much for watching [Music] you