Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Embedding graphs into Emails from Power Bi via Power Automate

Is it possible to embed a graph from Power Bi into an email via power automate? if so, how do I do it?

6 Replies

  • nryan688's avatar
    nryan688
    Regular Visitor

    This is posible 

     

    first you need to make sure the Power bi Tenant setting are enabled to allow you to export reports as images. This is usually maintained by your companies Microsoft support or IT.

     

    Once enabled you can start your flow.

     

    Start with a "Export To File for Power BI Reports" step and populate your

    1. Workspace

    2. Report

    3. Export format = PNG

    4. Page Name = Found at the end of your reports URL

    5. Visual Name - you can press F12 then seach for "visualsEnterhint" then brower until you see the visual you wish to capture. You will find a long alphanumeric code followed by the title of your visual. You want to copy the alphanumeric code. If you are not comfortable searching this way you can use this link to search the elements of your report. https://playground.powerbi.com/en-us/dev-sandbox

     

     

     

    Next you use a "COMPOSE" step with a Base64 function

    "base64(outputs('Export_To_File_for_Power_BI_Reports')?['body'])"

     

    Next you create your email "Send and Email(V2)". I use HTML format when I create this and it would look something this this.

     

    <p>Hello,<p>Below is this weeks chart reporting out defect per project</p>

    <p><img src="data&colon;image/png;base64,Outputs" width="350" height="200"/>

     

    Results. Weekly automated email including 3 visuals from different PBI reports

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      How can we add filters in this flow, I want to capture visuals based on different filters. For example one visual for one value and the other for different.

    • GanesaMoorthyGM's avatar
      GanesaMoorthyGM
      Helper II

      This is really helpful, I'm working in similar goal to achieve,
      I have Premium Per User whether I can Chieve this if I have Premium Per User or else Do  I need to have Premium per Capacity?

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    Currently Power BI and Power Automate doesn't have such an out-of-box feature. But I found an old thread from Power Automate community that many users provided their ideas and solutions to achieve a similar goal. You may have a look at the thread Embed Power BI image inside Flow email action - Power Platform Community

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    I am getting below Error .

    {"error":{"code":"FeatureNotAvailableError","pbi.error":{"code":"FeatureNotAvailableError","parameters":{},"details":[]}}}