I'm using an Office 365 Users Send Http Request connector and want to parse the outputs as a table to be used in a generative answers node, however the JSON outputs are in curly quotes instead of straight quotes.
Outputs:
{
“displayName”:“Doe, John”,
“givenName”:“John”
}
Instead of:
{
"displayName":"Doe, John",
"givenName":"John"
}
So despite having the right schema the parse value would return blank since it can't read the output JSON.
Hi @adilei, sorry for the late reply here it is:
kind: AdaptiveDialog
modelDescription: Summary of my profile
beginDialog:
kind: OnRecognizedIntent
id: main
intent: {}
actions:
- kind: OAuthInput
id: X4ErUh
title: Login
text: Please Login
- kind: SetVariable
id: setVariable_t1Yg2l
variable: Topic.varUser
value: =Concatenate("https://graph.microsoft.com/v1.0/users/", System.User.PrincipalName)
- kind: InvokeConnectorAction
id: invokeConnectorAction_yyMEjK
input:
binding:
ContentType: application/json
Method: GET
Uri: =Topic.varUser
output:
kind: SingleVariableOutputBinding
variable: Topic.HttpRequestProfile
connectionReference: cr6bd_psRestCalendarAdTest.cr.fMTI3T3K
operationId: HttpRequest
- kind: SetVariable
id: setVariable_4l88ix
variable: Topic.myTable
value: =[{Content:Topic.HttpRequestProfile,ContentLocation:Blank()}]
- kind: SendActivity
id: sendActivity_Qj37l2
activity: "{Topic.myTable}"
- kind: SearchAndSummarizeContent
id: searchAndSummarizeContent_7aScH6
userInput: =System.Activity.Text
additionalInstructions: Give a general summary of the user's profile. Answer in professional human manner.
publicDataSource: {}
sharePointSearchDataSource: {}
customDataSource:
searchResults: =Topic.myTable
Can you share the YAML for your topic? (from edit code)
Hi @adilei ,
It works as intended with generative answers node as is but if I incorporate it with the outputs from the Send Http Request action this error pops up:
[{Content:Topic.HttpRequestProfile,ContentLocation:Blank()}]
Create a new topic, click on the three dots and "Open code editor". Then paste the YAML into the code editor.
Hi @adilei,
Sorry I'm still quite new to Copilot, where do I insert this? I'm unfamiliar with it. Any Microsoft documentation on this as a guide? Thanks a lot btw.
Here is how to build a new Table variable, in the format Generative Answers expects, by referencing values from an existing Record variable. Let me know if this helps.
kind: AdaptiveDialog
beginDialog:
kind: OnRecognizedIntent
id: main
intent:
triggerQueries:
- add record
actions:
- kind: SetVariable
id: setVariable_BiGn8t
variable: Topic.myRecord
value: "={key1:\"value1\",key2:\"value2\"}"
- kind: SetVariable
id: setVariable_4l88ix
variable: Topic.myTable
value: =[{Content:Topic.myRecord.key1,ContentLocation:Topic.myRecord.key2}]
.
Hi @ManikandanS,
I'm, using the Send an HTTP Request Connector action node. Sorry but the sample JSON provided was lacking I just wanted to give a shortened sample.
{
"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity",
"businessPhones":[],
"displayName":"Doe, John",
"givenName”":"John",
"id":"12345",
"jobTitle":"Sample Title",
"mail":"john.doe@gmail.com",
"mobilePhone":null,
"officeLocation":"Sample",
"preferredLanguage":null,
"surname":"Doe",
"userPrincipalName":"john.doe@gmail.com"
}
I was just wondering if there is a way for the outputs to be in straight quotes instead? So that I could work with other Connector JSON outputs other than the connector above so as not to resort to flows. Thanks for the reply!
Hello @Revl0ck97 ,
The display name attribute is already available as part of system variable in co pilot studio, apart from display name there are other attributes readily available with respect to current user. If the attribute is not present, you can get the details from connectors. Are you using flow to connect to office 365 connectors?
Thanks.
stampcoin
8
Artur Stepniak
5
Super User 2025 Season 1
Ekta Gupta
4