cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raks3
Helper IV
Helper IV

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 @raks3 

 

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 blogPower Automate Video Tutorials

View solution in original post

9 REPLIES 9
abm
Super User
Super User

Hi @raks3 

 

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 blogPower Automate Video Tutorials

@abm ,

Here are the screenshot,

image.png

image.png

 

Please help me in detail.

Hi @raks3 

 

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 blogPower Automate Video Tutorials

@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 blogPower Automate Video Tutorials

@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 @raks3 

 

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 blogPower Automate Video Tutorials

View solution in original post

@abm ,

Thanks alot !

Appreciate your help and time !

This solves my problem, your a super user !

Cheers !!! 

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,449)