cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (27,471)