SOLVED

Creating a Sharepoint Item "message": "The response is not in a JSON format."

Copper Contributor

I have run into an error message while trying to create a SharePoint list item in Power Automate.  The error message in full is as follows:

  
 "message": "The response is not in a JSON format.",
    "innerError": "404 FILE NOT FOUND"
 

    Here is my screen shot of my flow for further context:

FlowFlow

 

I have created similar flows before using variables without any issues and I cannot figure out the error.   As a way of trouble shooting, I took a look at my code for my inputs and it looks as follows, Keep in mind this is my failed code. 

 

{
"host": {
"connectionReferenceName": "shared_sharepointonline",
"operationId": "PostItem"
},
"parameters": {
"dataset": "https://collinsclothiers365.sharepoint.com/sites/London​",
"table": "ff218924-3d4c-469f-8c1d-25e4042ca13f",
"item": {
"Title": "27",
"Store": "London",
"CustomerFirstName": "Test Test",
"CustomerPhoneNumber": 1234567890,
"CustomerEmail": "Email address removed",
"DateRequired": "2022-03-27",
"LinktoFile": "https://collinsclothiers365.sharepoint.com/:u:/s/MicrosoftFormSubmissions/ETQMNYvihvhBtOMH6cfiHUEBtz...",
"SubmissionDate": "2022-02-02T15:32:59Z",
"OrderStatus": {
"Value": "ORDERED"
}
}
}
}

 

As a trial run, I entered my values manually into creating a list item without using the predefined compose values.  Primarily to see what its code looked like.  It works fine without passing in the variables.   The successful code  looks like the following:

 

{
"host": {
"connectionReferenceName": "shared_sharepointonline",
"operationId": "PostItem"
},
"parameters": {
"dataset": "https://collinsclothiers365.sharepoint.com/sites/London",
"table": "ff218924-3d4c-469f-8c1d-25e4042ca13f",
"item/Title": "27",
"item/Store": "London",
"item/CustomerFirstName": "Test Test",
"item/CustomerPhoneNumber": 1234567890,
"item/CustomerEmail": "Email address removed",
"item/OrderStatus/Value": "ORDERED",
"item/DateRequired": "2022-03-27",
"item/LinktoFile": "https://collinsclothiers365.sharepoint.com/:u:/s/MicrosoftFormSubmissions/ETQMNYvihvhBtOMH6cfiHUEBtz...",
"item/SubmissionDate": "2022-02-02T15:32:59Z"
}
}

 

I cannot really see a difference in how it is laid out. I have spent a few days now looking over it and reviewing my JSON without really getting anywhere I'm not really sure what to check next.  I spent most of my time looking for the JSON code as it related to my error message "The response is not in a JSON format." However, I have spent very limited time looking into the other part of my error which read  "innerError""404 FILE NOT FOUND".  I'm starting to wonder if this is more the problem and not the JSON, but I really don't know what it is referring to or how to trouble shoot.  Any tips/ideas would be great.  Thanks 

1 Reply
best response confirmed by pwintert (Copper Contributor)
Solution

@pwintert 

The only difference I can see between the two datasets you have pasted in the post is:

 

The URL in the "dataset" for the failed dataset is:
https://collinsclothiers365.sharepoint.com/sites/London%E2%80%8B

ekarim_0-1644016494331.png

There seems to be a fullstop or period character at the end of the URL.

 

Whereas the working dataset is:
"https://collinsclothiers365.sharepoint.com/sites/London"

ekarim_1-1644016625346.png

 

Hope this helps.

 

Ellis

1 best response

Accepted Solutions
best response confirmed by pwintert (Copper Contributor)
Solution

@pwintert 

The only difference I can see between the two datasets you have pasted in the post is:

 

The URL in the "dataset" for the failed dataset is:
https://collinsclothiers365.sharepoint.com/sites/London%E2%80%8B

ekarim_0-1644016494331.png

There seems to be a fullstop or period character at the end of the URL.

 

Whereas the working dataset is:
"https://collinsclothiers365.sharepoint.com/sites/London"

ekarim_1-1644016625346.png

 

Hope this helps.

 

Ellis

View solution in original post