Forum Discussion

WalterNC's avatar
WalterNC
Regular Visitor
5 years ago
Solved

DataSource.Error: Web.Contents failed to get contents from (400): Bad Request

Hi there,

 

I am trying to get my power bi dataset in a CSV using Flow/Power Automate.

I used this blog www.thebiccountant.com/  to create the query and the flow but i get DataSource.Error: Web.Contents failed to get contents from (400): Bad Request when i add the last step of the flow.

 

When a HTTP request is received =>

Compose using Json(decodeBase64(triggerBody()['$content'])) =>

Create CSV File 

Up to this stage my query:

let
Source = OData.Feed("https://XXXXXXX),
ToArray = Table.ToRecords(Source),
ToJsonBinary = Json.FromValue(ToArray),
WebCall = Web.Contents("https://prod-180.westeurope.logic.azure.com:443/workflows/XXXXXXXX", [Content = ToJsonBinary]),
LinesFromBinary = Lines.FromBinary(WebCall)
in
LinesFromBinary

Works but asoon as i add the Create File step in my flow i get the error DataSource.Error: Web.Contents failed to get contents from (400): Bad Request in my power query

 

What am i doing wrong please help

  • I fixed my problem ğŸ˜€

     

    I end my flow with HTTP that sends it to a new flow where i create my file on onedrive

    This is what my flows look like:

     

    To create the CSV:

     

    To save it too onedrive:

     

7 Replies

    • ImkeF's avatar
      ImkeF
      Community Champion

      Hi WalterNC ,

      you have to use a tool like Fiddler to analyse what's being sent from Power Query and compare that with the requests from your endpoint (flow).

      • WalterNC's avatar
        WalterNC
        Regular Visitor

        ImkeF 

         

        When i use fiddler i get {"error":{"code":"InvalidRequestContent","message":"The input body for trigger 'manual' of type 'Request' must be of type JSON, but was of type 'application/octet-stream'."}} as an error back

  • Good Morning!
    Well, in our process experience via Power Query (we use a lot of DATAFLOWS), we consolidate that this type of problem is intermittent, because this error rarely happens, in an already consolidated process!
    in short:
    It really seems to be something from the Power BI Service platform in terms of performance x capacity.