web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / create a button in pow...
Power Automate
Unanswered

create a button in power bi with automation

(0) ShareShare
ReportReport
Posted on by 22

I need to create a button in power bi with automation where I send an email with the data of an array. I have managed to do it but manually putting the mail where it is sent but what I want is that according to the depower bi filter, it collects a value (mail) and sends it to that address.
As seen in the screenshot, it sends the table correctly to the sender. I have tried to replace the parameter "A" (from outlook) with the mail field of power bi but that creates a loop that sends that mail as many times as there are rows in the table.
I attached a screenshot of what I have.

 

peya02_0-1666353716547.png

 

Categories:
  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at
    what I want is that according to the depower bi filter, it collects a value (mail) and sends it to that address.

    That would only work if the email address were part of the data table that you hand over from Power BI to your flow when the user clicks the button.

  • peya02 Profile Picture
    22 on at

    I don't quite understand what you're saying. Do you mean the table where I have added these fields?

     

    peya02_0-1666592279187.png

     

     

    Anyway, if in the same report I have another alternative table with only name and email, would it work? I don't know how to tell the action "select" the table I want as a data reference.

  • peya02 Profile Picture
    22 on at

    I'll explain a little because I don't know if you finish understanding.
    To go by steps, if I automate button for the following table, there is no problem:

     

    peya02_0-1666595564440.png

    The issue is that this table is all summarized, that is, the CEF group groups several lines where the clients that belong to it come out. The following table is the one I want.

     

    peya02_1-1666595582952.png

     

    The thing is that, if I make the button with the first table, including the fields exactly the same both in the table and in the button, the mail sends it correctly to an address, the one that appears. The problem is good with the second table, because the mail sends it repeatedly in a loop, and what I would like is to send only one mail with that table.

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    That's exactly what I mean.  You cannot have two "source tables".  All your required data must be transported from Power BI to Power Automate in the same values well of the Flow visual.

  • peya02 Profile Picture
    22 on at

    Correct, the source data is already fixed. I can create an Excel from the power bi table, but as I say, the problem is not with that, but with reporting that table in an email.

    The table that is automatically created in an Excel is like this:

     

    Codigo

    Cliente

    Ciudad

    Correo

    Importe

    110641

    Ejemplo1

    MALAGA

    albert@g.es

    404.55

    110659

    Ejemplo2

    MALAGA

    albert@g.es

    846.99

    134061

    Ejemplo3

    MALAGA

    albert@g.es

    317.47

     

    Now, just after creating the Excel, I want to send a single email to the address that it puts in the table, but not send the email three times (which is what it does to me now), but only once.

    Thanks.

     

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    This is good.  Create your Excel table from the columns of your data source, minus the Correo column (via Compose, for example).  Then grab the email address from the first row of your data source (row 0) or via aggregation (min or max value) .

    Finally send the email .

  • peya02 Profile Picture
    22 on at

    Hello,
    I don't quite understand the process you're talking about. If we compile step by step, now I have to click the button to create a table for me, in this table there are a series of columns including the mail column (you say not to add the latter).
    Later I get lost in the first row option that you comment on, how do I tell it to take the first row of the data source? And even telling it the first row, how do I tell it to be the mail column?
    As you comment, I don't have to add the mail column to the table, I don't know how I would get the mail if it isn't in the table.
    Thanks.

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    Let me create a proof of concept based on your sample data.  I hope I can find time this week for this, as I might  need something similar for one of our processes.

  • lbendlin Profile Picture
    8,726 Super User 2026 Season 1 on at

    Here is a crude version of the flow - but it does what you need.

     

    lbendlin_0-1666830637115.png

     

  • peya02 Profile Picture
    22 on at

    Perfect, it works very well, it sends me the email I want with the data.
    One thing that doesn't work correctly is, I also write this data in an xlsx and then send the file, well I don't know why it happens but it only sends me the xlsx with the first row of content, but if I look at the xlsx it creates , there are many more.
    Attached as I collect data.

     

     

    peya02_2-1666872675608.png

     

    Thanks

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 432

#2
11manish Profile Picture

11manish 313 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 154

Last 30 days Overall leaderboard