cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ramaseko
Regular Visitor

Flow to send email based on responses in forms

Hi Community.

 

I am trying to build what I thought would be a simple flow. I have a form with 4 questions where if any responses to Question 1-3 is a 'Yes' and business alignment selected in Question 4 is Sales it sends email to sales@company.com,  if marketing send email to marketing@company.com  and finally if production send email to production@company.com

 

Unfortunately looks like I cannot attach anything on here but below is how I have built the flow:-

 

When a new response is submitted

*form id: Conflict of Interest

 

Apply to each

*Select an output from previous steps

Response Id

 

Get response details

*Form Id:   Conflict of Interest

*Response Id: Response Id

 

Condition

A family member is part of the business is equal to Yes

Any interest in dealings etc is equal to Yes

Do you hold any shares in the business is equal to Yes

Business Alignment is equal to Sales

 

If Yes

Send an email (v2)

 

When I run the flow I get the following error - any ideas?

 

 

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/resourceData/responseId']' is of type 'Integer'. The result must be a valid array.

 

1 ACCEPTED SOLUTION

Accepted Solutions
fcasta308
Frequent Visitor

Please let me know if this is sort of where your idea is at:

 

You have an MS Form with four 'Yes or No' questions. If questions 1-3 are "Yes", then an email would be sent to the right email address depending on the answer of question 4? If so, please try this flow:

 

fcasta308_0-1604626702676.png

 

Let me know if that works for your form.

View solution in original post

2 REPLIES 2
fcasta308
Frequent Visitor

Please let me know if this is sort of where your idea is at:

 

You have an MS Form with four 'Yes or No' questions. If questions 1-3 are "Yes", then an email would be sent to the right email address depending on the answer of question 4? If so, please try this flow:

 

fcasta308_0-1604626702676.png

 

Let me know if that works for your form.

View solution in original post

Thank you very much fcasta308

 

This works perfectly!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,386)