0

I am trying to integrate my Power BI report into my Outlook mail through Power Automate. For this, I have created an action as 'Send email with options' from the suite of 'Office 365 Outlook'. In the mail body, I have used the below HTML code, where I have embedded by Power BI report.

Since the report takes some time to load, I have also added a delay using setTimeout () function. However, the resultant mail created is a blank mail, where the Power BI report doesn't get displayed.

I've tried out the following too:- 1. Altering the timeout duration 2. Embedding Power BI app instead of report 3. Converting the HTML into a PDF, and then sending that PDF through mail

However, nothing of these seems to have helped.

Kindly refer the below HTML code for the same:

<head>
<script>
window.onload = function(){
  var theDelay = 60;
  var timer = setTimeout("showText()",theDelay*1000)
}

function showText(){
  document.getElementById("delayedText").style.visibility = "visible";
}
</script>
</head>

This is a test

   <iframe width="1140" height="541.25" src="https://app.powerbi.com/reportEmbed?reportId=d27f0160-eb09-442b-a7ab-ded938ed33ec&autoAuth=true&ctid=971f0e31-00d6-4e42-b8e0-47b342bc4455&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXdlc3QtdXMtcmVkaXJlY3QuYW5hbHlzaXMud2luZG93cy5uZXQvIn0%3D" frameborder="0" allowFullScreen="true"></iframe>

Prakhar
  • 1
  • 1
  • 4
  • You cannot send HTML-Mails with JavaScript attached (https://stackoverflow.com/q/1088016/2692307). I'm also not sure if you can attach iframes. – Lukas Bach Feb 24 '20 at 10:38
  • And embedding Power BI reports is not only using the embed URL put in iframe. It requires some more programming (e.g. https://stackoverflow.com/questions/53532616/how-to-get-power-bi-dashboard-in-our-own-application/53536126#53536126) – Andrey Nikolov Feb 24 '20 at 11:13

0 Answers0