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 / I need help with parsi...
Power Automate
Unanswered

I need help with parsing the output , that i got from a custom Chatgpt connector

(0) ShareShare
ReportReport
Posted on by 280

The response that i used to get from chatgpt custom connector was 

{
  "id": "chatcmpl-96BTTShf0j4xUMuLREY7cnVTU3F7B",
  "object": "chat.completion",
  "created": 1711261103,
  "model": "gpt-3.5-turbo-0125",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "{\n  \"title\": \"Workstation Network Connectivity Issue\",\n  \"IssueType\": \"Network\",\n  \"summary\": \"Frequent disruptions in internet access\",\n  \"response\": \"Thank you for reporting the network connectivity issue. Our team is working on resolving it. We will update you shortly.\"\n}"
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 298,
    "completion_tokens": 61,
    "total_tokens": 359
  },
  "system_fingerprint": "fp_3bc1b5746c"
}
I used to extract title , Issue Type, Summary and Response from this json using these expressions in power automate 
json( outputs('GetResponse')?['body']?['choices']?[0]?['message']?['content'] )?['title']
json( outputs('GetResponse')?['body']?['choices']?[0]?['message']?['content'] )?['summary']......similarly others. 
 
But the issue started when i started giving prompt text bigger and using a more precise model "gpt-4-0125-preview".
The response it started returning is like this. 
--------------------------------------------------------------------------------------------------------------------------------------
{
"id": "chatcmpl-97yXwCaIAN9zWyJimENBUFOesSDK6",
"object": "chat.completion",
"created": 1711688064,
"model": "gpt-4-0125-preview",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "```json\n{\n \"title\": \"QuickBooks Report Generation Issue\",\n \"IssueType\": \"Software\",\n \"Summary\": \"Software crashes during Q1 report generation\",\n \"Response\": {\n \"choices\": [\n {\n \"Acknowledgement\": \"We've received your report on the QuickBooks Pro 2024 issue.\",\n \"TemporarySolution\": \"Please try reinstalling the software. We'll update you shortly.\"\n }\n ]\n }\n}\n```"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 400,
"completion_tokens": 96,
"total_tokens": 496
},
"system_fingerprint": "fp_a7daf7c51e"
}
--------------------------------------------------------------------------------------------------------------------------------------
And ofcourse all my expressions failed , the reason was this "```" , the error i got was 
-----------------------------------------------------------------------------------------------------------------------------------------
Unable to process template language expressions in action 'varTitle' inputs at line '0' and column '0': 'The template language function 'json' parameter is not valid. The provided value '```json
{
"title": "QuickBooks Report Generation Issue",
"IssueType": "Software",
"Summary": "Software crashes during Q1 report generation",
"Response": {
"choices": [
{
"Acknowledgement": "We've received your report on the QuickBooks Pro 2024 issue.",
"TemporarySolution": "Please try reinstalling the software. We'll update you shortly."
}
]
}
}
```' cannot be parsed: 'Unexpected character encountered while parsing value: `. Path '', line 0, position 0.'. Please see https://aka.ms/logicexpressions#json for usage details.'.
-----------------------------------------------------------------------------------------------------------------------------------
Now what i need is a way to avoid this "` ` `" in my response. 
I tried reducing the prompt length , but the content property still has these " ` ` ` " symbols. 
I need some insight regarding why i am getting these ? 
Categories:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 237 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 194

Last 30 days Overall leaderboard