cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
techtudoor
Resolver I
Resolver I

Multiple emails sent with Send an email (V2)

I have 2 flows that I have working but, am receiving multiple emails on each run. The first flow copies data from a SharePoint list to an Excel file that is stored on the SharePoint site. Once this flow runs, I have another flow that sends an email and attaches this Excel file, when it is updated. The problem is, when the flows run, 2 emails are sent. The attachment in the first email only contains 1 record, the second email attachment contains all the records. Has anyone else experienced this issue? How can I stop the first email from being sent and just have the second email sent that has all the records?

3 REPLIES 3
jdoss
Resolver III
Resolver III

If you could send screenshots of the flows it might help. It seems like you have a loop somewhere.

@jdoss see screenshots below. Thank you for your assistance

 

 

First flow

 

techtudoor_0-1611604180119.png

 

techtudoor_1-1611604180126.png

 

techtudoor_2-1611604180131.png

 

techtudoor_3-1611604180136.png

 

 

 

 

Second Flow

 

 

techtudoor_4-1611604180137.png

 

techtudoor_5-1611604180143.png

 

techtudoor_6-1611604180150.png

 

jdoss
Resolver III
Resolver III

That doesn't quite give enough insight. What is the initial trigger in the first flow? It's possibly triggering twice. You could check your run history and see if it is running multiple times with each trigger or if it's sending the email multiple times. If it's just the email then you have the send email in an apply to each that is getting called more than once. If the flow is running multiple times then your trigger is the issue and whatever is calling it may be the issue. It could also be that the trigger of the second flow is being called more than once (the file is created and then it is modified calling itself again). You may want to add a boolean in the list itself called mailSent or something and use it to tell whether or not your email has been sent.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,059)