Forum Discussion

pwintert's avatar
pwintert
Copper Contributor
Feb 04, 2022

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

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:

Flow

 

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/ETQMNYvihvhBtOMH6cfiHUEBtzBfN88U-_Mle3-bVFspyA",
"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/ETQMNYvihvhBtOMH6cfiHUEBtzBfN88U-_Mle3-bVFspyA",
"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 

Resources