cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
erron000
Level: Power Up

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

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

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

erron000
Level: Power Up

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,902)