web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Parse json is not work...
Power Automate
Suggested Answer

Parse json is not working properly for AI prompt output

(0) ShareShare
ReportReport
Posted on by 14
i have a AI prompt flow which returns the below .I am using Parse json in body/text field . But the compose for Parse json is returning URL which is wrong.
 
 Output from AI prompt:
{
    "statusCode"200,
    "headers": {
        "Cache-Control""no-cache",
        "Vary""Accept-Encoding",
        "Set-Cookie""ARRAffinity=136371c5a39760334e643115134d20c55",
        "x-ms-service-request-id""8094ec71-3a16-45e0-ab27-ace2a382685b",
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "REQ_ID""8094ec71-3a16-45e0-ab27-ace2a382685b",
        "AuthActivityId""877a5040-2045-493a-bab1-87e8736c6093",
        "x-ms-dop-hint""4",
        "x-ms-ratelimit-time-remaining-xrm-requests""1,200.00",
        "x-ms-ratelimit-burst-remaining-xrm-requests""7999",
        "X-Content-Type-Options""nosniff",
        "OData-Version""4.0",
        "X-Source""951061461034818382241111142150180126114235129246197252263,1861701211831225232228951311951620810981919094152284170631771431661551991699139136",
        "Public""OPTIONS,GET,HEAD,POST",
        "Date""Sat, 28 Mar 2026 05:52:48 GMT",
        "Allow""OPTIONS,GET,HEAD,POST",
        "Content-Type""application/json; odata.metadata=minimal",
        "Expires""-1",
        "Content-Length""926"
    },
    "body": {
        "@odata.context""https://or0.crm.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.PredictResponse",
        "responsev2": {
            "@odata.type""#Microsoft.Dynamics.CRM.expando",
            "operationStatus""Success",
            "predictionId""b8a5f5e4-7d1b-4548-8dfc-fd936ed3ed70",
            "predictionOutput": {
                "@odata.type""#Microsoft.Dynamics.CRM.expando",
                "imagesCount@odata.type""#Int64",
                "imagesCount"0,
                "modelType""default",
                "text""{\n  \"from_date\": \"2025-01-01\",\n  \"to_date\": \"2025-02-28\"\n}",
                "thoughtSteps""",
                "finishReason""stop",
                "totalTokens@odata.type""#Int64",
                "totalTokens"1729,
                "promptTokens@odata.type""#Int64",
                "promptTokens"1700,
                "completionTokens@odata.type""#Int64",
                "completionTokens"29,
                "modelName""gpt-41-mini-2025-04-14",
                "costAsAiBuilderCredits@odata.type""#Int64",
                "costAsAiBuilderCredits"0,
                "costAsCopilotCredits"0.2
            }
        }
    }
}
compose output.jpg
flow.jpg
Categories:
I have the same question (0)
  • chiaraalina Profile Picture
    1,864 Super User 2026 Season 1 on at
     
     
    Did you chose to return real JSON in your prompt?
     
     
    And do you pass @{outputs('Run_a_prompt')?['body/responsev2/predictionOutput/text']} as Content to your Parse JSON action?
     
    Can you show us what you are passing there and your schema?
  • CU03050447-0 Profile Picture
    14 on at
    JSON schema is 
    {
        "type": "object",
        "properties": {
            "statusCode": {
                "type": "integer"
            },
            "headers": {
                "type": "object",
                "properties": {
                    "Cache-Control": {
                        "type": "string"
                    },
                    "Vary": {
                        "type": "string"
                    },
                    "Set-Cookie": {
                        "type": "string"
                    },
                    "x-ms-service-request-id": {
                        "type": "string"
                    },
                    "Strict-Transport-Security": {
                        "type": "string"
                    },
                    "REQ_ID": {
                        "type": "string"
                    },
                    "AuthActivityId": {
                        "type": "string"
                    },
                    "x-ms-dop-hint": {
                        "type": "string"
                    },
                    "x-ms-ratelimit-time-remaining-xrm-requests": {
                        "type": "string"
                    },
                    "x-ms-ratelimit-burst-remaining-xrm-requests": {
                        "type": "string"
                    },
                    "X-Content-Type-Options": {
                        "type": "string"
                    },
                    "OData-Version": {
                        "type": "string"
                    },
                    "X-Source": {
                        "type": "string"
                    },
                    "Public": {
                        "type": "string"
                    },
                    "Date": {
                        "type": "string"
                    },
                    "Allow": {
                        "type": "string"
                    },
                    "Content-Type": {
                        "type": "string"
                    },
                    "Expires": {
                        "type": "string"
                    },
                    "Content-Length": {
                        "type": "string"
                    }
                }
            },
            "body": {
                "type": "object",
                "properties": {
                    "@@odata.context": {
                        "type": "string"
                    },
                    "responsev2": {
                        "type": "object",
                        "properties": {
                            "@@odata.type": {
                                "type": "string"
                            },
                            "operationStatus": {
                                "type": "string"
                            },
                            "predictionId": {
                                "type": "string"
                            },
                            "predictionOutput": {
                                "type": "object",
                                "properties": {
                                    "@@odata.type": {
                                        "type": "string"
                                    },
                                    "imagesCount@odata.type": {
                                        "type": "string"
                                    },
                                    "imagesCount": {
                                        "type": "integer"
                                    },
                                    "modelType": {
                                        "type": "string"
                                    },
                                    "text": {
                                        "type": "string"
                                    },
                                    "thoughtSteps": {
                                        "type": "string"
                                    },
                                    "finishReason": {
                                        "type": "string"
                                    },
                                    "totalTokens@odata.type": {
                                        "type": "string"
                                    },
                                    "totalTokens": {
                                        "type": "integer"
                                    },
                                    "promptTokens@odata.type": {
                                        "type": "string"
                                    },
                                    "promptTokens": {
                                        "type": "integer"
                                    },
                                    "completionTokens@odata.type": {
                                        "type": "string"
                                    },
                                    "completionTokens": {
                                        "type": "integer"
                                    },
                                    "modelName": {
                                        "type": "string"
                                    },
                                    "costAsAiBuilderCredits@odata.type": {
                                        "type": "string"
                                    },
                                    "costAsAiBuilderCredits": {
                                        "type": "integer"
                                    },
                                    "costAsCopilotCredits": {
                                        "type": "number"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    PIC.png
  • Suggested answer
    chiaraalina Profile Picture
    1,864 Super User 2026 Season 1 on at
    Hi 
     
    I would do this:
     
    1. In your Prompt change output to JSON.
     
     
    2. Then you can use it directly, without parsing action:
     
     
     
     
    Let me know if it worked!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard