How to Generate PDF with Dynamic Contents in Power Automate Without PREMIUM Connector

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi and welcome to my youtube channel where you learn everything about analytics automation and productivity in this video i'm going to show you how to generate pdf document with the dynamic content without a premium connector in power automate and this use case can be applied to any processes where you need pdf to be generated either during the flow or at the end of that process and the good thing here is that you don't need any license to do this except the usual power automate license so to get this done and the use case i'm going to be using in this video is a certificate generation for a particular webinar and to get this done i have created a form that has only just you know name of the person okay additionally i might want to add email so that i can put in the email address where you want to get it email address all right so we have email address here and i also need power automate to create my flow then sharepoint site i have a sharepoint team site which is called application and here i'm in the document library i'm just going to go to the home page of the sharepoint site then i'll be creating a sharepoint document library it's important because it will help us to you know feeding dynamic content into this remember the goal is to achieve this without a custom connector so i'm just going to go to new and then use document library this is going to be um webinar certificate that's what we call these certificates i'm going to create it now that we are done creating this i will be you know adding more columns part of the columns number one will be the full name of this person was the full name remember we have that here's the full name i also need the email of the person email and lastly i'm going to need the what to call it now the date submitted so date submitted it should be date and time so date submitted so i don't need the time i just need to date because i need that on the certificate all right one more thing that i'll also need there is the i need to upload the document i have the template already i will open it first i will upload it then i will show the template is called certificate of participation which i'm going to edit here and be able to see the content of this document all right so i have this i'm going to select it then open it up in my app desktop app i designed all these myself in word documents as you can see these are the component that i'm touching right here okay so we just need to fill in a dynamic content here which is the name and also the date issue to do that i'm going to go to insert then come to text box okay so let's make another attempt draw text box okay i have that now i can draw my text box here then align so that can make it central i can also make the text here uh go to home then make sure remove this space all i'm doing is just formatting then i can increase the size to something like 28 that sees 48 so that is big all right it's like this also on that shape i can remove i have to remove the fill let's just leave the line there for now so what i have to do to this let me duplicate this so i'm just duplicating it here then i will reduce this that's for the date feed yep you're just gonna do the about the font and the details are the same all right so it's time to fill the dynamic content that this guy will call this is the full name this is the date issue so how do we get the full name i'm here clicking here right here still on insert i'm going to go to the search reading i will see this thing called quick path when i click on click parts you see document property and right there you will see the full name you see the date issue or date submitted so full name here i'm going to click on it this way it has inserted that full name right here inside this place and it's picking that size so i can make it bold so it's brought down but the font size is also 48 then i've come here to date go to insert click on this quick part the c document library i'm going to see date submitted i also want to make it bold too so um just come here and click on this button so down to his boat all right so i can save this number before that i need to remove the line so i can come here then no outline here okay of course i just have to select this no outline so right now they are good to go yeah i think we have then this is saving is not my saving okay the document is saved then i'm gonna close it so right here this is a document and we'll be able to get these additional details anytime we are feeling one more thing i need to do is i need to move it to just my normal document library so i'm going to move to my document library here which is just application and i'm moving to this document library that is all i'm gonna move it there so right now it will leave here to this document library and i'll be copying this because i want to keep it as a template i'll be copying it from here to this document library to then work on it all right so let's go to our power to make flow this is where we're going to start a flow create an automated cloud flow when the new response is submitted call this webinar certificate so we're going to create it we'll be connected to our webinar form so when i type webinar is going to administer first that's power to me to webinar then get response details get response duties i have it here same thing i have to click on the form select the form that i need to get responses from which is here then the response id the next step is i have to copy you know copy file from sharepoint so because i also have a copy of this so where's the current site in the current site this application file to copy i need to identify and pick that exact file remember it's inside my sharepoint um document which is the document library that should be inside the shared document uh how this is it certificate of participation that is the file so where's the destination address is it going to application but the folder that is going to here is this it's not this shared document but rather webinar there is a document folder called webinar which i created this is webinar certificate so what if that kind of document exists what should we do just replace replace okay so now that i have this the next thing there is to update file property i'm gonna say update file property this update file property will allow us to fill in the details of this webinar certificate the columns here will be able to fill all these properties so um what is the site its application what is the library name it is web certificate unique identifier of item to be updated now this column i can make it not compulsory but of course you can always use this guy this is the value item id then what about the title i don't need to try to the full name yep i can get that from my form so after full name coming from form email address is also coming from form so see um email address then date submitted it's coming from the azure which is the submission time all right so i have been able to update this the next step here is for me to create you know get my content why because i want to transfer it to word.com onedrive so that i can convert it there but first i need to get the content of this file which i have now updated the property so i'm going to say get file content i'm getting this from the station point so i can the content is what i actually need the site is this and the file identifies the same thing for the update now i can use the update which is the id list item id then um okay but i can get that from the copy item actually because that is defined the copy item is actually the real file itself so copy item this is the id okay so i have that the next step here is to create file create file in word document clarify this is it and sorry it's um one drive so what is the folder part i just need the primary photo file part the root one i don't need to be specific because i'm still going to delete this word document what is the file name so i'm gonna put the full name let me type the full name and underscore and put certificate underscore and put time so i can be sure you know because it could be of different types in my expression i'm going to type um utc now just format for d d alone so we're going to put the date there yeah utc now yep i don't know why i'm having this long line but that is it dot dlc x because the word document then what is the content the content is the get file content that is coming from here this is the content right now it's going to create this as a word document in my onedrive and because my onedrive has the action for convert file and that is what i'm doing on this you'll be able to allow me to convert you can see this is the action file what am i converting this same guy which is the id of this great file take that word document convert it to pdf that is all it's going to convert this but it will not add it to the folder this conversion is only applicable is only usable for me within this flow so what i do i want to do i want to create this powerpoint of some order called now the pdf now in my sharepoint so i'm going to use another action called create clear file so this is clear file remember it's not the water it's not the one drive is the sharepoint so that i cannot have this pdf on the same sharepoint list which is a document library now what is the folder parts for that part is this my webinar what is the file name the file name is here this is the file name and the content this is the content for the clarify tool so in case i want to update the property of this video you see that you can also use this update file properties but let's go ahead and under an update and i'll tell you why so let's go ahead and update the file property of the file properties what i'm uploading is this create file item so this is the site this is the library and the immediately i do that it's gonna be what is the id which is this guy create item what am i updating the full name so i'm gonna come back here for full name here email address i'm gonna pick the one coming from my sharepoint from my microphone email address and they submitted easy submission time all right the reason why i'm doing this is because i want to take away take out the word document and leave judge the pdf so i need to delete so right here i'm going to say delete item delete file sorry is delete file i'm deleting file here delete file first from one drive this word document that i create i need to delete it so right here i'm going to look for the id from what yeah that is it here create file this is the id this will delete it because i don't need that word document again you know you have to have them for the lc then the one here which is the first word document there are two things here i've been able to copy a file update that file get the content of that file create it as a word document as well on one drive then convert it to pdf then now create a pdf as a file on my sharepoint document library then update the properties of that same file so i have two files there now have the word document which is the initial file and i have the pdf now i need to take away this same word document so i've deleted the one from one drive but let's delete the second one so it's also delete file that i'm going to use but this time around from you can see that from sharepoint list the address is sharepoint they're going to ask me where is the fighter i mean the identifier i'm going to locate the one from copy file so um i'm looking for copy file it should be primary here now this is a different property yeah copy file this id item is going to delete that one now i'm done deleting all those different duplicates of document the next step here is to send email i'm going to send an image and an email right here then where am i sending it to this is why i want to use my dynamic content or somebody made the person enter then i'm gonna say um webinar certificate so it's webinar certificate and the content is currently find attached your certificate of participation best regards so about saying dear you know yeah it says i have the name of the person so their full name um i want to use the one from what document uh from form all right so come to show advanced option make sure you always select at least number or number neither number or high otherwise it's going to send you to new importance for here since i have the file of content so i can say file name you know this is the finding coming here how about the content i can search here file content so this is the file content from that combat file because it is accessible for us so i'm going to click on save and right now it's time to test our flow and see how this thing actually work so i'm going to put my form on preview name i'm going to put orlan let's just put it on charge okay so i'm gonna submit now that i've done this on this ship of sherpa document library i should see the details first a document needs to be duplicated here to be copy here which has been done the properties will get updated if i refresh now the property will have been updated yeah the property is updated all the details i need the updated now all other processes will have you know taking place so let me go back so that i can follow the the stages okay don't show this the flow actually fails so let's look at it and see what exactly failed here file not found get file content okay it's at this point of getting five content so but every right in a good way so let me check most likely the link to get the file content is what i didn't get right so i need to i need to locate that okay get five content needs to be id okay item id i guess okay so let me come here update five property copy file now where's the copy file let's recover file okay this id should be this id actually should be this id and i think i have that id used somewhere so i need to be sure that i'm not using the wrong id again um actually update it should be id under this create file too okay i have this item id this is fine so let me yeah i have to test this time around i use the field data so automatically field one so run the test so that we can follow through here we won't see a major change here but if i refresh i should be able to see when this guy you know got updated a few seconds ago yes the file names and properties we then get updated now this is tyrone is already creating files i've been able to get the content now so i come back here and refresh you will see that it has been able to you know update the name the details while the flow is also running alps i see it another one hit another fade process uh just before sending the email delete file content could not delete the file uh why does not exist oh is the id most likely oh is the id that i i was looking for that i knew i put and hide this somewhere um i need to get out so edit under delete here the id i use user okay should be the smaller id from the item which is the first one copy file which is the copy file it should be this id all right and that is all so i'm going to save it now and you have made a mistake somewhere yeah we're going to run this flow for the last time you know for it twice so i'm going to test it now interestingly you know all these details are oh it has even created the pdf yeah the new one is there just drop i need to be updating it so let me uh delete this guy you don't repeat it yet right so this is still working yeah this has been updated let's monitor the flow it's creating the file it's done converting it's creating the pdf now in my you know um sharepoint document library let's refresh we should have the pdf there now uh we're so late because the pdf got there and the word document has been taken away yeah now does it go so the process is successful the pdf done the word document taking away so let's just check our email okay so i have it here this is the email and it came with an attachment which i can see here wanted six kilobytes when i open this attachment you should be able to see the details right here all right certificate of participation i can see latches while bold um yeah date in case you want to reduce this font size for the date but you can see this works so let's try another account you know let me use um maybe another person's details in my gmail account i one of my 10 gmail accounts to try this i'm going to fill the form so that we can see bin drop not in gmail account so i filled this form for someone else now and right here it's doing the regular thing it's going to copy the generic certificate of participation here it's going to update it with the metadata it's going to delete it you know uh and create a document what do a pdf document when i refresh now it will have done the update delete and do everything with my all my ceo might just be a word of my pdf okay is it doing it it's still not done so at the john does the new person that i feel this form for so the process is the ongoing come back to my flow i have to come back to the general flow to be able to track this oh it's succeeded by the time i refresh now you see this word document will no longer be there okay she's now at the john does a pdf that is there if i go to my gmail or right here you can see webinar certificate for adele john that is the name of the person that i put there and this is the certificate which i can literally open up and see the details you know that makes a lot of sense and this brings us to the end of this video thank you always for your support and bye for now
Info
Channel: TheOyinbooke
Views: 43,722
Rating: undefined out of 5
Keywords: power automate, theoyinbooke, convert to pdf, generate pdf, sharepoint, sharepoint document library, how to generate pdf in power automate, convert word to pdf
Id: gYlfZazG0kQ
Channel Id: undefined
Length: 21min 42sec (1302 seconds)
Published: Mon Dec 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.