cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cassiedouglas
Level: Powered On

Help with Forms and flow

I am trying to create a flow with Microsoft forms. So when they fill out the form it sends them a copy of the responses and a copy to their supervisor. Can anyone help?

5 REPLIES 5
Super User
Super User

Re: Help with Forms and flow

Hi @cassiedouglas

 

In my example I've started off with a "When a new response is submitted" trigger which should come as no surprise as that's the only trigger. I've then gone straight into the Get Response Details action and selected my Form from the drop down. I then need to provide it with the Response ID which is buried down in the body of the response. 

 

You have two options as to how to get the Response ID, you can use the dynamic text which, because of the object which is returned from the trigger, will put an Apply to Each loop in your Flow. It will only return a single item each time, and you can include your Send Email action within the loop.

 

If you want something a little bit tidier, you can use an expression to extract the Response ID from the body so that you don't have the loop. This is what I have done in my example below. The expression I have used looks like this:

 

triggerBody()?['value'][0]?['resourceData']?['responseId']
 
triggerBody() refers to the output from the trigger
?['value'][0] says that from the array of values that is returned, only give me the first one (there's only one anyway)
?['resourceData'] picks out just the resourceData object which contains the respondId
?['responseId'] selects the json item in the resourceData that I want to use.
 
This will give me a response id e.g. 1 which I can then use to get the response details.
 
From there I can compose my email and select the questions from my response and format the email as I see fit.
 
I hope that helps.

 

FormsResponse.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





cassiedouglas
Level: Powered On

Re: Help with Forms and flow

Awesome it worked! Is there a way to automatically email a certain person based on answers to the questions?

Super User
Super User

Re: Help with Forms and flow

Hi @cassiedouglas I'm glad that worked for you.

 

Yes, absolutely. There is an control called "Condition" which allows you to validate a criteria to produce True/False (yes/no) and then you can perform two branches of logic.

 

E.g. If Rating is equal to 5: email The Boss, otherwise delete the response

 

Alternatively if you wanted to have multiple legs, then you can use the Switch control which allows you to define multiple courses of action from a single comparison.

 

E.g.

Rating = 1: Send email saying you're fired

Rating = 2: Send email saying you need to try harder

Rating = 3: Send email saying you're doing well etc





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





cassiedouglas
Level: Powered On

Re: Help with Forms and flow

Thank you so much @MattWeston365  ! I think I only have two more questions. One is there a way to make the responses into a pdf to add as an attachment to the email?

 

And Lastly- I would like it to be a flow of response happens on one form and it goes to a specific person depending on an answer- I got that far thanks to your help! Now I want them to fill out another form that will start another chain. I get how to set that up but is there a way to let me know if they do not fill out the form? Or to send them reminder emails to fill the form out? 

Your help has been awesome and I appreciate it!

Super User
Super User

Re: Help with Forms and flow

Hi @cassiedouglas I'm glad that you're getting there with your solutions, what you're doing sounds quite cool.

 

For #1

 

I think you'd need to use the populate word document template action, and then convert it to a PDF. I've not tried this personally (yet, but it's on my list), but you can find more info here:

https://flow.microsoft.com/en-us/blog/generate-word-documents-in-your-flows/

 

For #2 I would consider having a SharePoint list created so that I can track when someone was sent a Form to complete, and when it was completed. You can set up another Flow using the Recurrence trigger to check on a routine basis to see if the completion date has been populated. If not, send them an email to remind them.

 

I hope that helps, and I'd be interested to see how you get on with the Word Online actions. I might actually try them myself during my lunch on Monday, so if I get there first, I'll let you know Smiley Happy





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





>