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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Export Single Page of ...
Power Automate
Unanswered

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!

 

Categories:
I have the same question (0)
  • Verified answer
    v-yueyun-msft Profile Picture
    on at

    Hi , @sc0rpiongirl 

    I test it in my side , it works good.

    vyueyunmsft_0-1710724682146.png

    You can try to check :
    (1)If your pageName is correct which can get from url:

    vyueyunmsft_1-1710724776519.png

    (2)You can try to convert to classic mode in the flow to test:

    vyueyunmsft_2-1710724806139.png

    (3)You need to check if you pass the correct field in "Send an email V2" action.

    vyueyunmsft_3-1710724828834.png

     

    Best Regards,

    Yueyun Zhang

     

  • sc0rpiongirl Profile Picture
    112 on at

    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 :(.

  • v-yueyun-msft Profile Picture
    on at

    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

    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

    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

    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

    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

    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

    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

    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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard