Power Automate Tutorial - Microsoft Forms Multiple Attachments

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

This was just what I needed. Thanks!

👍︎︎ 1 👤︎︎ u/Kemosabe_daptoid 📅︎︎ Jul 29 2020 🗫︎ replies
Captions
[Music] [Applause] [Music] what's up everybody welcome back I'm John Levesque I'm your host today I am joined by community superstar MVP my bro Josh Agarwal what's going on yeah how you been buddy I'm doing good done how you I'm doing all right I'm doing all right I'm getting some cabin fever I'm I'm trying I got a leave home I'm spending my money like crazy trying to have retail therapy it's not good at gross not good how about you how you holding up I just go to PlayStation so I'm just spending my days on that you know a PlayStation not an Xbox all right that's okay that's okay because you can still play war zone with us and that's the important okay so on to the lesson at hand me and Yosh previously have done a bunch of videos together and one of them has been very popular in particular we did one on forms attachments and ever since we did the forms attachments videos we both of us have had two regular questions about forms attachments and they are as follows question number one how do I do a form with multiple attachments and so yeah she's gonna show us that and the second question we get is how do I complete this if my attachment is empty and so yeah she's gonna show us out so without further ado Josh why don't you go ahead and take the stage introduce yourself to the people let them know who you are what you do where you work all that good stuff and then take it away my friend so as you've told the topic for today is multiple attachments on MS forms so we'll be walking over through how we can create a form that accepts attachments and then we will see how we can pull those attachments in flow and then send it over emails a quick intro on myself here so I'm Michelle working with a buyer information services as a software developer in India and I'm also Microsoft business applications MVP a community of donat and an astronaut on the power communities so you can reach out to me on my Twitter here or go over my blog by the Thames calm so let's go ahead and build a flow now to get all these data from the form and then iterate over each item and then finally send it in the email okay so the new flow from your the best part it's building the floor yes and I'll skip it directly so we can find the trigger yeah so yeah she doesn't mess with the the guided experience you go straight into the Creator experience and then we'll select the onboarding form here okay and then the next step is to get the details of the response that was submitted so I'll again search for forms and this is a necessary action I'm not sure why they haven't just built this into the trigger I hope at some point they'll just build this step into the trigger but if you're working with forms and following along anytime you work with a forum full you have to have this get response details as your first action so keep that in mind all right I think just the trigger it returns the ID only for some reason yeah and then I'll add a compose action over here so that we get whatever what we get the details of the files that are coming in in the file question and this is the question oh this the answer to this is sent to the compose action now I'll save this once saved I'm going to run the flow I'm going to fill the form now so that we get the get the response populated over here so that this sit test and then I will come to the forms here as provide a response then Department so we had the option of providing three attachments I'll provide two attachments over here you let's take this one so these are basic screenshots from my blog post then I'll submit it over here once I submit this flow should trigger and then we have all the details in compose action so as you can see in the compose action we have this starting with PR square bracket which is an array so this returns it with an array of the file of the details of the files on the form and now we will use the past Jason action to extract these details so I'll copy over the entire response over here edit this flow add a new step as far as Jason and the content for this is coming from the response to be IDs question and in this schema will generate it from the sample payload and a that's what we just took from the previous step correct yes and then done so this has generated the schema for us now the new step is to get the file content from the onedrive folders so I'll add the action yet file content as we'll be providing the path of the file I will use the action gate file content using path and remember the difference there's onedrive and onedrive for business and so you got to be clear on which one you are using we are using the onedrive for business da one get file content using box ok so here what we'll see is if you click this folder icon you'll be able to navigate to the form first you select apps and then it will load the Microsoft forms folder which it has created and then you will see all the forms that support attachments and then you select the onboarding form here and then the question so once we select we'll be able to see the IDS of each of the uploaded files so I have copied this path over here directly select it from here and paste the path now after the question I want to add a slash and then provide the name from the dynamic content of the past Jason so as you can see the moment I provided the name it has pulled this action into an apply to each loop because the output from the IDS answer is basically an array that we just saw in the run history so it has multiple items so it will iterate over each of those and get the content for each of the file that has been attached to this form yep cool now now that we have the content we now need something or a container to put all this in so we'll add initialize a variable over here you let's name it as files and this is a type array because there are multiple files that we want to populate this area with and then I'll add an action over here which is appended to very variable you now we'll be constructing a JSON object with the attachment so that it can be passed directly in the Outlook action will be sent as an email so the main components are first the name of the file along with the extension so we'll just provide the name and then the content which will go as content binds here we have to provide the base64 string of the attachment so I'll switch to the expression editor will base 64 here and within the brackets select the file content from the previous action and then click okay so as you can see it has wrapped the file content in the base64 expression very 64 function basically and then we'll fix F finally we will add this send an email action so that we can add the attachments and send the email to the administrator here I'll just mention my account for now I love watching you work yeah sure I like how you are so methodical where you'll go forward in a flow to establish a piece but then kind of come back and and build the piece that you need to then finish out that part like I feel like your mastery of the Lego blocks is always very amazing to me so it's just like putting all the pieces together one by one yeah yeah and and and knowing where the right part goes which it's very obvious you do yeah so this name is basically the name of the person who has submitted the form and the department the informations which you are collecting so again to the department in here and then the email is ready but we'll have to add attachments so click on the show advanced options part over here you'll be able to add individual attachments as individual files or we can directly pass an array by clicking this icon so now accepts the input as an array and we'll directly pass the variable over here now that's so handy yeah an email action is ready now man that saves a lot of time than having to do content and name and content and name for each file I see now I see now why the variable in the array and the in the apply to each this is genius I love this because the reason is like we are providing with the option of attaching three files but it not does not necessary that they'll attach three files it might be two or it might be one it's dynamic so you want it to be like that love it and then now we'll add a scope control to put all these actions into the scope the scope is just a group it's the way you group things together and organize you and this scope is basically catering to our multiple attachments problem that we're trying to solve the problem is to check if the if not if there was no attachments provided so for that I'll add a control action over here which is condition and then here we'll type empty because we want to check if the response returned as MD for the IDS question you and I'll select the IDS over here so it will populate the question for me and then okay now we want to check if it is equal to false so I'll write false here so now that if if this the empty expression returns with a boolean value if the empty is true we do not want to go into the attachments loop so we'll directly send an email stating that there was no attachments provided but if it has false which means there are attachments we want to go we want the flow to go into the scope well pull this open put it in the S branch here nice that's so clean it saves you saves you time on your flow also saves you four runs you don't have to be iterating over files that you know you don't need that's fantastic another send an email action here so that we notify the admin that ok the form has been submitted but without attachments so that they can reach out to the person and check with them nice this is a spins it's really handy to be able to do multiple you know it's it's I couldn't believe how many people asked this same question and so I I'm I'm confident that this video will be a hit everybody's gonna be very happy about this one I mean I revise my blog like three times including all of these so gotcha yeah this has been early so now that our flow is ready it's time to test I'm going to test it from a previous run because we have the attachments provided over there here even test you you nah yeah all right so it was successful Oh shake be lanced so as we had attachments in the red as true and then it went into the scope where it extracted both the files from the onedrive folder and then it sent in the email so now let's check the email as you can see over here it has sent a new email saying that one new form has been submitted by the name and Department and these are the screenshots from my system that I uploaded so here we have tea files as well there is awesome there is awesome too two birds one stone how to solve multiple attachments and how to do a check and make sure that you don't have empty attachments this is this is awesome man and I love how how quickly you're able to put this stuff together and how easy you make it look like I said before this is awesome right so let's quickly check also the empty attachments part okay so here right now what we have is like the IDS question is a complicity one so we are going to edit the form first you and then make it as a non-required feel that keep you now so it's not a required item now I'll fill the form again it's this put Yosh and a charger and submit so if I come back to my flow this was the second run so as you can see the inputs like it has evaluated the expression as false because there were no attachments and it sent an email stating that okay this person has submitted a new form but there have been no attachments and here on my email box I can see the same that okay a new form has been submitted but no files have been attached with the form nice Brad good work man this is awesome and like in like in a 15 minute video - yeah awesome yes thank you so much for coming and joining us again for answering this big question for the audience I know they're gonna love it and for you guys at home be sure to go and follow yeahshe kid on his Twitter get on his blog go and talk to him in the community where he is a super user on both sides apps and automate he's everywhere and and he's very very willing to help you solve things and so if you need help put your question in the community tag him there's a good opportunity you'll get a response so yes man one more time thanks so much for coming and joining regularly and sharing your knowledge man really appreciate all you do for this community thank you so much John thank you so much for providing the opportunity my pleasure all right you guys know what to do click like click Subscribe go and follow Yosh right away and all the places and that's it much love from me I will see you in the next one you
Info
Channel: Jon Levesque
Views: 10,180
Rating: 4.9595962 out of 5
Keywords: jon levesque, jon levesque microsoft, microsoft flow, power automate, microsoft forms and flow, microsoft flow tutorial, jon levesque youtube, power automate tutorial, ms forms, forms and flow, microsoft forms, microsoft flow for beginners, microsoft forms tutorial, microsoft forms advanced features, microsoft forms power automate, microsoft form, power platform, power automate approval attachment, office 365
Id: kNC8q6NzBEc
Channel Id: undefined
Length: 16min 34sec (994 seconds)
Published: Tue Jul 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.