I am trying to get a list of project from an HTTP request in power automate and use the return as a "database" to search my followup question.
When the Action is called and Power Automate fires i get the following error on the return
evaluated to type ‘TableDataType’ , expected type ‘StringDataType’ Error Code: FlowActionBadRequest
and the flow does not even get to the Parse value
here is the output of the Power Automate flow
raw outpuy
{
"statusCode": "200",
"schema": {
"type": "object",
"properties": {
"json": {
"title": "JSON",
"type": "string",
"x-ms-content-hint": "TEXT",
"x-ms-dynamically-added": true
}
},
"additionalProperties": {}
},
"body": {
"json": [
{
"project name": "check floating culvert",
"project responsible": "ABC",
"lead engineer": "ABC"
},
{
"project name": "transportation East Coast USA",
"project responsible": "ABC",
"lead engineer": "ABC"
},
{
"project name": "Cost optimization",
"project responsible": "ABC",
"lead engineer": "ABC"
},
{
"project name": "Lab",
"project responsible": "ABC",
"lead engineer": "ABC"
}
]
}
}
I Solved it by stringifying my JSON in the power automate output string(output_to_pva). and then converting it back to JSON in Copilot studio
That's odd @Rafael_Diaz , @VauBee
You should be able to return JSON as a string without compose actions from Power Automate, and then do your parsing. When you test, can you check what the value is for the json variable? (in the Variables > Test pane)
Hi @Rafael_Diaz ! Looks like you need to convert the list of projects into a single string before passing it to subsequent actions. Maybe this would be a workaround:
Assuming you want to create a comma-separated list of project names, the following expression in the “Compose” action shoudl work:
join(outputs('Parse_JSON')?['body']?['json'], ', ')
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question / helped to solve your problem, please accept as solution and give me a Thumbs up. Thanks! - Remember: you can accept more than one post as a solution.