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>