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 / How to parse Table typ...
Copilot Studio
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.
 
I have the same question (0)
  • Suggested answer
    Artur Stepniak Profile Picture
    1,539 Super User 2025 Season 2 on at
    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!
  • Suggested answer
    JasonAbba Profile Picture
    51 on at
    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

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 261 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard