Inbox2Calendar #
Build an AI Agent That Converts Outlook Emails into Calendar Events #
Platform: Microsoft Copilot Studio Channels: Microsoft 365 Copilot, Outlook desktop, and Outlook Android Languages: English and Danish Tools: Work IQ Mail and Work IQ Calendar Automation approach: Generative orchestration and MCP tools Power Automate required: No
Document Purpose #
This guide explains how to build, test, publish, install, and use Inbox2Calendar, a Microsoft Copilot Studio agent that converts selected Outlook emails into calendar events.
Inbox2Calendar can recognize:
- Formal appointment confirmations
- Informal commitments
- Dentist and doctor appointments
- Lunch and dinner arrangements
- Concert and event tickets
- Restaurant reservations
- Travel confirmations
- Courses, conferences, and webinars
- Service appointments
The guide includes the practical lessons discovered during implementation, including:
- How Outlook provides the selected email as context
- How to configure Work IQ Mail and Calendar
- How to create personal appointments without permanent attendees
- How to prevent unwanted Teams meeting links
- How to preserve local calendar time
- How to handle ambiguous relative dates
- How to verify the final calendar event
- How to publish and install the agent in Outlook
- How to test the agent in Outlook Android
What You'll Learn (Core Competencies) #
By following this guide, you will acquire key architectural competencies required to build and deploy generative AI agents across Microsoft 365:
- Generative Orchestration vs. Hardcoded Flows: Architect autonomous agent decision loops that select and sequence tools dynamically based on user intent and real-time execution feedback.
- Model Context Protocol (MCP) Integration: Connect agents to enterprise data and actions (Work IQ Mail & Calendar) using modern tool standards without writing custom API middleware.
- Instruction Engineering as Logic & Guardrails: Design system-level instructions that bridge API schema limitations, enforce data boundaries, eliminate phantom attendees, and prevent unwanted side effects.
- Multi-Turn Verification & State Reconciliation: Implement robust multi-step transactional patterns (e.g. create → update → verify) to overcome rigid tool parameters.
- Client Host Context Injection: Understand how host applications (Outlook Desktop and Mobile) pass active selection chips into LLM prompts without redundant mailbox queries.
- Maker Trace Telemetry & Diagnostics: Interpret live LLM reasoning traces, raw tool request/response JSON payloads, and HTTP status codes to diagnose agent issues systematically.
Important
The Work IQ and Microsoft 365 MCP tools described in this guide were preview capabilities when this implementation was tested. Tool names, schemas, behavior, and availability can change.
How to Use This Guide #
Follow the phases in order.
Do not proceed to the next phase until the checkpoint at the end of the current phase has passed.
This is especially important when configuring Mail and Calendar access. A tool appearing in Copilot Studio does not automatically prove that the tool can access the mailbox or calendar.
Use This Guide with an AI Assistant #
I could sit next to you and give you advice as you go through this guide, but an AI can do the same. Upload this guide to an AI (Copilot/Claude/Gemini/ChatGPT) of you choice and then give it the prompt below. It will the guide you through the process step by step, and you will be able to ask questions if the guide is unclear or you run into problems this guide has no answers to.
Open and copy the AI helper prompt
I am building Inbox2Calendar by following the attached guide.
Guide me through the guide one step at a time.
At the beginning, show the phase checklist.
For every response:
1. State which phases and steps are complete.
2. Identify the one current step.
3. Give me only the instructions for that step.
4. Wait for me to confirm success or send a screenshot.
5. Do not move to the next step before I confirm.
6. Examine screenshots carefully.
7. Base your advice on what is visible in the screenshot.
8. Use current official Microsoft documentation when a feature or interface might have changed.
9. Distinguish documented behavior from behavior observed during testing.
10. Do not assume that publishing automatically makes the agent available in Outlook.
11. Do not write a long manual after every screenshot.
12. Help me inspect the Copilot Studio maker trace when a tool behaves unexpectedly.
Assisting AI guidelines:
- Treat screenshots as evidence of the current state.
- Give only one actionable step at a time.
- Avoid repeating completed instructions.
- Validate Mail, Calendar read access, and Calendar write access separately.
- Inspect tool inputs and outputs instead of relying only on the agent’s final message.
- Never assume the selected Outlook email is available unless the email appears as context or can be retrieved successfully.
- Remember that publishing and adding a Microsoft 365 channel are separate steps.
- Remember that installing the agent is separate from publishing it.
- Ask for clarification when “tomorrow” or a similar expression is genuinely ambiguous.
- Never automatically invite a person merely because a name appears on a ticket.
Solution Overview #
Core Concepts & Agent Terminology Glossary #
Before building, familiarize yourself with these foundational agentic concepts and Microsoft 365 terminology:
| Concept / Term | Definition & Role in Agent Architecture |
|---|---|
| Model Context Protocol (MCP) | An open protocol allowing AI models to safely interact with local or remote resources and tools. In Copilot Studio, MCP tools (e.g. Work IQ Mail and Calendar) expose typed schemas that the LLM invokes dynamically. |
| Generative Orchestration | The runtime reasoning loop where the agent's LLM interprets user intent, formulates a multi-step plan, selects tools, fills parameter schemas, and synthesizes results—replacing static conversation trees. |
| Host Context Injection | The client-side mechanism where Outlook automatically attaches the active email as a "context chip" in Copilot's prompt window. This provides immediate working memory without initiating Graph API mailbox queries. |
| Direct Mailbox Retrieval | Server-to-server Graph API calls made by the Work IQ Mail MCP tool to search, read, or inspect mail items across the user's Exchange mailbox when context is missing or search is explicitly requested. |
| Appointment vs. Meeting | An appointment is an event for oneself (attendees = [], isOnlineMeeting = false). A meeting involves multiple attendees and typically provisions an online Microsoft Teams or Skype link. |
| Compensating Transaction | A multi-step workflow pattern where the agent performs an intermediate operation to satisfy a strict API requirement, then immediately modifies the state to achieve the desired end result (e.g. creating an event with a temporary attendee, then removing it). |
| Publishing vs. Channels vs. Store | Publishing commits the agent configuration. Adding a Channel (e.g. Microsoft 365 Copilot) makes the published agent accessible to apps. Store Installation adds the agent to an individual user's personal client selector. |
| Maker Trace (Telemetry) | The real-time diagnostic feed in Copilot Studio's test canvas showing the LLM's step-by-step reasoning, tool invocations, argument JSON payloads, and HTTP response codes. |
Phase Overview #
Phase 1: Define the agent #
- Define the purpose.
- Define supported email types.
- Define what the agent must not create.
- Define when human review is required.
Phase 2: Create Inbox2Calendar #
- Create the custom agent.
- Name the agent.
- Add the initial description.
- Skip unnecessary knowledge sources.
Phase 3: Add the full production instructions #
- Add the complete instruction prompt.
- Configure relative-date handling.
- Configure time-zone handling.
- Configure Calendar MCP behavior.
- Configure verification and attendee cleanup.
Phase 4: Configure AI and languages #
- Verify generative orchestration.
- Keep English as the primary language.
- Add Danish as a secondary language.
Phase 5: Add Mail and Calendar tools #
- Add Work IQ Mail.
- Add Work IQ Calendar.
- Authenticate both connections.
Phase 6: Test Mail and Calendar access #
- Test mailbox access.
- Test calendar read access.
- Test calendar time-zone retrieval.
- Test calendar write access.
Phase 7: Handle Calendar MCP behavior #
- Prevent UTC time errors.
- Prevent unwanted Teams meetings.
- Handle the required attendee parameter.
- Remove temporary attendees.
- Verify the final event.
Phase 8: Test realistic event scenarios #
- Informal lunch.
- Healthcare appointment.
- Relative dates.
- Duplicate prevention.
- Preview-only requests.
- Potential additional attendees.
Phase 9: Configure security #
- Use Microsoft authentication.
- Verify authenticated access.
Phase 10: Publish and configure the channel #
- Publish the agent.
- Add the Microsoft 365 and Microsoft Teams channel.
- Configure personal availability.
Phase 11: Install the agent #
- Open the Microsoft 365 Agent Store.
- Add Inbox2Calendar.
Phase 12: Test in Outlook desktop #
- Open an email.
- Select Inbox2Calendar.
- Confirm email context.
- Create and verify the event.
Phase 13: Test in Outlook Android #
- Find the installed agent.
- Use a selected email.
- Verify the created calendar event.
Phase 1: Define the Agent #
Objective #
Define a narrow and safe first version of Inbox2Calendar.
The agent should create events for confirmed future commitments, even when the sender did not send a formal Outlook invitation.
Core Competencies in This Phase #
- Defining scope boundaries between automated execution, disclosed inference, and mandatory human review.
- Designing safety guardrails for autonomous calendar writes.
- Formulating ambiguity resolution strategies (e.g. the near-midnight dilemma).
In traditional software development, business logic is written using deterministic control flows (if/else statements, regex parsers, explicit schemas). If an email's format changes slightly or a sender uses informal phrasing, the parser fails.
In Copilot Studio agent architecture, instructions serve as semantic guardrails, policies, and invariants. The LLM operates as an adaptive reasoning engine: it reads messy human text, resolves implied context, and dynamically decides how to parameterize tools.
Because LLMs are probabilistic, instructions must clearly establish non-negotiable boundaries: what the agent is allowed to infer, what requires explicit human confirmation, and what it must never do autonomously (such as emailing calendar invites to external attendees).
Supported scenarios #
- Lunch, coffee, and dinner arrangements
- Dentist and doctor appointments
- Physiotherapy and hospital appointments
- Restaurant reservations
- Concert, theatre, cinema, and sporting-event tickets
- Flights, trains, ferries, and hotel bookings
- Conferences, webinars, courses, and training
- Hairdresser and service appointments
- School meetings
- Customer and supplier meetings
Scenarios that should not create events #
- Marketing emails
- Newsletters
- Possible plans without agreement
- Availability discussions without a confirmed date
- Past events
- Spam
- General event announcements where the user has not committed to attending
- Existing formal calendar invitations already represented in the calendar
Human-review rules #
The agent should ask one focused question when:
- Two exact dates are reasonably possible.
- Two times conflict.
- The commitment is not confirmed.
- It is unclear whether the user plans to attend.
- A relative date near midnight is ambiguous.
- Another person may need to be invited.
Click here to understand the near-midnight problem
An email sent shortly after midnight might say:
Looking forward to lunch tomorrow.
Strict calendar interpretation means the next calendar date.
Human conversational interpretation might mean the day after the sender sleeps and begins the next practical day.
If both interpretations are reasonable, the agent should ask:
This email was sent shortly after midnight. Does “tomorrow” mean Monday, 12 October, or Tuesday, 13 October?
This is not a failure. It is appropriate human oversight.
Phase 1 Checkpoint #
Phase 1 Wrap-Up #
The agent’s scope and safety boundaries are now defined.
Phase 2: Create Inbox2Calendar #
Objective #
Create the initial agent shell in Copilot Studio with a clean foundational description, avoiding unnecessary knowledge sources.
Core Competencies in This Phase #
- Scaffolding a custom agent container in Copilot Studio.
- Formulating an initial agent description that aligns LLM persona and domain intent.
- Distinguishing between static knowledge bases (SharePoint/RAG) and dynamic context/tool execution.
Step 2.1: Create a new agent #
- Open Microsoft Copilot Studio.
- Select the correct environment.
- Select Create or New agent.
- Choose the custom agent experience.
- Enter the initial agent description below.
Open and copy the complete initial creation prompt
Create an Outlook calendar assistant called Inbox2Calendar.
The agent should convert selected Outlook emails and accessible attachments into accurate Outlook calendar events.
It should recognize confirmed future commitments even when the sender did not send a formal invitation. This includes meetings, lunches, dentist and doctor appointments, restaurant bookings, concert tickets, travel confirmations, conferences, courses and service appointments.
The agent should support English and Danish.
When sufficient information is available, it should create the event without asking the user to repeat information. It should only ask one focused question when the date, time, commitment or attendance is genuinely ambiguous.
The agent must not automatically add attendees or send invitations.
Step 2.2: Confirm the agent details #
Use:
Name: Inbox2Calendar
Use this description:
Turns selected Outlook emails, confirmations, appointments and tickets into calendar events.
Step 2.3: Do not add knowledge sources #
If Copilot Studio asks for knowledge sources:
- Do not add SharePoint.
- Do not upload reference documents.
- Do not add public websites.
- Continue creating the agent.
Click here to see why knowledge sources are not required
Inbox2Calendar needs live, user-specific information:
- The selected Outlook email
- The email thread
- Mailbox data
- Calendar data
- Available email attachments
These are accessed through context and tools.
Knowledge sources are better suited to stable reference material such as policies, handbooks, manuals, and frequently asked questions.
Microsoft documentation:
Phase 2 Checkpoint #
Phase 2 Wrap-Up #
The agent shell now exists. It does not yet have the final instructions or functional access to Outlook Mail and Calendar.
Phase 3: Add the Full Production Instructions #
Objective #
Equip the agent with comprehensive operational instructions covering intent recognition, relative-date calculation, time-zone integrity, attendee suppression, and post-creation verification.
Core Competencies in This Phase #
- Authoring production-grade agent instruction prompts with strict rule hierarchies.
- Bridging rigid tool parameter constraints using LLM heuristic guidance.
- Engineering defensive verification loops directly into system prompts.
Understanding how the agent acquires information is essential for prompt design:
- Host Context Injection (Client Side): When a user triggers Copilot inside Outlook with an email open, Outlook automatically packages the active email (sender, subject, body, metadata) directly into the agent's prompt context as an attached context chip. The agent does not need to query the mailbox—the email is already in its working memory.
- Direct Tool Retrieval (Server Side): When the agent invokes
Work IQ Mail, it initiates an outbound Microsoft Graph API call to search, filter, or fetch messages across the Exchange mailbox.
The Instruction Rule: Always instruct the agent to prioritize the injected host context first. Only call Work IQ Mail when the user explicitly requests a mailbox search or when the host context is absent.
Step 3.1: Open the instructions #
- Open Inbox2Calendar.
- Go to Overview.
- Locate Instructions.
- Delete the generated instructions.
- Paste the complete instructions below.
- Save the agent.
The production instructions below specify the user's default calendar time zone as [Your Local Time Zone, e.g. Romance Standard Time].
Exchange and Microsoft Graph expect Windows Time Zone standard names (e.g. Romance Standard Time, W. Europe Standard Time, GMT Standard Time, Eastern Standard Time, Pacific Standard Time).
Before saving, replace the bracketed placeholder with your actual local time zone (or run tzutil /g in Windows PowerShell / check Test 6.4 in Phase 6 to verify your mailbox time zone).
Open and copy the complete production instructions
Role
You are an Outlook calendar assistant that converts emails and accessible attachments into accurate calendar events. Support English and Danish.
Recognize confirmed future commitments even when the sender did not send a formal invitation. Examples include meetings, lunches, healthcare appointments, reservations, tickets, travel, conferences, courses and service appointments.
When invoked from Outlook, analyze the selected email, available thread and attachments. If sufficient information exists, create the event without asking the user to repeat or approve information.
Email context
Use the selected email as the primary source only when available in the host context. Use its subject, sender, recipients, sent timestamp, body, thread and accessible attachments.
Do not assume mailbox access identifies the selected email. If unavailable, use identifiers supplied by Outlook to retrieve it. If it still cannot be identified, ask the user to identify or provide it.
Never claim to have read content that was not provided or retrieved.
Event detection
Create an event when:
- The user is expected to attend.
- The arrangement is confirmed or presented as agreed.
- The date can be reliably determined.
- A useful calendar entry can be created.
Recognize informal commitments such as:
- Looking forward to lunch on Friday.
- See you tomorrow at 10.
- Your dental appointment is Tuesday at 14:30.
- Vi ses på fredag til frokost.
- Tak for aftalen. Vi ses den 14. november kl. 09.30.
- Your booking is confirmed.
Do not create events from marketing, newsletters, unconfirmed suggestions, unresolved availability discussions, cancellations, past events, spam or announcements where the user is not attending.
Do not duplicate an existing formal invitation unless requested.
Sources and attachments
Prioritize:
1. Official tickets, confirmations and attachments
2. Latest explicit confirmation in the thread
3. Current email body
4. Earlier messages
5. Subject
6. Reasonable inference
For tickets, reservations, appointments and booking confirmations, treat the attached document as the authoritative source whenever it contains more detailed or specific event information than the email body.
Prefer the newest authoritative information. Ask one focused question if equally credible dates or times conflict.
Inspect accessible PDFs, tickets, appointment letters, itineraries, registrations and relevant images.
Extract:
- Title and category
- Start and end date/time
- Time zone
- Venue and address
- Organizer and contacts
- Booking, order, seat, gate or room details
- Relevant instructions and links
- Source email identifier
- Relevant attachments
- Inferred details
Attach relevant original tickets and confirmations when supported. Exclude marketing files, logos, signature or tracking images, unsafe files and duplicates.
If an attachment cannot be read, use other available content and do not claim it was analyzed.
Dates and durations
Resolve relative dates such as today, tomorrow, Friday, next Friday, i dag, i morgen, på fredag and næste fredag from the email sent timestamp and thread context.
Convert relative dates to exact dates before creation.
If a Wednesday email says "See you Friday," resolve Friday relative to that Wednesday unless a later message changes it.
If a relative expression such as "tomorrow" appears in an email sent shortly after midnight and two dates are reasonably plausible, ask the user which exact date was intended.
Use explicit times when available.
If only a start time is known, calculate the end before calling the calendar tool:
- Lunch, coffee or social meeting: 60 minutes
- Healthcare appointment: 30 minutes
- Business meeting, webinar or course: 60 minutes
- Restaurant reservation: 120 minutes
- Personal service appointment: 60 minutes
- Concert, theatre or sport: 180 minutes unless known
- Other appointment: 30 minutes
If lunch or frokost is confirmed without a time, use 12:00 for 60 minutes and mark the time as inferred.
If a confirmed date has no reliable or conventional time, create an all-day event.
Do not infer a time from vague phrases such as later or sometime Friday.
Time zones
Treat a stated clock time as local to the event, not UTC.
Use:
1. Explicitly stated time zone
2. Venue local time zone
3. User Outlook calendar time zone
4. Registration time zone for virtual events
The user's default calendar time zone is [Your Local Time Zone, e.g. Romance Standard Time].
Use it unless the event clearly belongs to another time zone.
Do not convert local clock time to UTC before calling CreateEvent.
For 15:00 local time, pass dateTime 15:00 with timeZone [Your Local Time Zone, e.g. Romance Standard Time], not 15:00 UTC.
Use GetUserDateAndTimeZoneSettings when needed.
Creation workflow
For every calendar-worthy email:
1. Extract event details.
2. Resolve dates and times.
3. Determine the correct time zone.
4. Search for matching calendar events.
5. Create or update the event.
6. Remove temporary attendees if required.
7. Verify the final event.
8. Report success only after verification.
CreateEvent rules
Before calling CreateEvent, determine all required values.
Never ask the user for ISO formatting or internal tool parameters.
Always provide:
- subject
- start with dateTime and timeZone
- end with dateTime and timeZone
- attendees_addresses
For personal calendar entries:
- Pass attendees_addresses as an empty array.
- Never add the calendar owner as an attendee.
- Never interpret "for me", "for myself", "only me" or "just me" as attendee requests.
- Set isOnlineMeeting to false.
- Do not create a Teams link.
- Do not ask for attendee names or email addresses.
Only add attendees when the user explicitly asks to invite them.
Do not automatically invite senders, recipients or people mentioned in the email.
If another person's name appears on a ticket or confirmation, identify that person as a possible attendee but do not add or invite the person automatically. Offer to prepare an invitation for user review.
Always calculate the end before calling CreateEvent.
If CreateEvent rejects an empty attendee array for a personal event:
1. Create the event using the owner's email as a temporary attendee.
2. Immediately update the event and remove all attendees.
3. Verify that attendees is empty.
4. Verify that isOnlineMeeting is false.
5. Verify that local time and timezone are correct.
6. Only report success after verification.
7. If cleanup fails, report the limitation and remaining attendees.
Event content
Create short titles such as:
- Dentist appointment - Tandlægehuset
- Lunch with Anne
- Coldplay - Parken
- Flight SK1289 - Copenhagen to Paris
Remove unnecessary order numbers, marketing text, RE: and FW:.
Use the event's language when practical.
Location priority:
1. Venue and full address
2. Venue
3. Address
4. Online meeting link
5. City
Do not invent addresses.
Include useful contacts, booking references, seat or gate details, instructions, links, source email information and inferred details in the description.
Do not copy the full email.
Confidence
Create automatically when the commitment and date are clear.
Ask one focused question only when:
- The date has multiple credible interpretations.
- Equally credible times conflict.
- The arrangement may not be confirmed.
- It is unclear whether the user is attending.
- A relative date near midnight has two reasonable interpretations.
Do not ask for confirmation when sufficient information exists.
Duplicates, changes and multiple events
Before creating an event, always search for existing matching calendar entries.
Compare:
- Title
- Date
- Time
- Organizer
- Venue
- Booking reference
- Source email identifier
If a reliable match exists:
- Update the existing event.
- Do not create a duplicate.
Update a reliable match when a later email changes or cancels the event.
Calendar conflicts do not prevent creation.
Create separate events for clearly separate activities and one continuous event for hotel stays or multi-day conferences when appropriate.
Reliability and response
Never claim an event was created, updated, deleted or given an attachment unless the tool returned success.
If creation succeeds but attachment processing fails, keep the event and report the failure.
After success, respond briefly with:
- Title
- Exact date
- Local start and end time
- Time zone
- Location
- Attachments added
- Inferred details
- Event link if available
Before responding, verify that the reported time is local time and not incorrectly labeled UTC.
If asked only to show, extract or preview details, do not create or update anything.
Click here to see why the prompt contains explicit tool rules
General instructions such as “create the event correctly” were not sufficient during testing.
The Calendar MCP needs structured values for:
- Subject
- Start date-time and time zone
- End date-time and time zone
- Attendee addresses
The production instructions therefore tell the agent how to prepare these tool inputs before calling the calendar operation.
Microsoft documentation:
Phase 3 Checkpoint #
Phase 3 Wrap-Up #
Inbox2Calendar now has complete operational instructions, including relative dates, time zones, personal appointments, attendees, duplicate prevention, and verification.
Phase 4: Configure Generative AI and Languages #
Objective #
Enable generative orchestration to allow dynamic multi-tool planning, and configure multilingual support across English and Danish.
Core Competencies in This Phase #
- Configuring generative orchestration to enable autonomous multi-tool chaining.
- Understanding multilingual LLM routing and token handling across English and secondary languages.
- Classic Topic Triggers (Deterministic): Traditional chatbots use natural language understanding (NLU) to map user input to pre-authored trigger phrases, which then execute rigid, deterministic branching trees. Adding a new tool or edge case requires manually authoring and maintaining complex flowcharts.
- Generative Orchestration (ReAct Loop): Modern agents use an autonomous Reason + Act loop. The LLM continuously evaluates the user's intent, the conversational history, and the semantic descriptions of all available tools. It dynamically plans which tool to call, prepares arguments, reads the tool output, and determines the next action (chaining another tool or generating a response) without needing hardcoded dialogue paths.
Step 4.1: Verify generative orchestration #
- Select Settings.
- Select Generative AI.
- Confirm that generative orchestration is enabled.
- Leave deep reasoning disabled during the initial build.
- Save changes if required.
Click here to see why generative orchestration is required
Inbox2Calendar needs to perform a dynamic sequence:
- Understand the selected email.
- Decide whether it represents a commitment.
- Extract event information.
- Select Mail and Calendar tools.
- Search for duplicates.
- Create or update the event.
- Verify the result.
Generative orchestration allows the agent to choose and chain tools based on the user’s intent and tool results.
Microsoft documentation:
Step 4.2: Add Danish #
- Open Settings.
- Select Languages.
- Keep English (United States) as the primary language.
- Select Add language.
- Select Danish (Denmark).
- Select Add.
- Save the agent.
Click here for language details
For agents using generative orchestration, generated messages can be translated automatically.
Manually authored topic messages might require separate translations.
Microsoft documentation:
Phase 4 Checkpoint #
Phase 4 Wrap-Up #
The agent can now orchestrate multiple tools and support English and Danish conversations.
Phase 5: Add Work IQ Mail and Calendar #
Objective #
Connect Model Context Protocol (MCP) server endpoints for Work IQ Mail and Calendar, configuring Microsoft Entra ID delegated authentication.
Core Competencies in This Phase #
- Connecting Model Context Protocol (MCP) tool servers to a Copilot Studio agent.
- Managing Entra ID OAuth scopes and delegated user authentication.
- Configuring granular sub-tool permissions vs broad "Allow all" access.
Step 5.1: Add Calendar #
- Select Tools.
- Select Add a tool.
- Select Work IQ Calendar or the available Calendar MCP.
- Create a connection.
- Use this connection name:
Inbox2Calendar Calendar
- Select Microsoft Entra ID authentication.
- Sign in with the account whose calendar will be used.
- Complete any required consent.
- Add the tool.
Step 5.2: Add Mail #
- Select Add a tool.
- Select Work IQ Mail or the available Mail MCP.
- Create a connection.
- Use this connection name:
Inbox2Calendar Mail
- Use Microsoft Entra ID authentication.
- Sign in using the same account.
- Add the tool.
Click here for MCP tool configuration details
When an MCP server is added, the server can expose multiple tools.
If Allow all is enabled, the individual tool toggles can appear unavailable because all subtools are already enabled.
To enable or disable individual operations:
- Turn off Allow all.
- Configure the individual tool toggles.
For the initial build, allowing all Calendar and Mail operations is acceptable for testing. Review and reduce access before broader deployment.
Microsoft documentation:
Phase 5 Checkpoint #
Phase 5 Wrap-Up #
The agent now has access to Mail and Calendar capabilities, but each capability must be tested separately.
Phase 6: Test the Tools in Copilot Studio #
Objective #
Validate individual Mail and Calendar capabilities in isolation within Copilot Studio's test canvas, verifying permissions, time-zone alignment, and trace telemetry before deploying full end-to-end orchestration.
Core Competencies in This Phase #
- Unit-testing individual MCP tool actions in isolation before composite orchestration.
- Validating mailbox read access and calendar time-zone alignment.
- Reading and interpreting the Copilot Studio maker trace for input/output payloads and error diagnostics.
Test 6.1: Verify Calendar tool discovery #
Enter:
What calendar actions can you perform?
Expected result:
- The agent identifies Calendar capabilities.
- The maker trace shows Calendar MCP activity.
Test 6.2: Verify mailbox access #
Enter:
Show me the subject lines of my 5 most recent emails.
Expected result:
- Real subject lines are returned.
- Work IQ Mail appears in the trace.
Test 6.3: Verify Calendar read access #
Enter:
What is my next calendar event?
Expected result:
- A real calendar event is returned.
- Work IQ Calendar appears in the trace.
Test 6.4: Verify the Calendar time zone #
Enter:
What is my calendar time zone?
A Danish mailbox might return:
Romance Standard Time
Use the actual value returned by your calendar. If your mailbox uses a different time zone (e.g. W. Europe Standard Time, GMT Standard Time, Eastern Standard Time), ensure this matches the time zone configured in Step 3.1 instructions.
Test 6.5: Test Calendar write access #
Enter:
Create an appointment called Inbox2Calendar Test tomorrow at 15:00 for 30 minutes. Do not invite anyone.
Inspect the created event.
Verify:
- The event was created.
- The displayed local time is correct.
- The duration is correct.
- No unwanted attendee remains.
- No unwanted Teams meeting exists.
Deep Dive: Maker Trace Diagnostic Guide #
The Copilot Studio Maker Trace is your primary diagnostic window into the agent's internal operations. Rather than guessing why an agent responded in a particular way, the trace provides full visibility into the LLM's reasoning, tool invocations, parameter bindings, and API responses.
Maker Trace Diagnostic Flowchart #
Annotated Walkthrough of a Raw Tool Payload #
When Inbox2Calendar executes Test 6.5 or processes an email, inspect the raw JSON payloads inside the trace nodes:
Step 1: CreateEvent Input Payload
{
"subject": "Inbox2Calendar Test",
"start": {
"dateTime": "2026-10-12T15:00:00",
"timeZone": "[Your Local Time Zone, e.g. Romance Standard Time]"
},
"end": {
"dateTime": "2026-10-12T15:30:00",
"timeZone": "[Your Local Time Zone, e.g. Romance Standard Time]"
},
"attendees_addresses": [
"user@yourtenant.com"
],
"isOnlineMeeting": false
}
Key inspection points:
- timeZone: Must match the mailbox time zone exactly. If missing or defaulted to UTC, the appointment will appear shifted in Outlook.
- attendees_addresses: Must have exactly one temporary address (the user's email) if the MCP schema rejects an empty array.
- isOnlineMeeting: Must be false for personal appointments to prevent Microsoft Teams conference link generation.
Step 2: CreateEvent Output Payload
{
"id": "AAMkAGI2T...AAA=",
"subject": "Inbox2Calendar Test",
"start": { "dateTime": "2026-10-12T15:00:00.0000000", "timeZone": "Romance Standard Time" },
"status": "success"
}
Key inspection point: Extract the generated id. The agent needs this exact string to invoke UpdateEvent.
Step 3: UpdateEvent Payload (Attendee Stripping)
{
"id": "AAMkAGI2T...AAA=",
"attendees_addresses": []
}
Key inspection point: Confirms that the temporary attendee is stripped immediately after initial creation.
The 4 Most Common Maker Trace Failure Signatures #
| Failure Signature | Symptom in Chat | Root Cause in Trace | Remediation |
|---|---|---|---|
| 1. The Silent Pass-Through | Agent says "I've noted your appointment" or gives conversational advice without creating anything. | No tool call node exists in the trace. The model treated the prompt as a conversational inquiry. | Strengthen prompt instructions with explicit action verbs ("Always execute CreateEvent when confirmed details exist"). |
| 2. Schema Rejection | Agent reports an error or asks user for email addresses. | Tool node returns 400 Bad Request (attendees_addresses is required). |
Ensure Step 3.1 instructions mandate using the owner's email as temporary attendee when schema requires it. |
| 3. Time-Zone Drift | Event appears in Outlook 1–2 hours earlier or later than requested. | dateTime in input JSON converted local time to UTC (e.g. 13:00Z instead of 15:00 Romance Standard Time). |
Verify instructions explicitly command: "Pass local time in dateTime with the user's named timeZone; do not convert to UTC". |
| 4. Hallucinated Success | Agent says "Your event has been created" but nothing appears in Outlook. | Tool call failed with an error, or CreateEvent was never invoked, but the LLM hallucinated a successful completion. |
Enforce the verification protocol: "Never confirm event creation until a post-creation GetEvent/ListEvents returns a verified result". |
Phase 6 Checkpoint #
Phase 6 Wrap-Up #
Mail and Calendar connectivity has been proven. The next phase addresses the behavior discovered during Calendar creation.
Phase 7: Calendar MCP Edge Cases #
Objective #
Handle real-world API impedance mismatches, ensuring personal appointments are created without unwanted attendees, without video conferencing links, and with local time-zone fidelity.
Core Competencies in This Phase #
- Identifying and mitigating API impedance mismatches (e.g. mandatory attendee schemas on personal appointments).
- Designing multi-step state compensation workflows (
CreateEvent→UpdateEvent→Verify). - Preventing unwanted side effects (e.g. auto-provisioned Teams links, UTC offset drift).
API schemas (such as MCP tool contracts or OpenAPI definitions) define structural rules: required fields, types, and validation constraints. However, external schemas often reflect raw API data contracts rather than nuanced user scenarios.
For example, the CreateEvent MCP schema enforces that attendees_addresses must be populated—even when a user desires a solo personal appointment. In conventional software engineering, developers write backend wrapper middleware to smooth over such API quirks.
In agent architecture, the agent's instructions act as that intelligent middleware. By equipping the LLM with a compensating transaction strategy (create with self as temporary attendee → update event to strip attendees → verify final state), the agent resolves rigid API constraints while preserving the user's intended experience.
Issue 1: The event is created in UTC #
A request for 15:00 local time might be sent to the tool as 15:00 UTC.
For a Danish local event, the successful input used:
dateTime: 15:00
timeZone: Romance Standard Time
It did not convert 15:00 local into 15:00 UTC.
Issue 2: The tool requests attendees #
The documented CreateEvent schema requires an attendee-address array.
During testing, the tool rejected an empty attendee array.
Issue 3: The owner is added as an attendee #
The phrase “for myself” can cause the owner to be treated as an attendee.
The production prompt explicitly prevents this interpretation.
Issue 4: A Teams meeting is created #
For personal calendar appointments, the agent must use:
isOnlineMeeting: false
Tested solution: Create, update, and verify #
Controlled test #
Enter:
Create “Two-Step Appointment Test” tomorrow at 15:00 [Your Local Time Zone, e.g. Romance Standard Time] for 30 minutes. To satisfy CreateEvent, temporarily use my email as the attendee. Immediately after creation, call UpdateEvent and remove all attendees. Set isOnlineMeeting to false. Confirm only after verifying the final event has no attendees.
Expected verified result:
{
"subject": "Two-Step Appointment Test",
"start": {
"dateTime": "15:00",
"timeZone": "[Your Local Time Zone, e.g. Romance Standard Time]"
},
"end": {
"dateTime": "15:30",
"timeZone": "[Your Local Time Zone, e.g. Romance Standard Time]"
},
"attendees": [],
"isOnlineMeeting": false
}
Click here for Calendar MCP technical details
The Calendar documentation defines CreateEvent inputs including:
subjectstartendattendees_addresses
The start and end values include date-time and time-zone data.
UpdateEvent supports changes to an existing event, including attendee information.
Microsoft documentation:
Phase 7 Checkpoint #
Phase 7 Wrap-Up #
The required personal appointment behavior is possible through AI-selected Calendar MCP operations without Power Automate.
Phase 8: Test Realistic Scenarios #
Test 8.1: Informal lunch #
I received an email saying:
Hi Thomas,
Looking forward to having lunch with you next Friday.
Best regards,
Anne
Create the calendar event.
Expected:
- Exact date calculated.
- Start time 12:00.
- Duration 60 minutes.
- Local calendar time zone.
- No attendees.
- No Teams meeting.
- Inferred time disclosed.
Test 8.2: Dentist appointment #
I received an email confirming my dentist appointment on 14 November at 09:30. Create the calendar event.
Expected:
- 30-minute duration.
- Discreet title.
- No attendees.
- No Teams meeting.
Test 8.3: Near-midnight ambiguity #
Use an email sent shortly after midnight:
Looking forward to lunch tomorrow.
Expected:
- The agent asks which exact date was intended.
- No event is created before clarification.
Test 8.4: Duplicate prevention #
- Create an event from a test email.
- Repeat the same request.
- Confirm that ListEvents or another calendar search occurs.
- Confirm that no duplicate is created.
Test 8.5: Preview only #
Show me the appointment details from this email, but do not create anything.
Expected:
- Event details are shown.
- No CreateEvent or UpdateEvent operation occurs.
Test 8.6: Companion named on a ticket #
Expected:
- The additional name is identified.
- The person is not invited automatically.
- The user is offered a draft invitation for review.
Example:
The ticket also names Anne Jensen as a possible attendee. Would you like me to prepare an invitation for review without sending it?
Phase 8 Checkpoint #
| Test | Expected result | Pass |
|---|---|---|
| Informal lunch | 12:00 local, 60 minutes | ☐ |
| Dentist | 30 minutes, no attendee | ☐ |
| Near midnight | Clarification requested | ☐ |
| Duplicate | No duplicate created | ☐ |
| Preview only | No write operation | ☐ |
| Companion | Review offered, nothing sent | ☐ |
Phase 8 Wrap-Up #
The main functional and safety scenarios have been tested before deployment.
Phase 9: Configure Security #
Step 9.1: Configure authentication #
- Open Settings.
- Select Security.
- Open Authentication.
- Select:
Authenticate with Microsoft
- Save the setting.
Click here to see why Microsoft authentication is required
Inbox2Calendar accesses user-specific mailbox and calendar data.
The agent must know which signed-in user’s data to access.
Microsoft authentication supports Microsoft Entra ID authentication in supported Microsoft channels.
Do not use anonymous access for this scenario.
Microsoft documentation:
Phase 9 Checkpoint #
Phase 9 Wrap-Up #
Inbox2Calendar is configured to use authenticated Microsoft 365 user context.
Phase 10: Publish and Add the Microsoft 365 Channel #
Objective #
Publish the agent release and connect the Microsoft 365 Copilot channel to enable host application discovery.
Core Competencies in This Phase #
- Navigating the agent publication lifecycle in Copilot Studio.
- Differentiating agent compiling, channel routing, and end-user distribution.
- Deploying to personal test environments without tenant-wide admin overhead.
Step 10.1: Publish #
- Save all changes.
- Select Publish.
- Confirm publishing.
- Wait for the published status to appear.
- Check for errors or warnings.
Publishing is necessary, but publishing alone does not make the agent appear in Outlook.
Step 10.2: Add the Microsoft 365 channel #
- Open Channels.
- Select Microsoft 365 and Microsoft Teams.
- Select Make agent available in Microsoft 365 Copilot.
- Select Add channel.
- Confirm that the channel is active.
Click here to understand publishing versus channels
Publishing creates a live version of the agent.
A channel determines where users can access the published agent.
For Inbox2Calendar:
- Publish the agent.
- Add the Microsoft 365 and Microsoft Teams channel.
- Install the agent for the user.
- Open the agent in Outlook.
Microsoft documentation:
Step 10.3: Configure availability #
For initial testing:
- Do not deploy to the entire organization.
- Do not submit for broad administrator approval.
- Use personal installation.
Select See agent in Microsoft 365 or use the personal installation link.
Phase 10 Checkpoint #
Phase 10 Wrap-Up #
The agent is published and connected to Microsoft 365. It now needs to be installed.
Phase 11: Install Inbox2Calendar #
- Select See agent in Microsoft 365.
- The Microsoft 365 Agent Store opens.
- Find Inbox2Calendar.
- Verify the name, icon, and description.
- Select Add.
- Complete any sign-in or consent prompt.
- Confirm that Inbox2Calendar appears in the agent list.
Click here for deployment details
Personal installation makes the agent available to the current test user.
Making the agent available to a team or the entire organization is a separate governance decision and can require administrator approval.
Test the agent personally before broad deployment.
Microsoft documentation:
Phase 11 Checkpoint #
Phase 11 Wrap-Up #
Inbox2Calendar is installed for the test user.
Phase 12: Test Inbox2Calendar in Outlook Desktop #
Objective #
Validate client-side host context injection, ensuring the agent reads the selected email chip directly and converts it to a calendar appointment without manual text prompting.
Core Competencies in This Phase #
- Validating host-level context injection (the active email context chip).
- Verifying end-to-end zero-prompt execution from informal unstructured text to verified calendar appointment.
Step 12.1: Open a test email #
Example:
Subject: Meeting
Hi Thomas,
Looking forward to meeting for lunch tomorrow.
Regards.
Step 12.2: Open Copilot #
- Keep the email open or selected.
- Open Copilot in Outlook.
- Verify that the selected email appears as a context chip.
- Open the agent selector.
- Select Inbox2Calendar.
Step 12.3: Run the request #
Enter:
Add this email to my calendar.
Do not manually provide:
- The email subject
- The email body
- The sender
- The date
- The time
The purpose is to verify selected-email context.
Step 12.4: Verify the result #
Check:
- Event title
- Exact date
- Local start time
- End time
- Time zone
- Location
- Attendees
- Teams meeting status
- Duplicate handling
- Inferred details
- Returned calendar link
Click here to understand selected-email context
General mailbox access does not necessarily identify the email currently selected in Outlook.
The selected email should appear in the Copilot prompt area as attached context.
The agent should only claim to have read the selected email when Outlook provides the context or a tool retrieves the identified message successfully.
Phase 12 Checkpoint #
Phase 12 Wrap-Up #
Inbox2Calendar is operational in Outlook desktop.
Phase 13: Test Outlook Android #
- Sign in to Outlook Android using the same Microsoft 365 account.
- Update Outlook if required.
- Open a safe test email.
- Open Copilot.
- Select Inbox2Calendar.
- Verify that the email is available as context.
- Start with:
Show me the appointment details from this email, but do not create anything.
- If extraction is correct, enter:
Add this email to my calendar.
- Verify the event in Outlook Calendar.
Phase 13 Checkpoint #
Phase 13 Wrap-Up #
Inbox2Calendar is now deployed and tested in Outlook desktop and Outlook Android.
Troubleshooting #
Agent does not appear in Outlook #
- Confirm that the agent was published.
- Confirm that the Microsoft 365 channel was added.
- Confirm that the agent was installed.
- Verify that Outlook uses the same account.
- Restart Outlook.
Agent asks for the email text #
- Confirm that the selected email appears as a context chip.
- Select Inbox2Calendar after opening the email.
- Start a new Copilot conversation.
- Try again.
Event appears at the wrong time #
Inspect the tool input.
For local time (e.g. Danish local time), verify:
dateTime: 15:00
timeZone: [Your Local Time Zone, e.g. Romance Standard Time]
Do not pass 15:00 UTC unless the source explicitly states UTC.
Agent requests attendee email addresses #
Confirm that the full production prompt is installed.
If the empty list is rejected, the agent should:
- Create using the owner temporarily.
- Update the event.
- Remove the attendee.
- Verify the final state.
Owner remains as attendee #
Inspect the maker trace.
Verify that:
- CreateEvent returned an event ID.
- UpdateEvent used the same event ID.
- The updated attendee list was empty.
- GetEvent or ListEvents confirmed the result.
Teams link appears #
Verify:
isOnlineMeeting: false
Agent asks for ISO formatting #
The agent should calculate start and end values itself.
Confirm that the complete instructions include:
Never ask the user for ISO formatting or internal tool parameters.
Changes are not visible #
- Save the agent.
- Publish again.
- Start a new Copilot conversation.
- Restart Outlook if necessary.
Responsible Automation #
Create automatically #
Appropriate examples:
- Personal dentist appointment
- Doctor appointment
- Confirmed service appointment
- Personal concert calendar entry
- Confirmed lunch with clear date
Create with disclosed inference #
Examples:
- Lunch with no explicit time
- Start time without end time
- Reservation without complete address
The agent should state what was inferred.
Require review #
Examples:
- Another person appears on a ticket.
- An invitation would be sent.
- Two dates are credible.
- A cancellation affects an existing shared meeting.
- “Tomorrow” is ambiguous near midnight.
Future Architecture #
Do not immediately create separate agents for every event type.
Keep Inbox2Calendar as the orchestrator until real usage demonstrates that specialized agents are needed.
Potential future agents:
- Ticket Intelligence Agent
- Travel Intelligence Agent
- Healthcare Appointment Agent
- Invitation Review Agent
Use topics when:
- A fixed review process is needed.
- The same questions must always be asked.
- An explicit approval flow is required.
- Deterministic conversation steps are important.
Use connected agents when:
- A domain has substantial independent reasoning.
- The domain uses different tools.
- The capability can be reused.
- Independent testing and maintenance are useful.
Final Test Matrix #
| ID | Scenario | Expected result |
|---|---|---|
| T01 | Five recent emails | Real mailbox subjects returned |
| T02 | Next calendar event | Real event returned |
| T03 | Calendar time zone | Correct Outlook time zone |
| T04 | 15:00 appointment | Appears at 15:00 local |
| T05 | Personal appointment | Final attendees empty |
| T06 | Personal appointment | No Teams meeting |
| T07 | Lunch without time | 12:00 for 60 minutes |
| T08 | Dentist appointment | 30-minute duration |
| T09 | Tomorrow near midnight | Clarification requested |
| T10 | Repeat same request | No duplicate |
| T11 | Preview-only request | No calendar write |
| T12 | Companion on ticket | Review offered |
| T13 | Marketing email | No event |
| T14 | Existing formal invite | No duplicate |
| T15 | Updated appointment | Existing match updated |
| T16 | Danish email | Correct interpretation |
| T17 | Outlook desktop | Selected email context works |
| T18 | Outlook Android | Agent works on mobile |
Official Microsoft Documentation #
- Calendar reference
- Work IQ Calendar reference
- Mail reference
- Add MCP tools and resources
- Configure multilingual agents
- Publish and deploy an agent
- Connect an agent to Teams and Microsoft 365
- Explore AI capabilities in Copilot Studio
Final Result #
After completing every phase, a user can:
- Open an email in Outlook desktop or Outlook Android.
- Open Copilot.
- Select Inbox2Calendar.
- Confirm that the email is attached as context.
- Enter:
Add this email to my calendar.
- Receive a verified Outlook calendar event based on the email.
Inbox2Calendar demonstrates that generative orchestration can:
- Interpret informal commitments
- Use Mail and Calendar tools
- Resolve local time
- Handle Calendar MCP parameter behavior
- Chain CreateEvent, UpdateEvent, and verification
- Avoid unwanted attendees and Teams meetings
- Ask for human judgment when the source is genuinely ambiguous