cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Siavauch
Level: Power Up

Approval - how to add the form into the mail sendt for approval

Hello.

 

I am quite new in this.

I have set up an approval flow (called "Send form responses for approval") with a basic form that users fill up and submit for review.

 

The goal is that once someone is submitting the form, the results are sent to the approver along with the approve or reject buttons.

We use Office 365 in SharePoint with a site that has a list where the results for approval / reject are stored.

 

My main issue are:

1- How to have the results of the submitted form sendt along the approval request email to the approver?

2- Whether the approver clicks on approve or reject, the result is displayed as reject in the sharepoint list.

3- How is it possible to retrieve the result of the form for each results displayed in the sharepoint list?

 

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Approval - how to add the form into the mail sendt for approval

Hi @Siavauch,

 

Could you please share a screenshot of your flow's configuration?

Could you please show a bit more about your SharePoint list?

Further, do you create your form within Microsoft Forms?

 

I suppose that you created your form within Microsft Forms, is it true? I have created a SharePoint list on my side and the data structure of it as below:7.JPG

Note: The Response Id column is a Single line of text type column, which is used to store the response id of the submitted form. The Responder Email column is a Single line of text type column, which is used to store the responders' email address. The Approval Result is a Single line of text type column, which is used to store the approval result.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When a new response is submitted" trigger.
  • Add a "Apply to each", input parameter set to output of the trigger.
  • Within "Apply to each", add a "Get response details" action, specify Form Id, Response Id field set to Response Id dynamic content of the trigger.

         Add a "Select" action, From set to output of the trigger, Within Map entry, enter three elements. The key of first element set to TaskName and the corresponding value set to TaskName dynamic content of "Get response details" action. The key of second element set to Executor and the corresponding value set to Executor dynamic content of "Get response details" action. The key of third element set to Due Date and the corresponding value set to Due Date dynamic content of "Get response details" action.

 

      Add a "Create CSV table", From set to output of "Select" action.

 

     Add a "Send email with options" action of Outlook connector, User Options set to following formula:

Approve, Reject

  Attachments Name field set to Response.csv and Attachments Content set to output of "Create CSV table" action.

 

 Add a "Create item" action, Response Id field set to Response Id dynamic content of the trigger and Approval Result field set to SelectedOption dynamic content of "Send email with options" action.

 

Note: I don't add a "Start an approval" action within my flow, because the result of the submitted form could not be converted as a table using the "Start an approval" action. In addition, I could not find the "Send approval email" action within the Office 365 Outlook connector, it seems to be removed. On my side, I add the "Send email with options" action within my flow as an alternative way and add the result of the form as a attachment file of the approval email.

 

Image reference:8.JPG

 

9.JPG

When the approval receives the approval email, the screenshot as below:11.JPG

The flow works successfully as below:12.JPG

 

If you want to retrive the result of the form for each results displayed in your SharePoint list, please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Apply to each", input parameter set to output of "Get items" action.
  • Within "Apply to each" action,  add a "Get response details" action, specify Form Id, Response Id field set to following formula:
items('Apply_to_each')?['Response_x0020_Id']

Image reference:13.JPG

The flow works successfully as below:14.JPG

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Approval - how to add the form into the mail sendt for approval

Hi @Siavauch,

 

Could you please share a screenshot of your flow's configuration?

Could you please show a bit more about your SharePoint list?

Further, do you create your form within Microsoft Forms?

 

I suppose that you created your form within Microsft Forms, is it true? I have created a SharePoint list on my side and the data structure of it as below:7.JPG

Note: The Response Id column is a Single line of text type column, which is used to store the response id of the submitted form. The Responder Email column is a Single line of text type column, which is used to store the responders' email address. The Approval Result is a Single line of text type column, which is used to store the approval result.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When a new response is submitted" trigger.
  • Add a "Apply to each", input parameter set to output of the trigger.
  • Within "Apply to each", add a "Get response details" action, specify Form Id, Response Id field set to Response Id dynamic content of the trigger.

         Add a "Select" action, From set to output of the trigger, Within Map entry, enter three elements. The key of first element set to TaskName and the corresponding value set to TaskName dynamic content of "Get response details" action. The key of second element set to Executor and the corresponding value set to Executor dynamic content of "Get response details" action. The key of third element set to Due Date and the corresponding value set to Due Date dynamic content of "Get response details" action.

 

      Add a "Create CSV table", From set to output of "Select" action.

 

     Add a "Send email with options" action of Outlook connector, User Options set to following formula:

Approve, Reject

  Attachments Name field set to Response.csv and Attachments Content set to output of "Create CSV table" action.

 

 Add a "Create item" action, Response Id field set to Response Id dynamic content of the trigger and Approval Result field set to SelectedOption dynamic content of "Send email with options" action.

 

Note: I don't add a "Start an approval" action within my flow, because the result of the submitted form could not be converted as a table using the "Start an approval" action. In addition, I could not find the "Send approval email" action within the Office 365 Outlook connector, it seems to be removed. On my side, I add the "Send email with options" action within my flow as an alternative way and add the result of the form as a attachment file of the approval email.

 

Image reference:8.JPG

 

9.JPG

When the approval receives the approval email, the screenshot as below:11.JPG

The flow works successfully as below:12.JPG

 

If you want to retrive the result of the form for each results displayed in your SharePoint list, please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Apply to each", input parameter set to output of "Get items" action.
  • Within "Apply to each" action,  add a "Get response details" action, specify Form Id, Response Id field set to following formula:
items('Apply_to_each')?['Response_x0020_Id']

Image reference:13.JPG

The flow works successfully as below:14.JPG

 

 

Best regards,

Kris

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 74 members 3,444 guests
Please welcome our newest community members: