cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kona
Level: Powered On

Flow sending mutiple emails as opposed to sending just one

I run into an issue when I create scheduled alerts via Flow - it fires multiple alerts instead of just one.

 

Configuration of the alert is as follows:
1) Recurrence: once every 15 minutes.
2) Azure Kusto connector runs a query;
3) It is followed by a condition which should fire if the number of errors is greater than 0;
4) If there is an error, it runs a Kusto query which summarizes results;
5) Sends an email via Outlook 365.

 

For unknown reason, if there are errors detected, Flow fires multiple emails (ehese emails are identical, they contain exactly the same results).

I have a guess  - it appears that the number of emails depends on the number of the errors, e.g., if there are 8 errors then Flow will send 8 identical emails.

 

Please help!

 

flow_wtf.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Flow sending mutiple emails as opposed to sending just one

Hi @Kona ,

 

Could you share a screenshot of the Flow configuration?

I speculate that the location of the Send email action configuration caused this to happen.

 

This is most likely to happen if you configure Send an email action in a Control like Apply to each or Do until.

You could consider using Filter array to filter out the errors, then use length() function to determine the length of the array after filtering. If it is greater than 0, send the message.

Image reference:

17.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

2 REPLIES 2
Community Support Team
Community Support Team

Re: Flow sending mutiple emails as opposed to sending just one

Hi @Kona ,

 

Could you share a screenshot of the Flow configuration?

I speculate that the location of the Send email action configuration caused this to happen.

 

This is most likely to happen if you configure Send an email action in a Control like Apply to each or Do until.

You could consider using Filter array to filter out the errors, then use length() function to determine the length of the array after filtering. If it is greater than 0, send the message.

Image reference:

17.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

Kona
Level: Powered On

Re: Flow sending mutiple emails as opposed to sending just one

Hi Barry,

 

Thanks for the reply. I don't think it's the location of the Send button that was causing this - I have tons of simiarly configured alerts and there were no similar issues with them.

 

This is how the alert is configured:

 

flow_up.png

P.S. Delay is one of the latest additions, I've aded it recently hoping it would help (it did not 🙂

 

Please note, I may have solved the problem by simplifying the first query where I added summarize and count() just one event.

 

Thanks for the advise about length() fucntion, I will try to use it should the issue reoccur.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,897)