0

Has anybody got Podio to work with Power BI. I managed to get the token process to work in Power BI. I can get single record results to work but when using a list pull, I can't get it to work.

Podio Token Portion: Working

let
  token_url = "https://podio.com/oauth/token",
  client_id = "####",
  client_secret = "000####",
  grant_type = "password",
  username = "user@user.com",
  password = "###",
  body = "client_id="&client_id&"&client_secret="&client_secret&"&grant_type="&grant_type&"&username="&username&"&password="&password,
  Source = Json.Document(Web.Contents(token_url, [
  [
    Headers = [#"Content-Type"="application/x-www-form-urlencoded"],
    Content = Text.ToBinary(body)
  ])
  ),
  token = "bearer " & Source[access_token]
in
  token

Podio Grab List (Need Help Here):

let
  url = "https://api.podio.com/item/app/0000000/filter/",
  token = #"Podio Token",
  headers = [Headers = [#"Authorization" = token,
                        #"Content-Type"="application/json"]],
  Source = Json.Document(Web.Contents(url,headers))
in
  Source

All I keep getting is 400 Bad Request.

2 Answers2

0

It appears you are trying to return data by filtering an app. When using /filter to filter items within an app, this is not a GET command but rather a POST command.

Since this is a POST command, you'll need to use the Content parameter within the Web.Contents function. The example below will limit the response to the first 10 records:

let
    url = "https://api.podio.com/item/app/0000000/filter/",
    token = #"Podio Token",
    headers = [Headers = [#"Authorization" = token,
                    #"Content-Type"="application/json"]],
    postData = Json.FromValue([limit = 10, offset = 0]),
    response = Web.Contents(url,
                            [Headers = headers,
                             Content = postData]),
    jsonResponse = Json.Document(response)
in
    jsonResponse
Adam DS
  • 468
  • 3
  • 10
  • My 1st issue actually turned out to be "Bearer" was case sensitive for Power BI. I don't think Podio lets you do a normal get all data. So, this filter method seems to be one of the few ways to get data 30 at a time. I'll give your method a try. I actually got Power Bi to work in a slightly different method. I turned the code above into a function, then had a list.generate feature where it pagination each offset. This works well the preview mode. But after I save and apply appears it errors out. Think it's due to rate limits :( – Jefferson Daniel Mar 18 '22 at 07:45
  • We might just end up resorting to a tool called ThatApp.io where it can backup data into MySQL, and we create reports that way instead. Unless anybody managed to get entire apps of data to load in Power BI. – Jefferson Daniel Mar 18 '22 at 07:52
0

If you use GlobiFlow, you can create a JSON feed that you can import directly from PowerBI. Instead of selecting a JSON file, paste the JSON URL GlobiFlow gives you.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 21 '22 at 09:16
  • We originally used the JSON feed, its decent if you don't have a lot of data, but once you're in the 1000s or more, it starts to take way to long. Then trying to test and load the data into Power BI Desktop takes 30 or more minutes for it to load. It just got too unrealistic. We actually ended up tossing this method as well. The method works when editing the data, but fails when publishing, their ether some sort of API limit that prevents it from paginating. We ended up using a tool called Thatapp.io to bring it over as MySQL. So far, much better. – Jefferson Daniel Apr 22 '22 at 06:58