Need some help creating a dynamic form with multiple flows

Occasional Visitor

Hi all,


I run a Welfare Centre where we have several forms, I would like to create one form for different flows using branching. Then use several flows to do different things


Form, they select from the following:


1. Request a pass - leads to gym,car,hall pass - they selected and it emails them the pass

2. Submit a question - leads to selecting a department - then it emailed to that department

3. submit a complaint - then they type the complaint-then it is emailed to a person



I am happy with the emailing information bit. I just have not got a clue how to do the email attachment. Can anyone advise please


1 Reply

@Mick_gibbons1 you don't need multiple flows, you can do this with a single flow.


The first question in the form would be a choice "What do you want to do?" with the answers Request a pass, Submit a question and Submit a complaint. You'd then use branching to appropriate follow-on sections/questions depending on what answer is selected.


In your flow you'd start with the "when a new response is submitted" trigger and "get response details" as the first action.


The next action would be a Switch control which is a type of condition that just looks at what the answer to the "what do you want to do" question equals. You can have up to 27 "cases" for each switch: in case the answer equals Request a pass then you add those actions. In case it equals Submit a question then you add those actions in and so on. An example of a switch based on the department is shown below:



So if the user had selected submit a question you could have a condition (or another switch nested inside the first one) that has a send an email action that sends it to the department selected.


Email the pass. Make sure you are inside the case channel for request a pass. My example is for a workshop survey and the first couple of actions get the date the service took place and convert that date to UK format (for correct format in the PDF). I'm adding a logo into the email and PDF so the next action is to get that image:



Next you need to create an html file with the details to go into the pass. So add a OneDrive for Business Create file action. Because I have added the logo in I have clicked the </> code view button at the top of the file content field and then added html tags. For the filename make sure you add the .html extension.




Next, convert the html file to a PDF:





Next, create the PDF (if you want to keep a copy of it on your OneDrive, otherwise you can omit this step)




Finally, add a send an email action and for the attachment select File name and File content from the convert file using path section of the dynamic content box.


 When the form is submitted, it sends theemail with the PDF attached.






So you could use this as the basis for sending a pass to the person with the details they submitted. Don't forget, all the actions above are in the Request a pass channel of the switch case. You would add other actions into the other case channels for the other 2 cases.


Los Gallardos
Microsoft Power Automate Community Super User