I want the multiple text field response from a variable in the tabular format in microsoft copilot.
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.
Michael E. Gernaey
169
Super User 2025 Season 1
Romain The Low-Code...
150
sandeep_angara
75