Skip to main content

Notifications

Copilot Studio - Topic Creation & Management
Unanswered

How to parse Table type to JSON type in Copilot Studio Topics

(0) ShareShare
ReportReport
Posted on by 21
I have a API which returns the following in Table datatype.


[
  {
    "@odata.etag": "",
    "Cabin_Decorations__c": 1.0,
    "CreatedById": "******",
    "CreatedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-13T11:59:58.0000000Z"
    },
    "Custom_Notes__c": "Loves chocolate cake",
    "Customer_Testimonials__c": "\"The decorations and cake were perfect! Thank you for the effort!\"",
    "Dinner_Reservation__c": 1.0,
    "Id": "******",
    "IsDeleted": false,
    "ItemInternalId": "******",
    "LastActivityDate": null,
    "LastModifiedById": "******",
    "LastModifiedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "LastReferencedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "LastViewedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "Name": "******",
    "Occasion_Type__c": "Birthday",
    "Occasions_Image_URL__c": "******",
    "OwnerId": "******",
    "Special_Inclusions__c": "Birthday cake, room décor",
    "Suggested_Cabin_Type__c": "Balcony Suite",
    "SystemModstamp": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    }
  },
  {
    "@odata.etag": "",
    "Cabin_Decorations__c": 1.0,
    "CreatedById": "******",
    "CreatedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-13T11:59:58.0000000Z"
    },
    "Custom_Notes__c": "Prefers a quiet dinner setting",
    "Customer_Testimonials__c": "\"The private dinner setup was magical—highly recommend!\"",
    "Dinner_Reservation__c": 1.0,
    "Id": "******",
    "IsDeleted": false,
    "ItemInternalId": "******",
    "LastActivityDate": null,
    "LastModifiedById": "******",
    "LastModifiedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "LastReferencedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "LastViewedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "Name": "******",
    "Occasion_Type__c": "Anniversary",
    "Occasions_Image_URL__c": "******",
    "OwnerId": "******",
    "Special_Inclusions__c": "Champagne, romantic dinner",
    "Suggested_Cabin_Type__c": "Oceanview Suite",
    "SystemModstamp": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    }
  },
  {
    "@odata.etag": "",
    "Cabin_Decorations__c": 1.0,
    "CreatedById": "******",
    "CreatedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-13T11:59:58.0000000Z"
    },
    "Custom_Notes__c": "Special honeymoon photo shoot",
    "Customer_Testimonials__c": "\"An unforgettable honeymoon! The spa and surprises were amazing.\"",
    "Dinner_Reservation__c": 1.0,
    "Id": "******",
    "IsDeleted": false,
    "ItemInternalId": "******",
    "LastActivityDate": null,
    "LastModifiedById": "******",
    "LastModifiedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "LastReferencedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "LastViewedDate": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    },
    "Name": "******",
    "Occasion_Type__c": "Honeymoon",
    "Occasions_Image_URL__c": "******",
    "OwnerId": "******",
    "Special_Inclusions__c": "Spa treatments, private photo shoot",
    "Suggested_Cabin_Type__c": "Honeymoon Suite",
    "SystemModstamp": {
      "$kind": "DateTimeNoTimeZoneDataValue",
      "value": "2024-12-18T08:03:58.0000000Z"
    }
  }
]
This data is stored in Topic.VarValue. The requirement is simple, I need to convert this variable which is in table format to JSON format, I can use this to pass into a AI Builder custom prompt within my topic (it only accepts string as input)

thanks in advance.
 
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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,161

Leaderboard

Featured topics