Skip to main content

Notifications

Power Automate - Using Flows
Unanswered

My flow is sending more 1 email

(0) ShareShare
ReportReport
Posted on by 50

Hi,

 

New in the community 🙂

I am trying to set up a feature that send email from power bi application.

i am displaying in a screen the collection amount per month and year and in another graph, i am displaying the repartition by clients
In power automate, i would like to send an email that contains :
- User
- Year

- Month

- Client

- Collection Amount

 

Currently i am receiving the right email, but i am receiving 11 times (11 clients for the test user)

How can i correct it ?

 

Thank you,

Avy

  • Pstork1 Profile Picture
    Pstork1 64,722 on at
    Re: My flow is sending more 1 email

    Take another look at the BLOG post.  To get just one email per account you need to run the loop on the individual emails, not on the Power BI data.  then filter the data using the email for the current loop and use that to create and send the HTML table to that one email account.  It doesn't look like you included the stuff to get the unique list of email accounts like I did in the BLOG.

  • menphis Profile Picture
    menphis 50 on at
    Re: My flow is sending more 1 email

    Hi @Pstork1 ,

     

    I tried to include all the step inside the Apply to each , that means after the array function, and i still got 2 emails with the two partner inside.

     

     

  • Pstork1 Profile Picture
    Pstork1 64,722 on at
    Re: My flow is sending more 1 email

    Then there is a problem with your Filter Array action or you aren't generating the HTML table out of the results of the filter array action.  that's why my sample uses the Parse JSON. Because after filtering you don't have access to the individual columns in the result. So I suspect you are filtering but not using the results of the filtering to create the HTML table for the email.

  • menphis Profile Picture
    menphis 50 on at
    Re: My flow is sending more 1 email

    I cannot use the output of the array as your post, because it will send real emails. so i am using my User email.

    But i will simplify the problem, lets remove the client field :

    I Have a graph that shows amount per partners and lets suppose that i select 2 partners that seems to have weird amounts :

     

    YearMonthPartnerEmailAmount
    20231AA@email.com10
    20231BB@email.com10

     

    With my flow, its sending 2 email, 1 to Partner A and one to Partner B with these html table :

     

    YearMonthPartnerEmailAmount
    20231AA@email.com10
    20231BB@email.com10

     

    I want just to filter the data for each partner concerned , that means 
    For Partner A, should receive :

    YearMonthPartnerEmailAmount
    20231AA@email.com10

     

    and partner B should receive :

    YearMonthPartnerEmailAmount
    20231BB@email.com10

     

     

    Hope that would be easier for me to solve it

    Thank you

  • Pstork1 Profile Picture
    Pstork1 64,722 on at
    Re: My flow is sending more 1 email

    Did you use the output of the Filter Array statement in the first run to generate from sample the schema?  There should be a lot more to the schema then what you are showing.  What does the output of your filter array look like? And what does the array you are running the loop on look like?

  • menphis Profile Picture
    menphis 50 on at
    Re: My flow is sending more 1 email

    Following the same steps as the blog, it doesn't work.
    in the email it still displays 2 partners. attached the screenshot 

  • Pstork1 Profile Picture
    Pstork1 64,722 on at
    Re: My flow is sending more 1 email

    The schemas are dependent on your data so there is no way for me to design them for you.  Run the flow once and take the output of the filter array and paste it into the button that generates the schema for you.  This short video shows how to do it.

    Power Automate - Parse JSON - How to get the Schema (Easy Method) - YouTube

  • menphis Profile Picture
    menphis 50 on at
    Re: My flow is sending more 1 email

    Hi @Pstork1 ,

     

    Thank you. Can you send me schemes to help me, i am not knowing power automate and cannot understand well if i dont have scheme to order the steps.

     

    I tried this but still doesnt work.

    If you can copy my screenshots and write on it, it would be easier.

    Sorry to ask this thanks

     

  • Pstork1 Profile Picture
    Pstork1 64,722 on at
    Re: My flow is sending more 1 email

    In your case you might not need the Parse JSON.  Instead you will run the Data Select twice. Once to get just the partner that you want to email the way you are doing it now. And the second time the way you did it in your original to get the information you want to include in the rows you send in the email.  The first Data Select is just to get a list of unique Partner emails. Then inside the loop you filter the second Data Select by partner to get the rows for that partner and send out the email on that data. Then loop to get the next partner.

     

    You only run the Parse JSON if the HTML table puts everything into one column after the filter array. If it does you add the parse JSON to get access to the individual columns after you filter.  The first time you run it use {} as the schema.  Then you can take the output from that run to generate the actual schema.

  • menphis Profile Picture
    menphis 50 on at
    Re: My flow is sending more 1 email

    Hi @Pstork1,

     

    Thanks for the blog post. I am trying to apply the step but in the step of Parse JSON, i cannot run it because it didn't gave to save and apply (I am from power BI).

    what do i need to go one ?

     

    I attach the flow with the expression inside, hope it will be helpfull

    Thank you for your precisous time

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard

Featured topics

Restore a deleted flow