Forum Discussion

s1's avatar
s1
Icon for Helper I rankHelper I
2 years ago
Solved

Can run GET, but having trouble with POST when sending API from Power Query Online (dataflow)

I am having trouble getting Power Query online to use the search API in Hubspot, and I cannot look at the api request it generates to debug. When I try and do a POST for SEARCH in their API, I get th...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi s1 ,

    Please try to modify the codes.

     

    powerquery
    let
      filter = Json.FromValue(
        [
          filterGroups = {
            [
              filters = {
                [
                  propertyName = "hs_pipeline_stage",
                  operator = "EQ",
                  value = "95185931"
                ]
              ]
            ]
          }
        ]
      ),
      Source = Table.FromRecords(Json.Document(Web.Contents(
        "https://api.hubapi.com",
        [
          RelativePath="crm/v3/objects/tickets/search",
          Headers = [
            Authorization = "Bearer ####",
            #"Content-Type"="application/json"
            ],
          Content = filter
        ]
      ))[results])
    in
      Source

     

    Web.Contents - PowerQuery M | Microsoft Learn

     

     Please try the above modifications and see if that resolves your issue. If the problem persists, could you provide more details about the error message?

     

    Best Regards
    Community Support Team _ Rongtie

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