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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error in the Exported ...
Power Automate
Unanswered

Error in the Exported PowerBI file (corrupted file)

(0) ShareShare
ReportReport
Posted on by 4

Hello dear community!

 

I created a flow to "Export a File For PowerBI Report" and then e-mail the file. An Error occurs when opening the Exported file generated by PowerAutomate saying the file is corrupted and cannot be opened. I tried to select PDF and PPTX file from the PowerBI extraction and I also guaranteed to write the extension in the file name I send from the email. 

Does anyone know how to solve this problem? 

My flow:

felipecanhetti_0-1699984570470.png

My configurations: 

felipecanhetti_1-1699984604678.png

felipecanhetti_2-1699984638523.png


Thanks in advance for all the good souls active in

 

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,598 Super User 2026 Season 1 on at

    Are you trying to Base64 encode the file twice?

  • felipecanhetti Profile Picture
    4 on at

    No, this "Base64" appeared after I saved the flow. Before saving, the text was like this:

    felipecanhetti_0-1700132634353.png

    The codes that appear are:
    * BI Export:

    {
      "type": "OpenApiConnection",
      "inputs": {
        "parameters": {
          "groupid": "myworkspace",
          "reportid": "70417e0a-1bf8-4488-b0cd-16f7ad6617f5",
          "ExportPayloadPowerBIReport/format": "PDF"
        },
        "host": {
          "apiId": "/providers/Microsoft.PowerApps/apis/shared_powerbi",
          "connection": "shared_powerbi",
          "operationId": "InitiateExportToFileForPbiReports"
        }
      },
      "runAfter": {}
    } "

    * Code the Email part:
    "
    {
      "type": "OpenApiConnection",
      "inputs": {
        "parameters": {
          "emailMessage/To": "felipe.oliveirac@kof.com.mx",
          "emailMessage/Subject": "TEste PBI",
          "emailMessage/Body": "<p>teste</p>",
          "emailMessage/Attachments": [
            {
              "Name": "Teste BI.PDF",
              "ContentBytes": "@{base64(body('Exportação_para_Arquivo_para_Relatórios_do_Power_BI'))}"
            }
          ],
          "emailMessage/Importance": "Normal"
        },
        "host": {
          "apiId": "/providers/Microsoft.PowerApps/apis/shared_office365",
          "connection": "shared_office365",
          "operationId": "SendEmailV2"
        }
      },
      "runAfter": {
        "Exportação_para_Arquivo_para_Relatórios_do_Power_BI": [
          "Succeeded"
        ]
      }
    }"

    It seems like its only Base64 encoding once
  • lbendlin Profile Picture
    8,598 Super User 2026 Season 1 on at

    How large is the attachment? Base64 strings have a low size limit.

  • felipecanhetti Profile Picture
    4 on at

    It should be a small attachment since it is only a one-page report from PowerBI. 
    Where can I see the size of the file generated by the "Export from PowerBI" automation? (I tried downloading it, but it was saved as a JSON and I could not open that) 

    The error I receive from Adobe Reader is: 

    felipecanhetti_0-1700141392527.png

     

  • LukasG Profile Picture
    8 on at

    I have exactly the same issue and error message (also tried PPT but also says the file is corrupt) - would love if someone had a solution for this!

    The exports work fine when I do them directly from the PowerBI report...

  • XYZUser Profile Picture
    30 on at

    Hi,
    This seems to be a bug in power automate new designer. I was also facing this issue earlier.
    If you go back to the old designer (by disabling the new designer toggle present in top-right), then it'll surely work fine.

  • LukasG Profile Picture
    8 on at

    Thank you very much @XYZUser that was the right solution 😄 

    Although it was not enough to just hit the toggle, I also had to reselect the output from the PowerBI step in my email step for it to work. But now it works!

  • XYZUser Profile Picture
    30 on at

    Yess, Forgot to mention that you need to reselect the power bi content file again in your email step 🙂

  • tech2188_ATSG Profile Picture
    3 on at

    Thank you all. Had the same issue and this fixed it. Reselecting was a critical part of the equation.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard