Dynamic Adaptive Cards via Email in Copilot Studio Using Prompts
Summary
- Build autonomous agents that respond to email queries and generate dynamic Adaptive Cards.
- Use prompt tools to break down complex instructions into manageable, reusable components.
- Send personalized, interactive content directly via Outlook email.
- Learn formatting requirements and best practices for Adaptive Cards in email.
Table of Contents
- Introduction
- Why Dynamic Adaptive Cards via Email
- Using Prompt Tools to Manage Instructions
- Building the Holiday Planning Agent
- Processing Email Queries
- Adaptive Card Formatting for Email
- Demo: Holiday Query in Action
- Key Takeaways
- References
Introduction
Copilot Studio enables makers to create intelligent agents that go beyond the chat interface. In this post, I’ll show you how to build an autonomous agent that processes email queries and responds with dynamic Adaptive Cards—delivering personalized, interactive content directly to users’ inboxes.
We’ll build a holiday planning agent that receives email queries, processes them using AI, and returns rich itineraries, transportation options, cost estimates, visa information, and recommended stays—all formatted as Adaptive Cards in Outlook.
Why Dynamic Adaptive Cards via Email
Adaptive Cards allow you to create rich, interactive experiences that engage users beyond traditional chat. By sending them via email, you can:
- Deliver personalized content tailored to each query.
- Engage users asynchronously without requiring them to be in a chat session.
- Present structured information in a visually appealing, scannable format.
- Enable interactive actions directly within the email (buttons, inputs, etc.).
Use Cases
- Travel itinerary planning and booking confirmations
- Order summaries and shipment tracking
- Survey and feedback collection
- Approval workflows and notifications
- Personalized reports and dashboards
Using Prompt Tools to Manage Instructions
When building complex agents, instructions can become overwhelming. Prompt tools help you break down large instruction sets into smaller, manageable, reusable prompts.
Benefits of Prompt Tools
- Reduce complexity: Keep your main agent instructions concise.
- Improve maintainability: Update specific prompts without touching the entire agent.
- Enable conditional execution: Invoke prompts only when needed based on agent behavior.
- Reuse across agents: Share common prompts between multiple agents.
How It Works
In my holiday planning agent, I created a separate prompt tool called “Detailed Travel Plan” that contains specific instructions for:
- Producing a list of activities and attractions
- Suggesting transportation options
- Providing cost estimates
- Identifying visa requirements
- Recommending accommodations
By isolating these instructions in a prompt tool, my main agent’s instructions stay clean and focused on orchestration—extracting the email query and invoking the appropriate prompt.
Sample instructions to use prompt response to send as as adaptive card
Building the Holiday Planning Agent
Agent Setup
- Create an autonomous agent in Copilot Studio.
- Add an email trigger: Use “When a new email arrives” with a filter (e.g., subject contains “holiday query”).
- Configure two tools:
- Prompt tool: “Detailed Travel Plan” with comprehensive instructions.
- Email Management MCP Server: To send the response back to the requester.
Main Agent Instructions
The main agent’s instructions are straightforward:
# Purpose
The purpose of this agent is to autonomously monitor incoming emails, extract and process queries, and respond to the sender with the requested details in a timely and accurate manner.
IMPORTANT: Do not wait for any user input, Work completely autonomously.
DO NOT invent or assume. AVOID hallucinations
Provide citations for every information provided.
# Step-by-Step Instructions
## 1. Trigger on Incoming Email
## 2. Extract and Interpret Query
Note down the 'from' information who is the requestor from the email and body of the email which is the query.
## 3. Process the Query
Send the body of the email received to DetailedTravelPlan to get detailed plan.
## 4. Compose and Send Response
Transform the detailed plan from previous steps into an intuitive format using adaptive card.
Include Clear headings for each section of the plan.
Relevant inputs or actions (if needed).A logical layout that is easy to read.
Validate Syntax
Follow the official Adaptive Card JSON schema,
### Send via Email
Use the SendEmail action through the Email Management MCP Server.
To: requestor and reshmee@reshmee.onmicrosoft.com
Body: Wrap the card JSON in the required HTML script tag
<script type="application/adaptivecard+json">
[adaptivecard]
</script>
Ensure the email is sent as HTML so the card renders correctly.
# Error Handling and Limitations
- If the query cannot be understood, send a polite clarification request.
- If the requested information is unavailable, inform the user and provide alternative options if possible.
# Interaction Example
- Incoming Email: "Can you holiday plan for Italy for a family of 4?"
- Agent Response: "Hello, here is prospective holiday plan: [details]. Let me know if you need further assistance."
Prompt Tool Instructions
The “Detailed Travel Plan” prompt contains detailed instructions to return the following :
- A day-by-day itinerary with activities and attractions
- Transportation options (flights, trains, car rentals)
- Cost estimates for accommodation, transport, and activities
- Visa requirements and links to official resources
- Recommended stays (hotels, hostels, vacation rentals)
- Helpful websites for booking flights and accommodations
This approach allows the agent to decide the format dynamically based on the query, rather than forcing a rigid template.

Processing Email Queries
Step-by-Step Flow
- Email arrives: The trigger detects new emails with “holiday query” in the subject.
- Extract content: The agent extracts the email body containing the travel query.
- Invoke prompt: The query is sent to the “Detailed Travel Plan” prompt tool.
- AI processes: The prompt analyzes the query, researches options, and generates a comprehensive response.
- Format as Adaptive Card: The AI structures the output as an Adaptive Card JSON.
- Send email: The agent uses the email connector to send the card to the requester.
Example Query
Subject: Holiday Query
Body: Plan my trip to Germany for one week.

The agent will process this query and return a detailed itinerary, cost breakdown, flight options, visa info, and recommended accommodations—all in a visually rich Adaptive Card.

Adaptive Card Formatting for Email
HTML Wrapping Requirement
To display Adaptive Cards correctly in Outlook emails, you must wrap the JSON in a <script> tag:
<script type="application/adaptivecard+json">
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "Your Holiday Itinerary",
"weight": "Bolder",
"size": "Large"
}
]
}
</script>
Email Tool Configuration
In the “Send Email” tool instructions, specify:
Wrap the Adaptive Card JSON within a <script> tag with type="application/adaptivecard+json".
Ensure the email is sent as HTML format.
Compatibility Notes
- Supported: Outlook (desktop, web, mobile)
- Not supported: Gmail, Yahoo Mail, and other non-Microsoft email clients
If your recipients use Gmail or other platforms, consider falling back to HTML-formatted emails with tables and styling, or provide a web link to view the content.
Demo: Holiday Query in Action
Sending the Query
I sent an email with:
Subject: Holiday Query
Body: Plan my trip to Germany for one week.
Received Response
Within moments, I received an email with a beautifully formatted Adaptive Card containing:
- Day-by-day itinerary: Activities, attractions, and sightseeing recommendations.
- Cost estimates: Breakdown for accommodation, transport, meals, and activities.
- Flight options: Links to websites for booking flights.
- Visa requirements: Information and links to official resources.
- Recommended stays: Hotels, hostels, and vacation rentals with price ranges.
The Adaptive Card displayed all this information in a scannable, visually appealing format far better than plain text.
Key Takeaways
- Prompt tools simplify complexity: Break down large instruction sets into focused, reusable prompts.
- Dynamic formatting: Let the AI decide how to structure responses rather than using rigid templates.
- Email extends reach: Deliver rich, interactive content beyond the chat interface.
- HTML wrapping is critical: Use
<script type="application/adaptivecard+json">for Outlook compatibility. - Test compatibility: Verify Adaptive Card rendering in target email clients before rollout.