cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Flow is sending email for same mail id

Hi Team,

I am using Power Automate from Power Apps using JSON, I have a collection in Powerapps.

I am attaching the collection and sending as csv file to the end user who ever fills the details in powerapps.

My collection is collecting user name into my collection.

As I have 12 questions to answer for the end user, as the flow triggers email is going for 12 times for same user as its lopping for same email id,

Please help me to resolve it.

image.png

My collection Items.

image.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous 

 

Thanks for the screen share. So this is what we did.

 

1. Create CSV table using custom option so that you can specify each column. The expression we used is item()?['Question'] and so on.

2. Next to get the email another expression used under a compose

   body('Parse_JSON')[0]['User_Email']

 

Finally mapped the outputs under the send email step.

 

Hope it was helpful.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

9 REPLIES 9
abm
Super User
Super User

Hi @Anonymous 

 

Could you please post a screenshot of your flow above the apply to each loop? Ideally you need to use a HTML format or plain text to construct the email body which contains all the responses. Finally outside the loop use the send email step and map the dynamic variable which contains the responses under the email body.

 

Thanks

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

@abm ,

Here are the screenshot,

image.png

image.png

 

Please help me in detail.

Hi @Anonymous 

 

Thanks for your reply. Declare a variable outside the loop. Then append the variable inside the apply to each loop with your responses. Finally outside the loop use the send email and map the new variable inside your email body.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

@abm ,

Thanks for the reply,

Can you please share the screen shoot, as I am new to power automate.

Please

Could you post a sample collection of your JSON data?

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

@abm ,

Here is my Json.

With(
{
_jsondata: ShowColumns(
AddColumns(
Gallery1.AllItems,
"_Response",
TextInput1.Text,
"_Others",
TextInput2.Text,
"Clinet_Name",
Dropdown1.SelectedText.'Client Name',
"User_Email",
Label14_1.Text
),
"User_Email",
"Clinet_Name",
"COSO_x0020_Principle_x002f__x0020_TSC_x0020_Ref",
"Category",
"Question",
"Additional_x0020_Guidance",
"_Response",
"_Others"

)
},
SOCAssessment.Run(
JSON(
_jsondata,
IndentFour & IgnoreBinaryData
)
)
);
ForAll(
Gallery1.AllItems,
Patch(
Responses,
Defaults(Responses),
{
Date: Today(),
User_Name: Label14.Text,
Client: Dropdown1.SelectedText.'Client Name',
COSO_x0020_Principle_x002f__x0020_TSC_x0020_Ref: Label2.Text,
Category: Label3.Text,
Question: Label4.Text,
Additional_x0020_Guidance: Label5.Text,
Response: TextInput1.Text,
Other: TextInput2.Text
}
)
);
Navigate('Success Screen');

Hi @Anonymous 

 

Thanks for the screen share. So this is what we did.

 

1. Create CSV table using custom option so that you can specify each column. The expression we used is item()?['Question'] and so on.

2. Next to get the email another expression used under a compose

   body('Parse_JSON')[0]['User_Email']

 

Finally mapped the outputs under the send email step.

 

Hope it was helpful.

 

Thanks



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

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Anonymous
Not applicable

@abm ,

Thanks alot !

Appreciate your help and time !

This solves my problem, your a super user !

Cheers !!! 

Anonymous
Not applicable

@abm ,

Thanks again for helping me on fixing the /n issue, as my flow output was not pasting next line value, @abm  helped me to solve the issue, thanks ! again !!!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,956)