cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GreyGryffin
Level: Powered On

Publish PBIX file to Power BI Service using Flow

Hi All,

 

I've been trying to use Flow to pluck a .pbix file from a source (e.g. local drive or blob) and publish it to Power BI service using the Import REST API. I am successful doing this with Postman but receive errors attempting to do it using Flow.

Reference this issue for details: https://community.powerbi.com/t5/Developer/Import-pbix-using-Flow/td-p/601459.

 

One test I've tried highlights some differences between the two methods (Postman vs Flow) and I'm hoping someone can give me some guidance for how to make Flow submit a correct multipart form like Postman does.

 

In my test I submit both my Flow and my Postman requests to an HTTP Listener in Flow and capture the contents using Compose and the trigger() function. Comparing these outputs I see the sturctures as follows:

 

Flow Structure

-----------------------------------------------------------------

outputs

headers

body

$content-type : multipart/form-data; boundary=--------------------------073785644261447473990793

$content

 

However with Postman the structure is:

-----------------------------------------------------------------

outputs

headers

body

$content-type : multipart/form-data; boundary=--------------------------335245077245848558317307

$content

$mulitpart

0

headers

body

$content-type : appliction/octet-stream

$content

-----------------------------------------------------------------

Further, it appears that each of the three $content sections has a different encoding of the file (!?!).

However, my first question is how to get Flow to create a multipart form like Postman does?

 

Any thoughts or suggestions are much appreciated!

 

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Publish PBIX file to Power BI Service using Flow

Hi @GreyGryffin ,

 

Have you created a custom connector from a Postman collection?

Please check the following doc:

https://docs.microsoft.com/en-us/connectors/custom-connectors/define-postman-collection

Once you’ve created the custom connector, then you could register it with your flow:

https://docs.microsoft.com/en-us/connectors/custom-connectors/use-custom-connector-flow

About how to get flow to create a multipart form like Postman does, I haven’t seen any docs on it. I will keep an eye on this issue and back to you later.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,456)