Populate PDF Documents No Premium Licenses with Power Apps and Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone my name is Andrew hes and today we're going to create PDFs out of our data from our forms but we're not going to use any premium licenses so no premium licenses for this we're going to use a new PDF feature in power [Music] apps so if you're new here the last couple weeks we created a form we used a Microsoft Word template we created a SharePoint site we made content types and we made library and we did all this without any premium licenses then the next video that we did we integrated power apps with SharePoint and then we also did our templates and so today I was thinking hey let's do this with PDFs but let's keep it free no premium licenses from Microsoft so honestly I've never done this before this was just an idea this makes me think of a quote and I believe it was from Picasso and it was something like I'm always doing that which I cannot do in order to learn how to do it all right so this was just an idea I want to keep it simple you guys can make a template way more complex than what I going to do but I have a template here it's just a happy birthday template and we're going to fill out some information on the template so I took a screenshot of this template here from Microsoft Word and so we're going to go to Microsoft power apps and we're going to have two screens on our first screen is going to be our our form now now you could make this a button click on a power automate flow to make it Loop through everyone's birthday that's possible um but what I'm going to do is I'm just going to keep this simple I'm going to go to templates and do a portrait print I want this portrait uh template and I'm going to delete that button actually so now we have two screens on screen two I'm going to insert a image now you have to be careful if you do the background and I found this out the hard way if you do the background of the of the screen it won't come through when we print it but for right now I have my image here I'm going to upload my image it's my happy birthday image and I'm going to post that in there all right so I have my happy birthday image and we'll make it you know somewhere you know about that size okay so now what I'm going to do is I'm going to insert a container I'm just going to do a container container and I'm going to put it in a regular container not horizontal not vertical just a regular container I'm going to put it over my image here and then I'm going to insert a few text labels so we'll have one happy birthday maybe your name will go here and then let's say I'll just copy this and then the manager's name or company name can go here and finally we'll have some comments right we want to make sure that our happy birthday message has some personality to it there's some comments we'll put those in there and so we'll leave it just like that so I'm going to rename this one so label one we'll rename to label uh bday name birthday name uh this one will be maybe company name label company name now you could do manager name you could do multiple people's names if you wanted to but we'll just do company name maybe you want Department name maybe you want Department name and this will be label comments All right so we have all three of those inside our container one so I'm going to go back to screen one and I'm going to insert uh some text inputs and we're doing all this in classic right now maybe you want to try this out on Modern but I'm just going to do it in classic today because we're using containers my idea is if your entire app cannot be modern don't do modern yet that's that's what I've come up with yet but if you can do your entire app or with modern then do modern but containers right now uh on this date are not modern power apps so I have three text inputs and also this is a simple simple form and then I'm going to have some more text labels and this one will probably be bigger because this will be our comments now for this one we're going to get rid of the text input just going to make it blank but I'm going to rename these so this one will be text bday name so just matching what we did before rename text a company name maybe Department name would be smarter but yep uh text comments and now we want to fill in each of these birthday name um company name and comments All right so we have a very very simple form so we're going to insert a button and this button is just going to go to the next next screen next and it's just going to navigate to our screen to you probably want to rename your screen and let's do a a cover right how about that a cover right just to be a little different today let's fill in some information so Andrew hes company name is hes IT solutions and comments congrats you did it one more year at hesit Solutions uh your project work was incredible now for this field or this text input I probably want to change this to multi-line text so let's see can we change this to multi-line or so that it wraps right here mode multiline all right so now let's click next and for each of these Fields right here the bday name is going to be equal equal to text B name. text now if you're using modern it would be value so you got to be careful um between classic and modern things change Microsoft likes to mess with this uh text company name. text and let's say text comments. text um let's Che change some things up here let's keep let's move this down let's change our name let's give it a different font maybe some cursive and a larger size so happy birthday Andrew hes so we have a super super simple form now you can make this more complex if you want to and up right here we're going to insert a button so we're going to have a button up here and this is going to print for us uh print save create PDF whatever you want to call it that's what it's going to do and so on this theme since I'm just thinking about this I'm not going to go to Power automate and do all this work I'm just going to click right here on the power automate button and I'm going to create a new flow and this flow I'm just going to click create flow and today we now have power apps V2 trigger so we have a power apps V2 trigger and we're going to have two inputs the first input is going to be the file name and the second input is going to be of type file and it's going to come through as file content now we only have one more step to our power automate so this is kind of nice and that's going to be to create a file and where are we going to create that file now we could do one drive but we're going to do SharePoint you know you could send this in an email directly if you wanted to you know send an email so we're going to create a file and we're going to save it to our SharePoint site so it's the same SharePoint site I was using last week it's our word templates I'm going to click on the folder icon here and I'm going to put it in our document library and the file name is going to be file name but what's really important here is that we give it PDF we have to tell it that it's a PDF file so don't forget that PDF and the file content is file content and literally that's just about everything except for I would recommend to rename your flow so up here in the top left uh create bday um PDF so that's just renaming our flow so when we call it and power apps it'll be easy for us and we'll just click save that's the entire flow super simple that's all we need to do today all right so on our print button we are going to call our power automate so right here I'm going to say create BD bday PDF and notice that it gives us the intellisense about run we want that one all right first what it's asking for is the text of the file name so this will be maybe my name let's do um text bday name. text and we could probably if we wanted to we could add in the the date to make sure that we get a unique value every time so now we could do now so now every time we're going to get a unique value of our file if we didn't want a unique value we could overwrite every single time and and take out the date so I'll do comma now I'll see the intelligence uh Microsoft is helping us here file with the squiggly bracket I'm going to pull this down so let's open this up pull this down file squiggly bracket we need another squiggly bracket and then name so this is built in to the metadata of the PDF so I'm just going to say test.pdf that really doesn't matter because we're not going to use that name and then now this is the important part content bytes and the content bytes is going to be the PDF of what with the PDF function we can do a screen a container a gallery but for this one we're going to use a container because we put everything in container one container one honestly we'll do a squiggly bracket squiggly bracket and a parenthesis now that I thought about it we want to pull this image right here and put it into container one and send it to the bottom all right so now we have our label comments and our images in the container not just on the screen so let's go ahead and test out our power automate so we'll just hit the print button so I made a very large error now that I thought about it instead of adding inand I added plus so that's my error I'm going to leave it in the video I want you guys to see that I make mistakes even though I've been doing this for about four years now I'm still making mistakes and since I'm making mistakes I'm going to quote someone else I'm you know failure is just success and progress right so I've been growing for about four years I failed success is just failure in progress and that's by Albert Einstein so I'm going to quote someone else here and so now let's go ahead and give it another try going to go ahead and print I forgot another major important step and that right now in power apps we need to go to settings upcoming featur and turn on an experimental PDF function it's very important that we turn that on now if you're watching this video in the future the PDF function may be somewhere else maybe it's not experimental maybe you're not using classic power apps at all so things may change but now that we have that on let's go ahead and check out how what it says now I believe everything's fine I'm going to go ahead and press print so now we can see that button is held down power automates running we got no error so now we have our success in our SharePoint library with our name and a nice unique date number and time we click on it we open our file we now have happy birthday Andrew hes from hesit Solutions with our comments our pictures our images finally we have success and we have progressed so that was just a very simple flow now there's so much more you can do with this now to think about this right imagine you had a SharePoint list or you know an Excel file even people say don't use Excel with power apps imagine you had an Excel file with everyone's birthdays in there you could Loop through and create PDFs for everyone although then the comments would not be un unique right you want to give some feeling behind your comments when you're filling out a happy birthday to your employees it needs to be unique don't just make a you know a regurgitated power automate that just kind of sends it out to everybody no one's going to be happy about that printed that out now let's say we wanted something else let's say we had our form here let's do another new screen template portrait and I'm just going to take our print button here here I'm going to paste it back in okay and this one we're going to do another container another container let's say we had a a beautiful form right what we can do inside this container is do a multi-line or an HTML html text and we can put that in our container and then we can start filling out our form and we could pull in galleries we could pull in you know different galleries I have a whole video on this on how to convert a gallery into HTML but we can pull in let's say um your name and then here we have text B name. text and notice that progress has been made I I use the ersan and then we could do a br and then an aand um company name and make sure there's spaces in there and then ersan text company name. text and this is just basic HTML BR is just a break means the next line and then finally we'll have our comments and text com comments. text and we just have that filled in so now we can see our nice fields in here we could give it some more BRS we give more brakes give it some more spacing maybe we want the font size to be a little bit bigger let's go to 20 so now imagine if you filled out an entire form you filled out an entire form and uh printed a p PDF so we can just take our print button here here and instead of container one we'll do container two container two here and now we can take it press play print so now imagine you had this beautiful form and you wanted a PDF so you can easily just come in here refresh we have a new date and time with my name open up this one and that's our old one let's check out the other one open up this one that was a few seconds ago actually and we can see our beautiful form filled out so you could literally have this printed out you could then come to power automate flow you could send an email Outlook you could send an email to yourself or to whoever let's say we send an email to ourselves um PDF attached happy birthday for the attachments content right here so we have attachments we do the lightning come down to file name make sure to do the PDF so it knows that it's a PDF content type and then do file content here click save it may give us a warning to refresh our power app but it did not so we'll go to power apps make sure to refresh gave it a little error while it's refreshing all right and so now I'll just press play press print so we should get a new file so we got a new file in our SharePoint right here a few seconds ago and that's our PDF now let's check out Outlook we got a happy birthday oh look it even you know Microsoft automatically did that open it up and you can see that the file is there complete also and has been sent to an email so now that you have the ability to create a PDF you can send it to one drive you can create a power automate to create many PDFs you can send the your PDF and an email you can store it in SharePoint it's just a nice way to create a nice easy document template we could do the same thing now that we did it once the same thing is going to happen on our page to so if we hit print here it's actually going to do the same thing it's going to still email so if we check out my email PDF attached we can see that we have the nice PDF email here that was us made in power apps so so this was just another way to do document templates in power apps this is going to be the free way to do it um there's no reason to use any kind of word connector template we're not doing word we're just doing PDFs so if this was helpful to you my name is Andrew Hess please like And subscribe and I'll see you next week
Info
Channel: Andrew Hess - MySPQuestions
Views: 5,410
Rating: undefined out of 5
Keywords: word templates, power automate, power apps, ms power platform, pdf templates, pdfs with power automate, create custom pdfs, custom documents with power automate, document templates, document management, sharepoint document management, Power Apps and Power Automate, Populate PDF Documents, No Premium Licenses, Andrew Hess, mspquestions
Id: 6wcP5lYhMYw
Channel Id: undefined
Length: 19min 21sec (1161 seconds)
Published: Mon Feb 26 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.