Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Answered

Custom Data in Generative AI

(0) ShareShare
ReportReport
Posted on by 9

I have created a custom copilot to summarize the output of the power automate flow.

 

Here is the power automate flow.

 

likhithd15_0-1714633016640.png

 

 

The output of the flow. (string(outputs('Get_items')?['body/value']))

 

likhithd15_1-1714633105994.png

 

 

Below is the flow of the custom copilot to get the summary.

 

likhithd15_2-1714633194918.png

 

likhithd15_3-1714633209869.png

 

 

likhithd15_4-1714633222671.png

 

 

likhithd15_5-1714633236439.png

Below is the body of the power automate flow which is in string format.

 

{ "full_details": "[{\"@odata.etag\":\"\\\"1\\\"\",\"ItemInternalId\":\"6\",\"ID\":6,\"Client\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":1,\"Value\":\"Access \"},\"Client#Id\":1,\"CaseStudy\":\"Loan Processing System\",\"Details\":\"Automate Loan Delinquency Report \",\"Domain\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":1,\"Value\":\"BFS\"},\"Domain#Id\":1,\"Subdomain\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":1,\"Value\":\"Banking\"},\"Subdomain#Id\":1,\"{Identifier}\":\"Lists%252fProjectInformations%252f6_.000\",\"{IsFolder}\":false,\"{Thumbnail}\":{\"Large\":null,\"Medium\":null,\"Small\":null},",\"{Name}\":\"\",\"{FilenameWithExtension}\":\"\",\"{Path}\":\"Lists/ProjectInformations/\",\"{FullPath}\":\"Lists/ProjectInformations/6_.000\",\"{HasAttachments}\":false,\"{VersionNumber}\":\"1.0\"},{\"@odata.etag\":\"\\\"1\\\"\",\"ItemInternalId\":\"7\",\"ID\":7,\"Client\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":2,\"Value\":\"ab Kapital\"},\"Client#Id\":2,\"TypeofProject\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":1,\"Value\":\"Advisory\"},\"TypeofProject#Id\":1,\"CaseStudy\":\"PCI DSS Compliant Payment Solution\",\"Details\":\"Identify the data flows, business processes, facilities, IT support systems and card holder data environment. Identify payment systems and third party service providers ,With the increase in payment card security breaches, client envisioned implementing PCI DSS compliant practices to mitigate the risk of fraud \\n \",\"Domain\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":1,\"Value\":\"BFS\"},\"Domain#Id\":1,\"Subdomain\":{\"@odata.type\":\"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference\",\"Id\":2,\"Value\":\"Financial Services\"},\"Subdomain#Id\":2,\"{Identifier}\":\"Lists%252fProjectInformations%252f7_.000\",\"{IsFolder}\":false,\"{Thumbnail}\":{\"Large\":null,\"Medium\":null,\"Small\":null},\"{Link}\":,\"{Name}\":\"\",\"{FilenameWithExtension}\":\"\",\"{Path}\":\"Lists/ProjectInformations/\",\"{FullPath}\":\"Lists/ProjectInformations/7_.000\",\"{HasAttachments}\":false,\"{VersionNumber}\":\"1.0\"}]" }

 

 

I am not getting any output from the Generative Answers instead getting error.

Error Message: Missing or invalid assignment for variable ‘searchResult.Content’. Error Code: MissingOrInvalidRequiredProperty Conversation Id: c26a4f4a-9f45-4b55-983c-a8088339f7c9 Time (UTC): 2024-05-02T08:58:25.224Z

 

What should I add in schema of parse value action?

 

Please help me to get the summary of the power automate data.

 

@HenryJammes @RezaDorrani  @dewainr

 

  • likhithd15 Profile Picture
    likhithd15 9 on at
    Re: Custom Data in Generative AI

    Hi @adilei ,

     

    Thank you for the solution.

  • Verified answer
    adilei Profile Picture
    adilei on at
    Re: Custom Data in Generative AI

    There's no need to remove the root object, PowerFX can traverse nested objects as well:

     - kind: SetVariable
     id: setVariable_8lt5XR
     variable: Topic.formattedResults
     value: |-
     =ForAll(Topic.parsedResults.full_details,
     {
     Content: Details
     })
  • Umianta Profile Picture
    Umianta 290 on at
    Re: Custom Data in Generative AI

    Hi @likhithd15 

    It appears there's an issue with the JSON format. Remove the "{ "full_details": " part, so the remaining part can be considered JSON arrayIf this was helpful:
    Please mark it as a solution
    Give me a thumbs-up
    Connect on LinkedIn
    I consistently upload technical videos. If you're interested, please visit and subscribe to my YouTube Channel
    Always glad to help, Umesh Khandelwal!.

     

     
     
     
     
     

     

  • likhithd15 Profile Picture
    likhithd15 9 on at
    Re: Custom Data in Generative AI

    Hi  @Umianta ,

    Thank you for your response.

     

     

    I have added the below formula in set variable but it's not working.

     

    ForAll(Topic.Var2.value,

        {

            Content: "Details" - Details ,

            ContentLocation: Blank()

        }

     

     

    likhithd15_0-1714714844518.png

  • Umianta Profile Picture
    Umianta 290 on at
    Re: Custom Data in Generative AI

    Hi @likhithd15 

     

    Generative Answers requires the custom data value to be structured in the following format.

     

    [ { Content: "This is a sample piece of text that was provided for testing purposes, to be replaced with content of your choice", ContentLocation: "https://contoso.com/p1.htm", Title: "Contoso Sample" }, { Content: "This is a second bit of sample text that can be replaced with content of your choice", ContentLocation: "https://fabrikam.com/p2.htm" }, { Content: "This is a third bit of sample text that can be replaced with content of your choice", Title: "Adventure Works Cycles Sample" } ]

     You need to parse the flow response and transform it into like above format. For more information, refer to the documentation provided at https://learn.microsoft.com/en-us/microsoft-copilot-studio/nlu-generative-answers-custom-dat

    If this was helpful:
    Please mark it as a solution
    Give me a thumbs-up
    Connect on LinkedIn
    I consistently upload technical videos. If you're interested, please visit and subscribe to my YouTube Channel
    Always glad to help, Umesh Khandelwal!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard

Featured topics