cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Dual Super User III
Dual Super User III

Re: MS Flow - Expected String, got StartObject

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
Highlighted
Dual Super User III
Dual Super User III

Re: MS Flow - Expected String, got StartObject

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

Highlighted
New Member

Re: MS Flow - Expected String, got StartObject

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (9,307)