Showing results for 
Search instead for 
Did you mean: 
Not applicable

Microsoft Flow + Power BI API Custom Connector - Post Import in Group

I have a flow using the Power BI API (swagger) custom connector discussed here:


I am creating a process to Export a pbix file from a workspace ( -- this is working -- and then import it into another workspace ( -- not working.


The import action from the Power BI API swagger file calls for groupId, datasetDisplayName, importInfo, and nameConflict.

groupId = groupId of the workspace I want to import the pbix to

datasetDisplayName = dataset/report name I have exported

importInfo = NEED FORMAT

nameConflict = CreateOrOverwrite


I attempted just passing the content of the Export and that didn't work:  body('Export_pbix')['$content']


I attempted creating a file on SharePoint for the exported file, getting the file content from SharePoint, and passing that as the importInfo and that didn't work.


This document states, it is expecting the file as content-type = multipart/form-data ( - also stated 

  • To import a file, request Headers should include Content-Type: multipart/form-data with the file encoded as form data in the request body

I attempted converting the body content to base64 and that didn't work:  base64(body('Export_pbix')['$content'])


I think I need to format this section as JSON but I am not sure what the format should be. Does anyone know?


Accepted Solutions
Helper II
Helper II
Not applicable



Hi @Anonymous,


What's the body('Export_pbix')['$content'] look like? It's encode base64 or Json format?

And what's the error information report?

I can see you create the pbix file in the SharePoint, can it be opened normally? If it can be, you might have some wrong with the custom connector.

Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Not applicable

no, it cannot be opened.....assuming I have to extract/encode somehow

Not applicable

just realized I didnt answer the rest of the question......the export "click to download" looks like this ( just long bunch of letters) accessed from a url like:<workflowid>/runs/<runid>/actions/Export_pbix/repetitions/000000/contents/ActionOutputs?api-version=2017-07-01&se=2019-08-17T02%3A00%3A00.0000000Z&sp=%2Fruns%<runid>%2Factions%2FExport_pbix%2Frepetitions%2F000000%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=<sig>

{"statusCode":200,"headers":{"Pragma":"no-cache","Transfer-Encoding":"chunked","X-PowerBI-FileName":"Security %2D Work Cell.pbix","Strict-Transport-Security":"max-age=31536000; includeSubDomains,max-age=31536000; includeSubDomains","X-Frame-Options":"deny,deny","X-Content-Type-Options":"nosniff,nosniff","RequestId":"<requestid>","Access-Control-Expose-Headers":"RequestId","Cache-Control":"no-store, must-revalidate, no-cache","Date":"Fri, 16 Aug 2019 09:31:49 GMT","Content-Type":"application/zip","Content-Length":"11789015"},"body":{"$content-type":"application/zip","$content":"UEsDBBQAAAAIANFLEE8813PJCgAAAAgAAAAHABwAVmVyc2lvbiCiGAAooBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAzZNBj................"}}

 the input to the import looks as such:

{"method":"post","queries":{"datasetDisplayName":"Security - Work Cell.pbix","nameConflict":"CreateOrOverwrite"},"path":"/v1.0/myorg/groups/<groupid>/imports","host":{"api":{"runtimeUrl":""},"connection":{"name":"/providers/Microsoft.PowerApps/apis/shared_power.20bi.20api.5fa59b954ec8832683.5f642a394d082feff5/connections/<connectionid>"}},"authentication":{"scheme":"Key","parameter":"*sanitized*","type":"Raw"},"body":"UEsDBBQAAAAIANFLEE8813PJCgAAAAgAAAAHABwAVmVyc2lvbiCiGAAooBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAzZNBj................"}


Hi @Anonymous,


Ok, so you can add a Compose action to put the content into it, and check the output how it looks like.


Best Regards,

Community Support Team _ Lin Tu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regular Visitor

Hi @Anonymous 


Did you ever find a solution to this? I think I am trying to do exactly the same thing, and failing. Miserably. 





Frequent Visitor

@rG-tom  unfortunately not - couldnt reach the right people @ microsoft


if you make progress let me know - and i will do the same

Helper II
Helper II

Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (27,649)