web
You’re offline. This is a read only version of the page.
close
Skip to main content
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:
I have the same question (0)
  • 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,528 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 410 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 146 Super User 2025 Season 2

#3
Romain The Low-Code Bearded Bear Profile Picture

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

Last 30 days Overall leaderboard

Featured topics