Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Export Single Page of Power BI Report To File to PDF Attachment is Blank

(0) ShareShare
ReportReport
Posted on by 112

Hi Community,

 

I have a flow that is using the Power BI Export to File action to export one of the page of a report then email to myself.  The flow set up as MS's article, it's rather straightforward, and I have the right Pagename string  (as in the screenshot).  The problem is the attachment I received in the email is blank.  

Capture1.PNG

 

Now I tried to directly export this page of report in Power BI online in PDF and it shows perfectly fine.  In theory, I should receive something just like that as I were to directly export the page via Power BI online.  I just don't know what went wrong.  I've done a lot reading/researching/googling, but can't find anything that can help.  Anyone has any suggestions what else I could do to create the report that's not blank?

 

Thanks!

 

  • khorswood Profile Picture
    4 on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Edit: I found this comment so I changed page size to 16:9 and the issue persists.

    khorswood_1-1712853126037.png

    Hi there! I am having the exact same issue as this thread, except I have been able to export and send other reports successfully so I know it is not an outlook exchange issue. I tested in Power Bi Rest API and retrieved the correct PDF from postman, but still when I test it in my flow it is blank. I tried in old designer and new.

     

    My flow is as below. The red parts are for an image added to email body - this works as intended. I also included the code from the steps where I retrieve a blank PDF and another sample report where I retrieve a PDF with the content. As you can see they are nearly identical but one works and the other does not. The one thing I can think of that may be affecting is page size - the "good" PDF is letter size, but the blank PDF is 830 px by 1280 px. But the PDF is successful from API so it should be able to work in the flow too?? Please advise. 

     

    khorswood_0-1712850826994.png

    khorswood_1-1712851010456.pngkhorswood_2-1712851133993.png

    khorswood_3-1712851272668.pngkhorswood_4-1712851347831.png

     

     

  • sc0rpiongirl Profile Picture
    112 on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Hi Yueyun,

     

    Thanks for your assistance.  I checked with our IMIT and turned out that our outlook exchange "shields" this type of PDF attachment and turns them to blank for security reasons.  So I will do some workaround but we know for sure the flow can create PDF file and deposit it somewhere in SP.  Really appreciate your help!

     

    S

  • v-yueyun-msft Profile Picture
    on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Hi , @sc0rpiongirl 

    Thanks for your response!  According to your description, you test successfully in Power Bi REST API and you can get the correct pdf from API. But it do not work in your flow.

    Can you share your whole  flow configuration in your side ?

     

    Best Regards,

    Yueyun Zhang

  • sc0rpiongirl Profile Picture
    112 on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Thanks 🙂 ...Got it...and tested it....and it worked!  It loaded the PBI report by page for me.  So it should work in the flow right?  I don't understand why the attachment I got in email via the flow returned blank then... I am certain the page number was correct.  Any suggestion? Thank you again!

  • v-yueyun-msft Profile Picture
    on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Hi, @sc0rpiongirl 

    Yeah... This api need to test in Postman instead of the "Try it".

    Postman API Platform | Sign Up for Free

     

    Best Regards,

    Yueyun Zhang

  • sc0rpiongirl Profile Picture
    112 on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Thank you Yueyun for your direction and screenshots...I tested on Reports - Get File Of Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn and I got the Response Code of 200, which seems to be good, except...the output indicating the file isn't proper...here is the JSON body... do you think it's just how this Power BI report was created causing the odd display?  For context, it's data table using Matrix visual displaying various data points that were produced via pretty complex measures. The data fields have condition formatting set up to show different background color of cell/fields.  The idea is to export the data visual directly.  Using "Export" > "PDF" from Power BI online service does produce a nice PDF of the whole page so I think in theory, it should not prevent me to get such a PDF version using REST API at all...

     

    Capture1.PNG

     

     

    Capture2.PNGCapture3.PNG

  • v-yueyun-msft Profile Picture
    on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Hi , @sc0rpiongirl 

    I test it in my side , you need to check if you pass the format in the http body:

    vyueyunmsft_0-1710986981832.png

    Then you can use the Postman to test the pdf like this:

    vyueyunmsft_1-1710987191125.png

    Reports - Get File Of Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

     

     

    Best Regards,

    Yueyun Zhang

  • sc0rpiongirl Profile Picture
    112 on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Thanks for pointing the direction for testing the API...I found the gorupID and reportID in PowerBI report URL which are the two parameters marked mandatory, when clicking RUN I got 400 response code but not sure what this means though...

    sc0rpiongirl_0-1710970063524.png

    here is the error code in Body JSON 

    {
     "error": {
     "code": "BadRequest",
     "message": "Bad Request",
     "details": [
     {
     "message": "Error converting value \"\" to type 'Microsoft.PowerBI.ServiceContracts.Api.V1.FileFormat'. Path 'format', line 2, position 11.",
     "target": "request.format"
     }
     ]
     }
    }

    Thanks!

  • v-yueyun-msft Profile Picture
    on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Hi , @sc0rpiongirl 

    Thanks for your response! Can you try to use the Power BI Rest API to check if you can export PDF in your side?

    Reports - Export To File In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

    And you can also check if you meet the limitation in Power BI side.

    Export Power BI embedded analytics reports API - Power BI | Microsoft Learn

     

     

    Best Regards,

    Yueyun Zhang

  • sc0rpiongirl Profile Picture
    112 on at
    Re: Export Single Page of Power BI Report To File to PDF Attachment is Blank

    Thank you for the reply and testing screenshots.  This flow is logically very simple so yes I did follow all the steps easily and triple checked all the necessary parameters etc.  I also tried different PBI reports to see if the problem only exists with certain PBI reports but all the PBI reports in my workspace with the test getting blank PDF attachment (not personal but company level and group level since I don't have capacity to run my own workplace ie getting that error when I tested PBI reports in my own workspace but that's beside the point...)  

     

    I have absolutely no idea what the problem is :(.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492