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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Connector returning JS...
Copilot Studio
Unanswered

Connector returning JSON in curly quotes

(0) ShareShare
ReportReport
Posted on by 44

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.

Categories:
I have the same question (0)
  • ManikandanS Profile Picture
    246 on at

    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.

  • Revl0ck97 Profile Picture
    44 on at

    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"
    }

    Revl0ck97_0-1708933991481.png

    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!

  • adilei Profile Picture
    on at

    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}]

    .

     

  • Revl0ck97 Profile Picture
    44 on at

    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.

  • adilei Profile Picture
    on at

    Create a new topic, click on the three dots and "Open code editor". Then paste the YAML into the code editor.

     

    adilei_0-1709013877358.png

     

  • Revl0ck97 Profile Picture
    44 on at

    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()}]

    Revl0ck97_0-1709091861811.png

     

  • adilei Profile Picture
    on at

    Can you share the YAML for your topic? (from edit code)

  • Revl0ck97 Profile Picture
    44 on at

    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

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard