Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - Topic Creation & Management
Answered

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

(0) ShareShare
ReportReport
Posted on by 51
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:
  • Suggested answer
    JasonAbba Profile Picture
    51 on at
    How to parse Table type to JSON type in Copilot Studio Topics
    I have found the answer to above question in another post on Copilot Studio General Channel. The answer was suggested by @HenryJammes, It involved using an undocumented node called "Set Text Variable", which only has 2 parameters. The name of the new string variable and the value part will would be - in this case the Topic.varValue (which is of Table Datatype).

    Find the original answer here 👉 https://community.powerplatform.com/forums/thread/details/?threadid=8136568a-9acb-4ebb-bd82-7150679adb79
  • Suggested answer
    Artur Stepniak Profile Picture
    1,526 Super User 2025 Season 1 on at
    How to parse Table type to JSON type in Copilot Studio Topics
    Hello,
     
    have you tried to use a JSON() function on the table?
     
    In the meantime - I've just opened a group related to Copilot stuff. Maybe you'd like to join? I plan for it to be the place, where we can help each other. Here's the link: https://community.powerplatform.com/usergroups/details/?groupid=dbc367c2-b7b7-ef11-b8e8-7c1e5259f813.
     
    In case of any other questions, let me know. If the answer helped you, mark it, so that others can benefit from it.
     
    Best regards,
     
    Artur Stepniak
    Interested in GenAI? Visit my site!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 169 Super User 2025 Season 1

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 150

#3
sandeep_angara Profile Picture

sandeep_angara 75

Featured topics