Hi there!
I'm trying to get a flow together that ultimately updates a SharePoint Calendar List Item to be an All Day Event. I've scoured the forums, and can't find a solution to the error I'm currently getting. The Flow
{
"status": 400,
"message": "Invalid JSON. A token was not recognized in the JSON content.\r\nclientRequestId: 6661d61b-ce90-4a3b-80e7-98997401ac04\r\nserviceRequestId: 34014c9f-80a1-0000-5836-ef2bdf7a6761",
"source": "https://questar365.sharepoint.com/sites/Infrastructure/_api/web/lists/getbytitle('Furlough')/items",
"errors": [
"-1",
"Microsoft.SharePoint.Client.InvalidClientQueryException"
]
}
I've searched high and low and from what I've read I shouldn't need an OAUTH token since all of this occurs inside the same Office 365 tenant. Please help! I've been banging my head against the wall on this for two days.
Solved! Go to Solution.
Hi @Anonymous ,
Could you share the blog or article you are referring to so that we could do a similar test and analyze the cause of the issue?
According to the screenshot you provide, we notice that you entered the wrong “” outside Start variables. It should be "".
Or you could remove the “” and check if the same issue still exists.
Besides, we need to use the expression to get the value of the variable. Like:
Best Regards,
@Anonymous,
Hi there! I have a couple of questions to start. First, have you successfully created an item against this list using an HTTP POST without all the additional variables? That's a good place to begin because then you can start to see if it's the call against the list that is a problem, or if the problem lies somewhere with your variables and fields.
Second, when you say "SharePoint Calendar list item," is this a classic list with a calendar view in O365? Or, are you using a modern SP Events list?
Finally, a quick suggestion: I don't think you need the "metadata" and list type in your body field, or the additional header.
Here's a sample POST HTTP call for you:
Let me know how it goes!!
-Ash
If this response provided an answer to your question please mark it as a solution so that others can find it.
If you found this helpful, consider giving it a thumbs up!
Hi @Anonymous ,
Could you share the blog or article you are referring to so that we could do a similar test and analyze the cause of the issue?
According to the screenshot you provide, we notice that you entered the wrong “” outside Start variables. It should be "".
Or you could remove the “” and check if the same issue still exists.
Besides, we need to use the expression to get the value of the variable. Like:
Best Regards,
Barry,
Holy moly, I'm not sure if it was the quote marks being wrong or switching to using the expressions, but the Flow is now working! Thank you!
However, I'm not getting the intended result. Instead of modifying the existing event, it's creating a new one. I'll poke at it a bit more on my own, but, any suggestions?
Cheers,
DH
@Anonymous,
If you want to modify the existing event, use PATCH instead of POST. You'll need to pass in the ID of the item as well!
Take care,
Ashley
Thanks. Instead I simplified the Flow a ton so that it uses the Send an HTTP Request action if the event is an All Day event, and it uses the SharePoint Create Item if it's not. Everything is now working as expected for event creation. Now, if only I could make it delete the SharePoint event if the original event is removed from the O365 Group Calendar...
Hi @AKRogers , I came across your response here when I was googling for a solution to a similar situation I am facing... how would you pass in the ID of the item as part of the http request? Would you be able to share an example please?
Nick