cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoaoSantos489
Resolver I
Resolver I

Send an HTTP request to SharePoint - Error

HHy guys,

I'm using an online template for batch create an item in a Sharepoint list.

Link of the template: Power Automate Flow to batch create SharePoint List Items (tachytelic.net)

 

But I keep getting an error, I believe it´s something on the Json body input.

Here is the input of the body:

JoaoSantos489_0-1668535047340.png

 

 

--batch_d77df377-7f04-4b3b-9de1-63fecbf5905d
Content-Type: multipart/mixed; boundary="changeset_ed06f849-237d-46c0-957d-97517e6de654"
Content-Length: 489
Content-Transfer-Encoding: binary

--changeset_ed06f849-237d-46c0-957d-97517e6de654
Content-Type: application/http
Content-Transfer-Encoding: binary

POST https://lact.sharepoint.com/sites/DSI-E-Institucional/_api/web/lists(guid'971bd401-213a-4596-a2b0-34d794857e69') HTTP/1.1

Content-Type: application/json;odata=verbose

{"__metadata":{"type":"SP.Data.Atualizao_x0020_de_x0020_PresenasListItem"},"Title":"60000285","N_x002e_Colab_x002e_":"00000093","Nome":"Ricardo Sérgio Silva Marques","Cod_x002e_Status_x0020_SAP":"1"}

--changeset_ed06f849-237d-46c0-957d-97517e6de654--

--batch_d77df377-7f04-4b3b-9de1-63fecbf5905d--

 

 

 

Here is the output:

{
  "$content-type": "multipart/mixed; boundary=batchresponse_fe6dbe53-abb5-442b-a341-6bdac52308c7",
  "$content": "LS1iYXRjaHJlc3BvbnNlX2ZlNmRiZTUzLWFiYjUtNDQyYi1hMzQxLTZiZGFjNTIzMDhjNw0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9odHRwDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiaW5hcnkNCg0KSFRUUC8xLjEgNDAwIEJhZCBSZXF1ZXN0DQpDT05URU5ULVRZUEU6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9dmVyYm9zZTtjaGFyc2V0PXV0Zi04DQoNCnsiZXJyb3IiOnsiY29kZSI6Ii0xLCBNaWNyb3NvZnQuU2hhcmVQb2ludC5DbGllbnQuSW52YWxpZENsaWVudFF1ZXJ5RXhjZXB0aW9uIiwibWVzc2FnZSI6eyJsYW5nIjoicHQtUFQiLCJ2YWx1ZSI6IlNlcXVcdTAwZWFuY2lhIEpTT04gZm9ybWF0YWRhIGluY29ycmV0YW1lbnRlLiJ9fX0NCi0tYmF0Y2hyZXNwb25zZV9mZTZkYmU1My1hYmI1LTQ0MmItYTM0MS02YmRhYzUyMzA4YzctLQ0K",
  "$multipart": [
    {
      "headers": {
        "Content-Type": "application/http",
        "Content-Transfer-Encoding": "binary"
      },
      "body": {
        "$content-type": "application/http; msgtype=response",
        "$content": "SFRUUC8xLjEgNDAwIEJhZCBSZXF1ZXN0DQpDT05URU5ULVRZUEU6IGFwcGxpY2F0aW9uL2pzb247b2RhdGE9dmVyYm9zZTtjaGFyc2V0PXV0Zi04DQoNCnsiZXJyb3IiOnsiY29kZSI6Ii0xLCBNaWNyb3NvZnQuU2hhcmVQb2ludC5DbGllbnQuSW52YWxpZENsaWVudFF1ZXJ5RXhjZXB0aW9uIiwibWVzc2FnZSI6eyJsYW5nIjoicHQtUFQiLCJ2YWx1ZSI6IlNlcXVcdTAwZWFuY2lhIEpTT04gZm9ybWF0YWRhIGluY29ycmV0YW1lbnRlLiJ9fX0=",
        "$applicationHttp": {
          "headers": {},
          "body": {
            "error": {
              "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
              "message": {
                "lang": "pt-PT",
                "value": "Sequência JSON formatada incorretamente."
              }
            }
          },
          "statusCode": 400
        }
      }
    }
  ]
}

Error code: 

"code""-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
 
Message value:
Incorrectly formatted JSON sequence
2 REPLIES 2
SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

@JoaoSantos489 ,

 

I think you need to enclose the body with parenthesis.

SudeepGhatakNZ_0-1668572250655.png

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

Hi @SudeepGhatakNZ  thank you for your answer.

I have allready tried that.

I got the same error unfortunately

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (6,220)