This will describe how to Publish a file from SharePoint to PowerBI.com using Power Automate HTTP Connector to call the API.
You might end up on this blog after looking at Microsoft’s article on this function here: https://learn.microsoft.com/en-us/rest/api/power-bi/imports/post-import-in-group

Prerequisite Knowledge
- You know the basics of the Power BI API, including how to setup the Service Principal (App Registration, PowerBI.com Access, etc).
- You know the basics of using the Power Automate HTTP connector.
- You can already do *something* successfully with the Power BI API. This blog won’t explain how to authenticate the HTTP connector.
JSON Format for HTTP Body
Here’s the correct JSON for the Body of the HTTP Request
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"headers": {
"Content-Disposition": "form-data; name=\"TestAPI\"; filename=\"TestAPI.pbix\""
},
"body": SharePoint File Content
}
]
}
As you can see in the first screenshot, the text in red can be replaced with Power Automate Variables. I’m using the SharePoint Get File Properties (Name, File Name With Extension) and SharePoint Get File Content (.pbix File) connectors to get these values.

URL and Parameters
Here’s a sample URL. Replace red text with variables or hard code your values.
https://api.powerbi.com/v1.0/myorg/groups/12345678-1234-1234-1234-123456789abc/imports?datasetDisplayName=TestAPI&skipReport=true&nameConflict=CreateOrOverwrite
skipReport=true means you can publish a Dataset only without publishing the Report!
Hat Tip
THANK YOU blogger/MVP Mohamed Ashiq Faleel for writing the post below. There were some pieces to put together, but without this blog I would not have solved this.
Thanks for your post.
At the moment I’am stuck.
I do not know, how to use “Get File Properties” and “Get File Content” to receive the needed content for “body”: SharePoint File Content
Any help would be appreciated.
Thank you.
BR, Hp
LikeLike
Those are Flow steps using the SharePoint connector. It assumes you have a .pbix file stored in SharePoint or Teams.
LikeLike