cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
erron000
New Member

MS Flow - Expected String, got StartObject

Building a flow from a JSON HTTP request, i can get all the string data fine but a entry called 'id' which looks like a number type is giving an error when i do a Parse JSON;

 

InvalidTemplate. Unable to process template language expressions in action 'Parse_JSON' inputs at line '1' and column '2889': 'Unexpected token encountered when reading value for 'id'. Expected String, got StartObject. Path 'schema.id'.'.

 

schema is as follows

 

{
"created_at": {
"type": "string"
},
"href": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
 
i have tried setting the id type to number but get the same error. The JSON outputs look like this:
 
{
"custom": null,
"id": 2747151,
"name": "L-3CW86S2",
etc
etc
1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hey @erron000 

 

Can you share details on how you are providing the schema for the parse JSON action? I would first create the flow with the HTTP trigger and add a compose action. Trigger the flow and get the body of the trigger in the compose action. From the flow run history, copy everything from the compose action output and then in the flow editor, add the parse json action and for the schema provide a sample data payload and add everything from the compose action over here. This matches exact key value pairs that you can use in the consecutive actions. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hey @erron000 

 

Can you share details on how you are providing the schema for the parse JSON action? I would first create the flow with the HTTP trigger and add a compose action. Trigger the flow and get the body of the trigger in the compose action. From the flow run history, copy everything from the compose action output and then in the flow editor, add the parse json action and for the schema provide a sample data payload and add everything from the compose action over here. This matches exact key value pairs that you can use in the consecutive actions. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

I got the schema from the HTTP results, gives same result as the Compose but copy/paste into schema shows the correct object types now and id is being accepted in JSON Parse.

 

Thanks!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,126)