hi in this video I will show you how to create a flow to convert office files to PDF without
using any premium subscriptions or third-party connectors for this you have two scenarios the
first one is converting single file to PDF which I will explain it in this video and the second one
is converting multiple files to PDF which I will explain it in the next video so now let's see what
is this flow required to be created for any flows to run we need to have a trigger here I want to
run the flow when the file is created inside the folder on SharePoint so I have to have the trigger
called when a file is created for this scenario I have created a folder called Power automate
inside a folder ICT which is below the documents Library so whenever a file has been created inside
this power automate folder or a file uploaded to it this trigger will run the next step is to get
the content of data file which has been uploaded or created inside this folder then we create a
copy of this file which has been uploaded to this folder inside our personal onedrives so for this
reason I have created a temp folder inside my desktop this is my OneDrive then we convert
this file which has been copied with this folder to ipdf using this action convert file to PDF then
we have to create a copy of this file of this PDF file on the SharePoint so we have to have another
action to create a copy of this PDF file on our SharePoint and for this I have created another
folder power automate slash PDF under ICT folder in order to make a copy of this PDF inside this
folder for this we need another action create file so this action will be used to create a
PDF file from this action convert file to PDF so let's see in action how we do this flow this is
my power automate home page to create a flow click on Create and then click on automated Cloud flow
then give a name to our flow and then write when a file is created in order to filter the triggers
then select when a file is created then click create overflow is created and our trigger is
ready to be customized so we choose the site address and document library then we have to
specify that folder name which we upload or create the file inside it for this demonstration I have
created Power automate folder inside ICT folder so I will select that folder from the shared document
then the ICT folder then the power automate folder so anytime we create or upload file to this folder
this trigger will be run the next step is to get the content of this file which has been uploaded
or created so I will choose get file content and then I will choose the same site address then I
will I have to choose the file identifier for this we write the identifier to get to get it
from the trigger when a file is created to write identifiers League identifier this way we get the
content of the file which has been uploaded or created inside the folder power of automate the
next step is to make a copy of that file which has been uploaded to the SharePoint folder to my
foreign to do so let's add a new step and then create file click on create file and then choose
the folder which is on your personal OneDrive in my case on my desktop I have 10 folder for the
file name I'm using the dynamic content and the file name will come from the trigger when file is
created and I will choose the file name with the extension so I'll write file name then I'll I will
click on the file name with extension this will come from the trigger when file is created but
for the content I will get it from the get file contained action so click on the file content
this way we can get a copy of this file and make it available on our personal OneDrive
then we convert this file to PDF right convert to and choose convert file and then the file is
the one which we created on our personal OneDrive we can find it by using this ID so I click ID and
then click next this time we create a copy of that PDF on SharePoint folder for this I have created
a different folder a separate folder under ICT folder and then choose create file action choose
the same site address and the folder path is the folder which I have created and the ICT folder was
called Power automate slash PDF and then the file name we get the file name from the converted file
so click file name and the content will come from the same place from the same action convert file
this way we are finished creating our flow click save click save and then click test
to see if the flow is working as expected click test and then manually click test again now the
flow is waiting for us to upload the file so I'll go to my SharePoint folder and click file upload
the file new laptop open once the file has been uploaded successfully the flow will start running
as you see on my personal OneDrive I have a folder 10 folder the file has been copied to
and on the SharePoint folder the PDF folder is empty now because the flow is not finished yet
running so we are waiting to be successfully finished then if I click refresh I will see
the pdf version of my Excel file will be created inside this folder now everything is working as
expected but we have one thing each time we create a file or upload the file to the SharePoint folder
a copy will be created inside this damn folder on my personal OneDrive which may take a storage
from my OneDrive so it is good practice to delete it after it converted to PDF so I'll go back to
my power automate and then click edit and I will add another action delete so right delete in the
search and then click delete file so the file which we want to delete it should be from the
create file action so we get it by the ID from the create file action so scroll down until you get to
create file action and then select ID this way we were able to delete that file which has been
created on my personal OneDrive after it converted to PDF so let's test the flow again to see the
file will be deleted after creating the PDF file or not so it is waiting for us to upload the file
to my SharePoint folder so I will upload another file click files this time I will choose another
Excel file the file has been uploaded then as you see the flow has start running now if I check my
temp folder on my personal OneDrive the file will not appear here after it converted because it will
be immediately deleted after it converted to PDF so let's refresh it to see if it is if it is there
or not it is not there if I check my SharePoint folder and click refresh the file has been created
but if I go back to my personal OneDrive the file is not there because it has been deleted
immediately after the file converted to PDF I hope this video was useful for everybody in the next
video we will talk about how to convert multiple files to PDF using power automate foreign [Music]