Skip to main content

Notifications

Calling Actions from Copilot Studio
Unanswered

I want to get the bot response in tabular fomat as currently it is text response with multiple field

Posted on by 2

I want the multiple text field response from a variable in the tabular format in microsoft copilot.

Categories:
  • renatoromao Profile Picture
    renatoromao 6,762 on at
    Re: I want to get the bot response in tabular fomat as currently it is text response with multiple field

    Hi,

     

    Are you using Power Automate flows or just a message response to the user?

     

    Option 1 - Power Automate

    To get a tabular format for the bot response with multiple text fields via Power Automate flows, you can follow these steps:

    1. Initialize a Variable for Markdown Table:

    - Add an Initialize Variable action and create a variable called "MarkDownTable".
    - In this action, you’ll create a table using Markdown.
    | Field 1 | Field 2 | Field 3 |
    |---------|---------|---------|


    2. Loop Through Results:

    - Use an Apply to Each action.
    - Use the value field of your "Get Items" results action in the output field.
    - Add another Append to String Variable action within the loop and select the "MarkDownTable" variable.
    - Paste the following code snippet into the value field (make sure to add a carriage return at the end):
    | Value 1 | Value 2 | Value 3 |

     

    3. Replace the sample values with your actual data.

    - Bot Response: Return the "MarkDownTable" variable as the bot response.

     

    Option 2 - Message to the User via Adaptive Cards
    Adaptive Cards are a great way to create interactive and dynamic user interfaces within your chatbots. They allow you to define the visual layout and behavior of your content, which can then be rendered across various platforms and devices (look at the limitations as well).

    Here’s how you can use Adaptive Cards with multiple text fields in a tabular format:

     

    1. Define Your Data:

    - First, you’ll need to have your data ready. 


    2. Create an Adaptive Card:

    - You can create an Adaptive Card using JSON. https://adaptivecards.io/designer/ 

     

    3. Replace Data Dynamically:
    - In your application, replace ${data.Field1} information in the JSON to your custom value.

     

    4. Render the Adaptive Card:

    - Display the output in the Topic response to the user


    Let me know if you have any other questions.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics