Have you ever wanted to return data from an adaptive card easily? Do you want to use it to act as a prompt to trigger another topic or an AI call in Copilot Studio? Well then check this video out. I’ll show you an easy way to work with the adaptive cards Action.Submit, to generate a prompt library, with images!
The section you want to focus on is:
"selectAction": {
"type": "Action.Submit",
"data": "Prompt one example"
}
Example Adaptive Card:
{
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "Example of Prompts",
"weight": "Bolder"
},
{
"type": "ColumnSet",
"spacing": "Medium",
"columns": [
{
"type": "Column",
"width": "50px",
"items": [
{
"type": "Image",
"url": "https://unsplash.it/80?image=1083",
"size": "Medium"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Prompt one example"
},
{
"type": "TextBlock",
"text": "Prompt one information",
"isSubtle": true,
"spacing": "None"
}
]
}
],
"selectAction": {
"type": "Action.Submit",
"data": "Prompt one example"
}
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "50px",
"items": [
{
"type": "Image",
"url": "https://unsplash.it/80?image=1080",
"size": "Medium"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Prompt two example"
},
{
"type": "TextBlock",
"text": "Prompt two information",
"isSubtle": true,
"spacing": "None"
}
]
}
],
"selectAction": {
"type": "Action.Submit",
"data": "Prompt two example"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}