Microsoft Forms Responses & Attachments to Automated Email Using Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up YouTube Welcome Back to the sigma engineering Channel today we're talking Microsoft power automate and Microsoft forms so what we're going to do today is just go over the basics of Microsoft forums tie it to a SharePoint team or SharePoint site so folks can upload files and those files get automatically emailed to a manager or whoever via Microsoft power automate hopefully this video uh helps you if it does please like And subscribe see you after the jump all right if you haven't done so already log into Microsoft Office 365 and hit the waffle in the top left go to forums and once you're in Microsoft forums you can create a new form by hitting the plus button but also on the bottom you'll see your teams or groups that you're a part of um and so here I have a Microsoft team I'm going to create a new group form and that's a bit different as it's tied to that team or group and this is really nice because any uploads go to the SharePoint site or the group the file folder that's attached to that team or group so I'm just gonna you know title this Microsoft Forum whatever you want I might make a a base basic incident form here and then add a few other columns as well plus an area where folks can upload files foreign add new here I get some choices I'm gonna hit the arrow and click upload file so I can put a title here and then it's automatically going to give me a place where I can upload files I can also put a file number limit here and a file size limit there's three choices on the on the size limit it's 10 Megs 100 or a gig and then for the file number limit you can go greater than 10 files up you can go crazy with it overall if you upload files through Microsoft forms it's going to attach in your SharePoint site however we're going to automate this to automatically email it and there's also some cool ways to specify perform with different looks as well on preview and just put in some information test this form out condo and then I'm going to upload a file just a test image once that is uploaded I'm going to click submit so if I click on responses on the tab above you can see that there is one response now I can view the results and I can see the file that was uploaded there and this is just a test image file I want to make sure I'm logged in here and you'll see this test image that I have but I do want to show that on the SharePoint side itself there's a folder called apps if you look in there and then you click on Microsoft forms here is the issue reporting form and you're going to see a folder called question and you'll see where that test file was uploaded and you can see it again in your SharePoint site all right off to power automate once you're there you can click on my flows see the current flows that you have you can also click on templates on the side there and there is a good template to get started with Microsoft forums and you'll find it and it's going to be send an email response and you'll see it's attached to Outlook it'll have all your permissions for your flows and just hit continue and then it'll have a template that pops up and basically what this is doing is it's asking all right what form do you want to tie to if you don't see your form here just enter a custom value so if we go back to forms and we find our team group form it's the issue reporting form if you look in the link above you will find that there is a design and ID and then it says equals and then it has a chain of letters and numbers if you copy that that's your form ID and you just hit enter custom value and just copy paste that form ID so it needs to know that when a new response is submitted from that form it's going to get the details from that form and then it's going to do some other stuff to simplify this I'm just going to pull you can drag and drop stuff in power automate I'm going to pull the send an email up here I'm going to delete that if statement and then I'm going to make sure that you know once it pulls the response details it's going to send them to for for this example I'm going to send it to myself um and then we're going to make sure that this subject is right so it'll have the submission time there and also we can change what's in the body of the email as well I recommend saving your flow at this point make sure you see the green bar that says successfully saved if you click on my flows you're going to see the flow you just created it is running in the cloud and from this point you can see all the details of your flow if you click on edit you can get back into Microsoft power automate and edit this automation flow so we can create it so it emails you all the attachments from that form again make sure that all your Dynamic content in your email is what you want I'm going to add the answer to the question of your name so I know that you know who actually put the form in so I'm going to say from all right and then it's going to have the name of the person who submitted the form and uh from here we're just going to hit the little plus icon above send an email and we're going to add some more logic to this flow what we want to click on is add an action and then we're going to choose an operation we want to select initialize variable you can search that or find the subject variable and click initialize variable and for this variable name you can make it anything uh their variable files will work just make sure it's an array because we're changing a string to an array here and then we're going to insert a new step after we're done building that array and it's going to say choose an operation and for this one if you just search apply you want to find apply to each and then for the output from previous step click on expression instead of dynamic content type in Json put your parentheses here and in in those parentheses go back to Dynamic content find issue files so make sure that the file is uploaded are attached and then we're going to add another operation we're going to say get file content using path [Music] and then for this one for the site address just make sure it's tied to your SharePoint site that's tied to your team or group and then for file path instead of dynamic content use expression and type in item and then have parentheses put a question mark there and then in Brackets put in link this is going to link the file content within that array and then within the email if we go down here and we look at more options we look at attachment we can see attachment name and attachment contents this is also a button in the top right here that will change it to an array but first let's test this if we put in attachment name for name and attachment content for the content itself and then we click on the array button in the top right there that's tied to attachments if we do that then we'll see the script that forms an array so we'll see the format that power automate wants this in we can actually copy this and take it up above and under apply to each under get file content using path if you just click add an item add an action there and then we're going to choose an operation again and for this one we're just going to search a pen to array and we're going to append this variable to an array which array it's the one we made called bare files and for the value we're just going to paste that in there and instead of attachment name let's change that and if you just hit expression there we can type in item parentheses question mark and then type in name if I can type right and then from there hit OK and put that expression as the name as the item name and then for Content bytes this is literally the attachment so if we go back here again scroll down and dynamic content find file content that's the content of the file we want to attach get that in there and then just remove those two brackets on the top and bottom to make power automate happy with that expression and then from there you can save it and keep on rolling so at this point we've appended the files to the array that we've made called verifiles and now for attachments make sure you switch that to array and then actually add that verifies expression right so it's sitting there that variable just attach that and so the subject and content is in that array it's going to be an attachment to the email for whatever we upload in the Microsoft forms document and at this point we're ready to test it out so make sure you save it make sure you see that green bar and go to preview on your form let's just type in a name and upload some files here so what we're going to do is we're going to use that test image file it's a JPEG we're going to hit submit once we do that it'll say thanks and we'll see that we have an email now it's automated has the attachment um so if we look at this again and we try this one more time let's John John Doe for the name and let's attach an Excel file this time let's hit submit here it's going to say awesome but then when we go to my flows and you scroll down you're going to see that it failed and this is because the excels don't actually work right off the bat when attaching to that array so if we go back to edit we can fix this up under append array to variable go to configure run after and then click has failed so even to get file content using path fails it'll still attach it this way when we test it and we attach an Excel file it'll now work so let's do another test upload our test Excel document if we hit submit here um we can go back to our flows and we'll see it was successful this time and here's an example of the email you get with that attachment so now back to the forums what if we want to add a choice and we want someone to say okay well who's your manager so we can specifically email that manager I'm going to have two options for this example we could just do Michael Scott and Jim and if we attach that as a question we can actually go in power automate and specify based on what they select we can email a specific person it's all you have to do informs is just drag and drop where you want these questions someone make that question two and then for the last question we'll have that file upload of course you can change the number of files you can upload so I'll change it to two files and I'll increase the size limit as well so now that we have these choices we can go back to Power automate we can edit the flow we just made and there's not much to change here we're just going to add some if statements you know we're still going to initialize a variable and then for each attachment we're going to attach it to the array and then attach it to an email so everything still stays as is but then when we get near the bottom here right before I send an email just click add an action and then we're going to add a control here so if you search condition you're going to find that control for a condition and then choose a value just find that question who's your manager find that Dynamic content put that in there if it's equal to and then you can just type it in Is It Michael Jim whoever it is and then if yes make sure you send an email to Michael and do the same thing with Jim all right [Music] again add another step add a control condition and then again choose that question who's the manager and then that gym [Music] be sure to add the attachment their files make sure that's in that email as well and then this is the email that's going to go to the gym so it's going to be a different email in the two and then once those are both in there just hit save and then based on who we select in the form it should email two different people all right so back to forms and if we go to forums we can click Michael Scott upload some files here I'm going to upload two files an image and an Excel file I'm going to hit submit that looks good I'm gonna do it again just another test with Jim upload to files again an image and an Excel file just so we can put it through its Paces hit submit and then once we check our flows we're gonna see that both were successful there and then when we go to our emails the two different emails we're gonna see that everything is attached where it needs to be and we have both attachments and from that we've covered the basics of Microsoft forms tying into Power automate and doing email attachments if you found this video helpful please like And subscribe it helps the channel and comment on any other stuff you want to see with power automate or Microsoft forms thanks for watching
Info
Channel: Sigma Engineering
Views: 2,122
Rating: undefined out of 5
Keywords:
Id: mYblnRqu6Z4
Channel Id: undefined
Length: 16min 16sec (976 seconds)
Published: Thu Apr 06 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.