1. Overview
Microsoft Outlook is Microsoft's flagship email client and personal information manager, part of the Microsoft 365 suite. It provides comprehensive email management, calendar scheduling, contact organization, task tracking, and collaboration features for personal and business use.
Through GoInsight's Microsoft Outlook node, you can seamlessly integrate email operations, calendar management, and contact handling into your automated workflows. You can achieve full lifecycle management of emails, events, contacts, and organizational data, including:
- Create and manage calendars, contacts, events, and email drafts
- Send and process email messages with advanced features like reply handling and response tracking
- Organize and manipulate mail folders and message attachments
- Update and maintain existing records across all Outlook resources
2. Prerequisites
Before using this node, you need to have a valid Microsoft Outlook account. You may need administrator or specific permissions to create and manage API credentials for Microsoft Graph API access.
3. Credentials
For detailed guidance on how to obtain and configure credentials, please refer to our official documentation: Credentials Configuration Guide.
4. Supported Operations
Summary
This node primarily operates on the following resources: Calendar, Contact, Draft, Event, Folder, Message, and Message Attachment.
| Resource | Operation | Description |
|---|---|---|
| Calendar | Create a Calendar | Create a new calendar in Microsoft Outlook using Microsoft Graph API. Requires calendar name and optionally color. Returns new calendar object with properties, status code, and error message. |
| Calendar | Delete a Calendar | Delete an existing calendar in Microsoft Outlook using Microsoft Graph API. This operation CANNOT be undone. The calendar and all its events will be permanently removed. |
| Calendar | Get Many Calendars | Get all the user's calendars in Microsoft Outlook using Microsoft Graph API. |
| Calendar | Get a Calendar | Get a calendar in Microsoft Outlook using Microsoft Graph API. |
| Calendar | Update a Calendar | Update a calendar in Microsoft Outlook using Microsoft Graph API. |
| Contact | Create a Contact | Create a new contact in Microsoft Outlook using Microsoft Graph API. Requires display name and optionally email address, phone number, first name, last name, and company name. Returns new contact object with properties, status code, and error message. |
| Contact | Delete a Contact | Delete a contact from Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the contact and cannot be undone. |
| Contact | Get Many Contacts | Get multiple contacts in Microsoft Outlook using Microsoft Graph API. |
| Contact | Get a Contact | Get a contact in Microsoft Outlook using Microsoft Graph API. |
| Contact | Update a Contact | Update a contact in Microsoft Outlook using Microsoft Graph API. |
| Draft | Create a Draft | Create a new email draft in Microsoft Outlook using Microsoft Graph API. Requires subject and optionally body content, recipients, content type, and importance. Returns new draft object with properties, status code, and error message. |
| Draft | Delete a Draft | Delete an existing draft in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the draft and cannot be undone. |
| Draft | Get a Draft | Get a draft in Microsoft Outlook using Microsoft Graph API. |
| Draft | Send a Draft | Send an existing email draft in Microsoft Outlook using Microsoft Graph API. |
| Draft | Update a Draft | Update a draft in Microsoft Outlook using Microsoft Graph API. |
| Event | Create an Event | Creates a new event in Microsoft Outlook using Microsoft Graph API. ⚠️ Idempotency Warning: This action does NOT support automatic deduplication. If the request times out and is retried, duplicate events may be created. To avoid duplicates: 1. Check existing events before creating (use outlook_list_events with time range filter) 2. Use a unique identifier in the event subject or body for manual deduplication |
| Event | Delete an Event | Delete an existing event in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the event and cannot be undone. |
| Event | Get Many Events | Get many events in Microsoft Outlook using Microsoft Graph API. |
| Event | Get an Event | Get an event in Microsoft Outlook using Microsoft Graph API. |
| Event | Update an Event | Update an existing event in Microsoft Outlook using Microsoft Graph API. |
| Folder | Create a Folder | Create a new mail folder in Microsoft Outlook using Microsoft Graph API. Requires folder name and optionally parent folder ID. Returns new folder object with properties, status code, and error message. |
| Folder | Delete a Folder | Delete an existing folder in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the folder and cannot be undone. |
| Folder | Get Many Folders | Get folders from the user's mailbox in Microsoft Outlook using Microsoft Graph API. |
| Folder | Get a Folder | Get a folder in Microsoft Outlook using Microsoft Graph API. |
| Folder | Update a Folder | Updates a folder in Microsoft Outlook using Microsoft Graph API. |
| Message | Delete a Message | Delete an existing message in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the message and cannot be undone. |
| Message | Get Many Folder Messages | Get messages from a specific folder in Microsoft Outlook using Microsoft Graph API. |
| Message | Get Many Messages | Get multiple messages in Microsoft Outlook using Microsoft Graph API. |
| Message | Get a Message | Get a message in Microsoft Outlook using Microsoft Graph API. |
| Message | Move a Message | Move a message to a different folder in Microsoft Outlook using Microsoft Graph API. |
| Message | Reply to Message | Reply to a message in Microsoft Outlook using Microsoft Graph API. |
| Message | Send a Message | Send an email message in Microsoft Outlook using Microsoft Graph API. |
| Message | Send and Wait for Response | Send an email and wait for a response to an email message sent in Microsoft Outlook using Microsoft Graph API. |
| Message | Update a Message | Update a message in Microsoft Outlook using Microsoft Graph API. |
| Message Attachment | Add Message Attachment | Add a file attachment to an email message in Microsoft Outlook using Microsoft Graph API. Requires message ID and file path. Optional custom attachment name. Returns new attachment object with properties, status code, and error message. |
| Message Attachment | Download Message Attachment | Get a specific attachment from a message in Microsoft Outlook using Microsoft Graph API. |
| Message Attachment | Get Many Message Attachments | Get attachments from a specific message in Microsoft Outlook using Microsoft Graph API. |
| Message Attachment | Get Message Attachment | Get a specific attachment from a message in Microsoft Outlook using Microsoft Graph API. |
Operation Details
Create a Calendar
Create a new calendar in Microsoft Outlook using Microsoft Graph API. Requires calendar name and optionally color. Returns new calendar object with properties, status code, and error message.
Input Parameters:
- Name: The name of the new calendar to create. This will be displayed in Outlook's calendar list. (Example: Marketing Team Calendar)
Options:
- Color: The color theme of the calendar. Helps visually distinguish different calendars in Outlook.
Recommended colors by use case:
- auto: System default (recommended)
- lightBlue: Professional/Work
- lightGreen: Personal/Family
- lightOrange: Team projects
- lightPink: Social events
- lightYellow: Important reminders
- lightGray: Archive
- lightTeal: Travel
- lightBrown: Training
- lightRed: Urgent events
Example: lightBlue - IsDefault: Whether this is the user's default calendar. Only one calendar can be default. Setting this to true will automatically make other calendars non-default. Default: false.
- CanShare: Whether the calendar can be shared with other users. Recommended: true for team calendars, false for private calendars. Default: true.
- CanEdit: Whether the calendar owner can edit calendar properties (name, color, permissions). Typically should be true. Default: true.
- DefaultOnlineMeetingProvider: Default online meeting provider for events created in this calendar.
Values:
- teamsForBusiness: Microsoft Teams for work (recommended for business users)
- skypeForBusiness: Skype for Business
- skypeForConsumer: Personal Skype account
- unknown: No default provider (users choose manually)
Default: teamsForBusiness - AdditionalFields: Additional fields to set in the calendar. Can be one or more of the following:
allowedOnlineMeetingProviders (list): List of online meeting providers allowed. Default is ["teamsForBusiness", "skypeForBusiness"]. It can include "unknown", "teamsForBusiness", "skypeForConsumer"
hexColor (str): Specifies the color of the calendar. If specified, it overrides the color property.
owner (dict): Specifies the owner of the calendar. If specified, it overrides the owner property. Its format is {"emailAddress": {"address": "email@example.com", "name": "Name"}}
isRemovable (bool): Specifies whether the calendar can be removed. If specified, it overrides the isRemovable property.
Advanced options: Additional calendar properties for power users.
Common fields:
- canViewPrivateItems (boolean): Whether private items can be viewed. Default: true.
- isTallyingResponses (boolean): Whether event RSVPs are tracked. Default: false. Enable this to see who accepted/declined meeting invitations.
- allowedOnlineMeetingProviders (array): Allowed meeting providers. Default: ["teamsForBusiness"]. Values: "unknown", "teamsForBusiness", "skypeForBusiness", "skypeForConsumer".
- hexColor (string): Custom hex color code (e.g., #FF5733). Overrides the Color parameter.
- owner (object): Calendar owner. Format: {"name": "John Doe", "address": "john@example.com"}.
- isRemovable (boolean): Whether the calendar can be deleted. Default: true.
Example: {"canViewPrivateItems": false, "hexColor": "#0078D4", "isTallyingResponses": true, "allowedOnlineMeetingProviders": ["teamsForBusiness"]}
Output:
- Calendar (object): Created calendar dict from the API. It contains the following key fields:
id (string): Unique calendar identifier.
name (string): Name of the calendar.
color (string): Color of the calendar.
hexColor (string): Specific hex color for the calendar.
isDefaultCalendar (bool): Indicates whether this is the default calendar.
canShare (bool): Indicates whether the calendar can be shared.
canViewPrivateItems (bool): Indicates whether private items can be viewed.
allowedOnlineMeetingProviders (list): List of allowed online meeting providers.
defaultOnlineMeetingProvider (string): Default online meeting provider.
isTallyingResponses (bool): Indicates whether event responses are being tallied.
isRemovable (bool): Indicates whether the calendar is removable.
owner (object): Calendar owner information with name and address.
createdDateTime (string): Date and time when the calendar was created (ISO 8601 format).
lastModifiedDateTime (string): Date and time when the calendar was last modified (ISO 8601 format). - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Calendar
Delete an existing calendar in Microsoft Outlook using Microsoft Graph API. This operation CANNOT be undone. The calendar and all its events will be permanently removed.
Input Parameters:
- CalendarId: The unique identifier of the calendar to delete. After obaining the calendar list through the outlook_get_calendars interface, extract the id field from the returned calendars array. (e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt...)
Output:
- Deleted (bool): Indicates whether the calendar was successfully deleted. It is set to True if the deletion was successful.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Calendars
Get all the user's calendars in Microsoft Outlook using Microsoft Graph API.
Options:
- Limit: Number of calendars to retrieve (default is 999, valid range: 1-999)
- Offset: Number of calendars to skip (default is 0, valid range: 0-999)
- Orderby: To sort results in ascending or descending order, append either asc or desc to the field name, separated by a space. The default order is ascending.
e.g. name desc, owner/emailAddress/address asc - FilterQuery: Filter conditions, used to obtain calendars that meet specific criteria.
Its format should be: fieldName [operator] [value] (e.g. name eq 'Jim' or owner/emailAddress/address eq 'someuser@example.com').
Supported operators include:
- eq (equals): Exact match
- ne (not equal): Not equal
- gt (greater than): Greater than
- ge (greater than or equal): Greater than or equal
- lt (less than): Less than
- le (less than or equal): Less than or equal
- and, or, not: Logical operators
- in, contains, startsWith, endsWith: String matching
- any, all: Set operators
ref: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http - SelectField: A comma-separated list of fields to include in the response. (e.g. id, name, color, owner)
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - SearchCriteria: Use the query parameter to restrict request results to match a search criterion. The search syntax follows these rules:
1. Format: ": " [AND | OR] " : "
2. Supported properties: displayName (full-text search), description (full-text search), other properties (prefix match)
3. Logical operators: AND, OR (must be uppercase and outside quotes)
e.g.:
- Single condition: "name:hello"
- Multiple conditions: "name:hello" AND "color:auto"
ref: https://learn.microsoft.com/en-us/graph/search-query-parameter?tabs=http
Output:
- Calendars (object-array): List of retrieved calendar objects from the API. Each calendar contains the following key fields:
id (string): Calendar identifier.
name (string): Calendar name.
color (string): Calendar color.
hexColor (string): Calendar hex color.
groupClassId (string): Calendar group class identifier.
isDefaultCalendar (boolean): Indicates whether the calendar is the default calendar of the user.
canShare (boolean): Indicates whether the user can share the calendar.
canViewPrivateItems (boolean): Indicates whether the user can read calendar items that have been marked private.
canEdit (boolean): Indicates whether the user can write to the calendar.
isTallyingResponse (boolean): Indicates whether the calendar is tallying responses.
isRemovable (boolean): Indicates whether the user can delete the calendar.
owner' (dict): Calendar owner object. It contains the following key fields: name (string): Owner name and address` (string): Owner email address. - Pagination (object): Page metadata object, containing the following fields:
- nextLink (string): The complete URL of the next page. This field does not exist if there is no next page.
- count (number): The number of records returned for the current page. Note: The Microsoft Graph API does not return the total number of records.
Usage:
- Determine if there is a next page: Check if the nextLink field exists
- Fetch the next page: Make a request directly using the URL of nextLink (no need to manually calculate the offset) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Calendar
Get a calendar in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- CalendarId: Specific calendar ID to retrieve.
How to obtain:
1. Call the outlook_get_calendars interface
2. Find the target calendar in the returned Calendars array
3. Copy the id field value from that calendar object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgEGAAAATqtKDt_3tEidellYjCb9RQAGYsCWOAAAAA==
Output:
- Calendar (object): Retrieved calendar object from the API. It contains the following key fields: id (string): Calendar identifier.
name (string): Calendar name.
color (string): Calendar color.
hexColor (string): Calendar hex color.
groupClassId (string): Calendar group class identifier.
isDefaultCalendar (boolean): Indicates whether the calendar is the default calendar of the user.
canShare (boolean): Indicates whether the user can share the calendar.
canViewPrivateItems (boolean): Indicates whether the user can read calendar items that have been marked private.
canEdit (boolean): Indicates whether the user can write to the calendar.
isTallyingResponse (boolean): Indicates whether the calendar is tallying responses.
isRemovable (boolean): Indicates whether the user can delete the calendar.
owner' (dict): Calendar owner object. It contains the following key fields: name (string): Owner name and address` (string): Owner email address. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Calendar
Update a calendar in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- CalendarId: The unique identifier of the calendar to update.
How to obtain:
1. Call the outlook_get_calendars interface
2. Find the target calendar in the returned Calendars array
3. Copy the id field value from that calendar object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgEGAAAATqtKDt_3tEidellYjCb9RQAGYsCWOAAAAA==
Options:
- CalendarName: The new name of the calendar.
- Color: The new color of the calendar. Possible values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor.
Output:
- Calendar (object): Updated calendar object from the API. It contains the following key fields:
id (string): Calendar identifier.
name (string): Calendar name.
color (string): Calendar color.
hexColor (string): Calendar hex color.
groupClassId (string): Calendar group class identifier.
isDefaultCalendar (boolean): Indicates whether the calendar is the default calendar of the user.
canShare (boolean): Indicates whether the user can share the calendar.
canViewPrivateItems (boolean): Indicates whether the user can read calendar items that have been marked private.
canEdit (boolean): Indicates whether the user can write to the calendar.
isTallyingResponse (boolean): Indicates whether the calendar is tallying responses.
isRemovable (boolean): Indicates whether the user can delete the calendar.
owner' (dict): Calendar owner object. It contains the following key fields: name (string): Owner name and address` (string): Owner email address. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Contact
Create a new contact in Microsoft Outlook using Microsoft Graph API. Requires display name and optionally email address, phone number, first name, last name, and company name. Returns new contact object with properties, status code, and error message.
Input Parameters:
- GivenName: The given name of the contact. e.g. John
- Surname: The surname (family name) of the contact. e.g Doe
Options:
- Generation: The generation of the contact. e.g. MD.
- MobilePhone: Mobile phone number of the contact. Default is "". e.g +1 987 654 3210
- JobTitle: Job title of the contact. Default is "". e.g. Software Engineer
- Department: Department of the contact. Default is "". e.g. IT Department
- EmailAddresses: Email addresses associated with the contact. Each entry contains:
- address (string): The email address (e.g., "john@example.com")
- name (string): Display name or label for this email (e.g., "John Doe" or "Work Email")
Example: [{"address": "john.doe@example.com", "name": "John Doe"}] - BusinessPhones: Business phone numbers of the contact. Default is []. e.g. ["+1 555 987 6543"]
- AdditionalFields: Additional fields to set in the contact. Can be one or more of the following:
categories (list): Categories of the contact. Its format is a list of strings. Default is []. e.g. ["Personal", "Work"]
birthday (str): Birthday of the contact in ISO 8601 format (e.g., "2023-01-01T00:00:00Z").
fileAs (str): File as of the contact.
middleName (str): Middle name of the contact.
nickName (str): Nickname of the contact.
title (str): Title of the contact (e.g., Dr., Mr., Ms.).
yomiGivenName (str): Yomi given name of the contact.
yomiSurname (str): Yomi surname of the contact.
yomiCompanyName (str): Yomi company name of the contact.
imAddresses (list): List of IM addresses of the contact.
companyName (str): Company name of the contact.
officeLocation (str): Office location of the contact.
profession (str): Profession of the contact.
businessAddress (dict): Business address of the contact, containing street, city, state, postalCode, and countryOrRegion. e.g. {"street": "123 Main St", "city": "Anytown
homeAddress (dict): Home address of the contact, containing street, city, state, postalCode, and countryOrRegion. e.g. {"street": "123 Main St", "city": "Anytown", "stat
otherAddress (dict): Other address of the contact, containing street, city, state, postalCode, and countryOrRegion. e.g. {"street": "123 Main St", "city": "Anytown", "st
assistantName (str): Name of the assistant of the contact.
businessHomePage (str): Business home page of the contact.
children (list): The name of the contact person's child. Its format is a list of strings. Default is []. e.g. ["John", "Mary"]
personalNotes (str): Personal notes about the contact.
spouseName (str): Name of the spouse of the contact.
Output:
- Contact (object): Created contact object from the API. It contains the following key fields:
id (string): Unique contact identifier.
displayName (string): Display name of the contact.
givenName (string): Given name of the contact.
surname (string): Surname of the contact.
emailAddresses (array): List of email addresses associated with the contact, each containing name (string) and address (string).
businessPhones (array): List of business phone numbers.
mobilePhone (string): Mobile phone number.
jobTitle (string): Job title of the contact.
companyName (string): Company name of the contact.
department (string): Department of the contact works in.
officeLocation (string): Office location of the contact.
personalNotes (string): Personal notes about the contact.
createdDateTime (string): Date and time when the contact was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the contact was last modified. (ISO 8601 format)
homeAddress (object): Home address of the contact, contains street, city, state, postal code, and country or region.
businessAddress (object): Business address of the contact, containing street, city, state, postal code, and country or region.
otherAddress (object): Other address of the contact, containing street, city, state, postal code, and country or region.
title (string): Title of the contact.
birthday (string): Birthday of the contact. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Contact
Delete a contact from Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the contact and cannot be undone.
Input Parameters:
- ContactId: The unique identifier of the contact to delete. After obaining the contact list through the outlook_get_contacts interface, extract the id field from contacts array. (e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgEOAAAATqtKDt_3tEidellYjCb9RQAHrxjPaAAAAA==)
Output:
- Deleted (bool): Indicates whether the contact was successfully deleted. It is set to True if the deletion was successful.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Contacts
Get multiple contacts in Microsoft Outlook using Microsoft Graph API.
Options:
- Limit: Number of contacts to retrieve per request (default: 999, range: 1-999).
Microsoft Graph API supports up to 999 records per page. Use this with Offset for pagination, or use the nextLink from Pagination response for simpler iteration. Example: 50 - Offset: Number of contacts to skip before starting retrieval (default: 0, range: 0-999). Used for manual pagination. Example: To get the 3rd page with Limit=50, set Offset=100. Recommended: Use nextLink from Pagination response instead of manually calculating offset. Example: 0
- Orderby: To sort results in ascending or descending order, append either asc or desc to the field name, separated by a space. The default order is ascending.
e.g. displayName desc, givenName asc, surname asc
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#orderby-parameter - FilterQuery: Filter conditions, used to obtain calendars that meet specific criteria.
Its format should be: fieldName [operator] [value] (e.g. displayName eq 'John Doe' or startswith(givenName,'John'), surname eq 'Smith').
Supported operators include:
- eq (equals): Exact match
- ne (not equal): Not equal
- gt (greater than): Greater than
- ge (greater than or equal): Greater than or equal
- lt (less than): Less than
- le (less than or equal): Less than or equal
- and, or, not: Logical operators
- in, contains, startsWith, endsWith: String matching
- any, all: Set operators
ref: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http - SelectField: A comma-separated list of fields to include in the response.
e.g. id, displayName, givenName, surname, emailAddresses, companyName, jobTitle
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter
Output:
- Contacts (object-array): Retrieved contact array object from the API. (It contains the following key fields:id (string): Unique contact identifier.
displayName (string): The contact's display name.
givenName (string): The contact's given name.
surname (string): The contact's surname.
emailAddresses (array): List of email addresses for the user.
homePhones (array): List of phone numbers for the user.
jobTitle (string): The user's job title.
companyName (string): The name of the contact's company.
department (string): The contact's department.
officeLocation (string): The location of the contact's office.
businessPhones (array): The contact's business phone numbers. Its elements are strings.
mobilePhone (string): The contact's mobile phone number.
personalNotes (string): Notes about the contact.
createdDateTime (string): Date and time when the contact was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the contact was last modified. (ISO 8601 format)
categories (array): Categories associated with the contact.
birthday (string): The contact's birthday. (ISO 8601 format)
anniversary (string): The contact's anniversary. (ISO 8601 format)
spouseName (string): The name of the contact's spouse.
children (array): The names of the contact's children. - Pagination (object): Page metadata object, containing the following fields:
- nextLink (string): The complete URL of the next page. This field does not exist if there is no next page.
- count (number): The number of records returned for the current page. Note: The Microsoft Graph API does not return the total number of records.
Usage:
- Determine if there is a next page: Check if the nextLink field exists
- Fetch the next page: Make a request directly using the URL of nextLink (no need to manually calculate the offset) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Contact
Get a contact in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- ContactId: Specific contact ID to retrieve.
How to obtain:
1. Call the outlook_get_contacts interface
2. Find the target contact in the returned Contacts array
3. Copy the id field value from that contact object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgEOAAAATqtKDt_3tEidellYjCb9RQAHqmes_gAAAA==
Output:
- Contact (object): Retrieved contact object from the API. (Contains the following key fields:id (string): Unique contact identifier.
displayName (string): Display name of the contact.
givenName (string): Given name of the contact.
middleName (string): Middle name of the contact.
nickName (string): Nickname of the contact.
surname (string): Surname of the contact.
title (string): Title of the contact.
emailAddresses (array): List of email addresses associated with the contact, each containing name (string) and address (string).
primaryEmailAddress (object): Primary email address of the contact, containing name (string) and address (string).
companyName (string): Company name of the contact.
jobTitle (string): Job title of the contact.
department (string): Department of the contact works in.
officeLocation (string): Office location of the contact.
businessHomePage (string): Business home page of the contact.
businessPhones (array): List of business phone numbers.
homePhones (array): List of home phone numbers.
mobilePhone (string): Mobile phone number.
personalNotes (string): Personal notes about the contact.
createdDateTime (string): Date and time when the contact was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the contact was last modified. (ISO 8601 format)
homeAddress (object): Home address of the contact, contains street, city, state, postal code, and country or region. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Contact
Update a contact in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- ContactId: The unique identifier of the contact to update.
How to obtain:
1. Call the outlook_get_contacts interface
2. Find the target contact in the returned Contacts array
3. Copy the id field value from that contact object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgEOAAAATqtKDt_3tEidellYjCb9RQAHqmes_gAAAA==
Options:
- GivenName: The new given name of the contact. e.g. John
- Surname: The new surname (family name) of the contact. e.g. Doe
- Generation: The new generation of the contact. e.g. MD.
- MobilePhone: The new mobile phone number of the contact. Default is "".
e.g. +1 555 123 4567 - JobTitle: The new job title of the contact. Default is "".
e.g. Software Engineer - Department: The new department of the contact. Default is "".
e.g. IT Department - EmailAddresses: Email addresses associated with the contact. Each entry contains:
- address (string): The email address (e.g., "john@example.com")
- name (string): Display name or label for this email (e.g., "John Doe" or "Work Email")
e.g. [{"address": "john.doe@example.com", "name": "John Doe"}] - BusinessPhones: Business phone numbers of the contact. Default is []. e.g. ["+1 555 987 6543"]
- AdditionalFields: Additional fields to set in the contact. Can be one or more of the following:
categories (list, optional): Categories of the contact. Its format is a list of strings. Default is [].
birthday (str, optional): Birthday of the contact in ISO 8601 format (e.g., "2023-01-01T00:00:00Z").
fileAs (str, optional): File as of the contact.
middleName (str, optional): Middle name of the contact.
nickName (str, optional): Nickname of the contact.
title (str, optional): Title of the contact (e.g., Dr., Mr., Ms.).
companyName (str, optional): Company name of the contact.
officeLocation (str, optional): Office location of the contact.
profession (str, optional): Profession of the contact.
businessAddress (dict, optional): Business address of the contact, containing street, city, state, postalCode, and countryOrRegion.
homeAddress (dict, optional): Home address of the contact, containing street, city, state, postalCode, and countryOrRegion.
otherAddress (dict, optional): Other address of the contact, containing street, city, state, postalCode, and countryOrRegion.
assistantName (str, optional): Name of the assistant of the contact.
businessHomePage (str, optional): Business home page of the contact.
children (list, optional): The name of the contact person's child. Its format is a list of strings. Default is [].
personalNotes (str, optional): Personal notes about the contact.
spouseName (str, optional): Name of the spouse of the contact.
imAddresses (list, optional): List of IM addresses of the contact.
yomiGivenName (str, optional): Japanese phonetic reading of the given name (Katakana). Used for sorting in Japanese systems.
yomiSurname (str, optional): Japanese phonetic reading of the surname (Katakana).
yomiCompanyName (str, optional): Japanese phonetic reading of the company name (Katakana).
Output:
- Contact (object): Updated contact object from the API. It contains the following key fields:id (string): Unique contact identifier.
displayName (string): Display name of the contact.
givenName (string): Given name of the contact.
surname (string): Surname of the contact.
emailAddresses (array): List of email addresses associated with the contact, each containing name (string) and address (string).
businessPhones (array): List of business phone numbers.
mobilePhone (string): Mobile phone number.
jobTitle (string): Job title of the contact.
companyName (string): Company name of the contact.
department (string): Department of the contact works in.
officeLocation (string): Office location of the contact.
personalNotes (string): Personal notes about the contact.
createdDateTime (string): Date and time when the contact was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the contact was last modified. (ISO 8601 format)
homeAddress (object): Home address of the contact, contains street, city, state, postal code, and country or region.
businessAddress (object): Business address of the contact, containing street, city, state, postal code, and country or region.
otherAddress (object): Other address of the contact, containing street, city, state, postal code, and country or region.
title (string): Title of the contact.
birthday (string): Birthday of the contact. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Draft
Create a new email draft in Microsoft Outlook using Microsoft Graph API. Requires subject and optionally body content, recipients, content type, and importance. Returns new draft object with properties, status code, and error message.
Input Parameters:
- Subject: The subject of the email draft.
Options:
- BodyContent: The body content of the email draft. Default is empty string.
- ToRecipients: To recipients email addresses. e.g. [{"emailAddress": {"address": "email@example.com", "name": "Name"}}].
- CcRecipients: CC recipients email addresses. e.g. [{"emailAddress": {"address": "email@example.com", "name": "Name"}}].
- BodyType: Email body format type. Available options:
- html: HTML format (supports rich text, images, links, etc., recommended to use)
- text: Plain text format (only supports plain text, no formatting)
Default is html. - Importance: The importance of the email: low, normal, or high. Default is normal.
- BccRecipients: BCC recipients email addresses. e.g. [{"emailAddress": {"address": "email@example.com", "name": "Name"}}].
- AdditionalFields: Additional fields to set in the draft. Can be one or more of the following:
categories (list, optional): The categories of the message. e.g. ["IT", "HR"]
flag (dict, optional): The flag of the message with flagStatus. Values: 'notFlagged', 'complete', 'flagged'. e.g., {"flagStatus": "complete"}
Output:
- Draft (object): Created draft dict from the API. It contains the following key fields:
id (string): Unique draft identifier.
categories (list): List of categories associated with the message,
subject (string): Email subject line.
bodyPreview (string): First 255 characters of body).
importance (string): Importance of the message.
body (dict): Full email body with contentType (text/html) and content.
hasAttachments (boolean): Indicates whether the email has attachments.
isRead' (boolean): Indicates whether the email has been read.
isDraft (boolean): Indicates whether the email is a draft.
createdDateTime (string): Date and time when the message was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified. (ISO 8601 format)
receivedDateTime (string): received date and time. (ISO 8601 format)
sentDateTime (string): sent date and time. (ISO 8601 format)
toRecipients (list): list of recipients with emailAddress (dict) including name (string) and address (string)
ccRecipients (list): list of CC recipients with emailAddress (dict) including name (string) and address (string)
bccRecipients (list): list of BCC recipients with emailAddress (dict) including name (string) and address (string)
replyTo (list): list of reply to with emailAddress (dict) including name (string) and address (string)
flag (dict): flag of the message with flagStatus` (string) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Draft
Delete an existing draft in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the draft and cannot be undone.
Input Parameters:
- DraftId: The unique identifier of the draft to delete.
How to obtain: Call the "outlook_get_messages" action with isDraft=true, then extract the id field from the returned messages array.
Example: AAMkADAwATM5NDA3LWRkNjUtNGI4YS04MjJjLWE1MTMxMzIyY2VkZABGAAAAAAD2aU3U7LfkQ7fUa YrQI3PcBwB3xmnAHEzNS5i680Y28rd3AAAAAAEGAAB3xmnAHEzNS5i680Y28rd3AACX34GfAAA=
Output:
- Deleted (bool): Indicates whether the draft was successfully deleted. It is set to True if the deletion was successful.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Draft
Get a draft in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- DraftId: The unique identifier of the draft to retrieve.
How to obtain:
1. Call the outlook_get_messages action with isDraft=true interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w3 4bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Options:
- SelectField: A comma-separated list of fields to include in the response.
e.g. id, subject, body, from, sender, createdDateTime, receivedDateTime, sentDateTime, categories, isRead, isDraft
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - OutputFormat: The format of the body attribute to be returned. The possible values are "text" or "html".
If this Preference-Applied header is specified, the Prefer header will be returned as proof. If this header is not specified, the body attribute will be returned in HTML format.
Output:
- Draft (object): Retrieved draft object from the API. It contains the following key fields:
id (string): Unique draft identifier.
categories (list): List of categories associated with the draft,
subject (string): Email subject line.
bodyPreview (string): First 255 characters of body).
importance (string): Importance of the draft.
body (object): Full email body with contentType (Text/HTML) and content.
hasAttachments (boolean): Indicates whether the email has attachments.
isRead' (boolean): Indicates whether the email has been read.
isDraft (boolean): Indicates whether the email is a draft.
createdDateTime (string): Date and time when the draft was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the draft was last modified. (ISO 8601 format)
receivedDateTime (string): received date and time. (ISO 8601 format)
sentDateTime (string): sent date and time. (ISO 8601 format)
sender (object): sender of the draft with emailAddress (object) including name (string) and address (string)
from (object): from of the draft with emailAddress (object) including name (string) and address (string)
toRecipients (array): list of recipients with emailAddress (object) including name (string) and address (string)
ccRecipients (array): list of CC recipients with emailAddress (object) including name (string) and address` (string) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Send a Draft
Send an existing email draft in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- DraftId: The unique identifier of the draft email to send.
How to obtain:
1. Call the outlook_get_messages action with isDraft=true interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w 34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Output:
- Sent (bool): Indicates if the request was sent.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Draft
Update a draft in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- DraftId: The unique identifier of the draft to update.
How to obtain:
1. Call the outlook_get_messages action with isDraft=true interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S5 6w34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Options:
- Subject: The new subject of the draft. e.g., New email draft
- BodyContent: The new body content of the draft. Default is empty string.
- ToRecipients: To recipients email addresses. An array of objects containing email addresses.
Format Specification:
- Each recipient is an object, containing the "emailAddress" field
- The "emailAddress" field contains the "address" field (email address)
Single recipient: [{"emailAddress": {"address": "to_user@example.com"}}]
Multiple recipients: [{"emailAddress": {"address": "to_user1@example.com"}}, {"emailAddress": {"address": "to_user2@example.com"}}] - CcRecipients: CC recipients email addresses. An array of objects containing email addresses.
Format Specification:
- Each recipient is an object, containing the "emailAddress" field
- The "emailAddress" field contains the "address" field (email address)
Single recipient: [{"emailAddress": {"address": "cc_user@example.com"}}]
Multiple recipients: [{"emailAddress": {"address": "cc_user1@example.com"}}, {"emailAddress": {"address": "cc_user2@example.com"}}] - BccRecipients: BCC recipients email addresses. An array of objects containing email addresses.
Format Specification:
- Each recipient is an object, containing the "emailAddress" field
- The "emailAddress" field contains the "address" field (email address)
Single recipient: [{"emailAddress": {"address": "bcc_user@example.com"}}]
Multiple recipients: [{"emailAddress": {"address": "bcc_user1@example.com"}}, {"emailAddress": {"address": "bcc_user2@example.com"}}] - BodyType: Email body format type. Available options:
- html: HTML format (supports rich text, images, links, etc., recommended to use)
- text: Plain text format (only supports plain text, no formatting)
Default is html. - AdditionalFields: Additional fields to set in the draft. Can be one or more of the following:
importance (str, optional): The importance of the draft. Available options:
- high: High importance
- normal: Normal importance
- low: Low importance
categories (list, optional): The categories of the message. The categories can be an empty array, or it can have one or more values.
e.g. [], ["IT"], ["IT", "HR", ...]
flag (dict, optional): The flag of the message with flagStatus. Values:
- notFlagged: No flag (default) - Normal email without follow-up marker
- 'flagged': Marked for follow-up - Reminds you to take action later
- 'complete': Follow-up completed - Action has been taken, no further follow-up needed
e.g., {"flagStatus": "complete"}
Output:
- Draft (object): Updated email draft object containing properties like id (string): Unique draft identifier.
categories (list): List of categories associated with the message,
subject (string): Email subject line.
bodyPreview (string): First 255 characters of body).
importance (string): Importance of the message.
body (dict): Full email body with contentType (text/html) and content.
hasAttachments (boolean): Indicates whether the email has attachments.
isRead' (boolean): Indicates whether the email has been read.
isDraft (boolean): Indicates whether the email is a draft.
createdDateTime (string): Date and time when the message was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified. (ISO 8601 format)
receivedDateTime (string): received date and time. (ISO 8601 format)
sentDateTime (string): sent date and time. (ISO 8601 format)
toRecipients (list): list of recipients with emailAddress (dict) including name (string) and address (string)
ccRecipients (list): list of CC recipients with emailAddress (dict) including name (string) and address (string)
bccRecipients (list): list of BCC recipients with emailAddress (dict) including name (string) and address (string)
replyTo (list): list of reply to with emailAddress (dict) including name (string) and address (string)
flag (dict): flag of the message with flagStatus (string)
internetMessageId (string): internet message id of the message
webLink (string): web link of the message
parentFolderId (string): parent folder id of the message
conversationId (string): conversation id of the message
conversationIndex (string): conversation index of the message
isDeliveryReceiptRequested (boolean): whether the message is delivery receipt requested
isReadReceiptRequested (boolean): whether the message is read receipt requested
inferenceClassification` (string): inference classification of the message - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create an Event
Creates a new event in Microsoft Outlook using Microsoft Graph API.
⚠️ Idempotency Warning:
This action does NOT support automatic deduplication. If the request times out
and is retried, duplicate events may be created. To avoid duplicates:
1. Check existing events before creating (use outlook_list_events with time range filter)
2. Use a unique identifier in the event subject or body for manual deduplication
Input Parameters:
- Subject: The new subject of the event
- StartDateTime: Start time of the event in ISO 8601 format, UTC format time. (e.g. "2026-02-04T10:00:00Z")
- EndDateTime: End time of the event in ISO 8601 format, UTC format time. (e.g. "2026-02-04T11:00:00Z")
Options:
- CalendarId: ID of the calendar where the event will be created. Default is "primary"(your main calendar). Leave empty to use the default calendar. After obaining the calendar list through the outlook_get_calendars interface, extract the id field from the returned calendars array.
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgEGAAAATqtKDtellYjCb9RQAGYsCWOAAAAA== - BodyContent: The content/description of the event. Supports plain text or HTML (depending on BodyType).
Tips:
- Use HTML for rich formatting (bold, links, lists)
- Maximum length: 64KB
- Example (HTML): "Discuss Q1 roadmap and budget allocation.
"
- Example (Text): "Discuss Q1 roadmap and budget allocation." - BodyType: Event body format type. Available options:
- html: HTML format (supports rich text, images, links, etc., recommended to use)
- text: Plain text format (only supports plain text, no formatting)
Default is html.
In most cases, using the default value is sufficient. Only change to text when pure text is required. - DisplayName: Location display name of the event. (e.g., "Conference Room A", "Zoom Meeting", "Building 5, Floor 3"). This will be shown as the event location in Outlook calendar. Leave empty if no specific location.
- IsAllDay: Specifies if the event is all day. Default is False.
Important:
When set to true, the system will automatically adjust the start/end times to midnight (00:00:00) of the specified dates.
All-day events display only the date without specific times in the calendar view.
For example, if you provide StartDateTime: "2026-02-05T10:00:00Z" and IsAllDay: true, the event will be created as an all-day event on 2026-02-05 (ignoring the 10:00 time). - AdditionalFields: Additional fields to set in the event. Can be one or more of the following:
importance (str, optional):Importance of the event. Available options:
- low: Low priority event
- normal: Standard priority (default)
- high: High priority event
attendees (list, optional): Attendees associated with the event, each containing emailAddress (dict with address) and type (string). Default is []. e.g. [{"emailAddress": {"address": "attendee1@example.com", "name": "attendee one"}}]
showAs (str, optional): Show the event as "free", "tentative", "busy", "oof", "workingElsewhere". Default is "busy".
sensitivity (str, optional): Sensitivity of the event ("normal", "personal", "private", "confidential"). Default is "normal".
categories (list, optional): Categories associated with the event. Its format is a list of strings. Default is []. e.g. ["IT", "HR"]
isOnlineMeeting (bool, optional): Specifies if the event has an online meeting. Default is False.
onlineMeetingProvider (str, optional): Online meeting provider ("unknown", "teamsForBusiness", "skypeForBusiness", "skypeForConsumer"). Default is "unknown".
allowNewTimeProposals (bool, optional): Specifies if proposing a new time is allowed. Default is True.
reminderMinutesBeforeStart (int, optional): Number of minutes to remind before start. Default is 15.
isReminderOn (bool, optional): Specifies if reminder is on. Default is True.
organizer (dict, optional): Organizer information. e.g. {"emailAddress": {"address": "organizer@example.com", "name": "Organizer"}}
Output:
- Event (object): Created event object from the API. It contains the following key fields:
- id (string): Unique event identifier.
- subject (string): Subject of the event.
- body (object): Body of the event with contentType and content.
- start (object): Start time with dateTime and timeZone.
- end (object): End time with dateTime and timeZone.
- attendees (array): List of attendees with emailAddress and status.
- showAs (string): Calendar show as status ("free", "tentative", "busy", "oof", "workingElsewhere").
- isAllDay (bool): Specifies if the event is all day.
- isOnlineMeeting (bool): Specifies if the event has an online meeting.
- onlineMeeting (object): Online meeting details.
- isDraft (bool): Specifies if the event is a draft.
- type (string): The type of event. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete an Event
Delete an existing event in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the event and cannot be undone.
Input Parameters:
- EventId: The unique identifier of the event to delete.
How to obtain:
1. Call the outlook_get_events interface
2. Find the target event in the returned events array
3. Copy the id field value from that event object
e.g. AAMkADAwATM5NDA3LWRkNjUtNGI4YS04MjJjLWE1MTMxMzIyY2VkZABGAAAAAAD2aU3U7LfkQ7 fUaYrQI3PcBwB3xmnAHEzNS5i680Y28rd3AAAAAAEGAAB3xmnAHEzNS5i680Y28rd3AACX34GfAAA=
Output:
- Deleted (bool): Indicates whether the event was successfully deleted. It is set to True if the deletion was successful.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Events
Get many events in Microsoft Outlook using Microsoft Graph API.
Options:
- CalendarId: ID of the calendar to retrieve events from. Use "primary" for primary calendar (default).
How to obtain:
1. Call outlook_get_calendars to get the calendar list
2. From the response, navigate to Calendars array
3. Copy the id field from the target calendar object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt... - Limit: Number of contacts to retrieve per request (default: 999, range: 1-999).
Microsoft Graph API supports up to 999 records per page. Use this with Offset for pagination, or use the nextLink from Pagination response for simpler iteration.
Example: 50 - Offset: Number of contacts to skip before starting retrieval (default: 0, range: 0-999). Used for manual pagination.
Example: To get the 3rd page with Limit=50, set Offset=100.
Recommended: Use nextLink from Pagination response instead of manually calculating offset.
Example: 0 - Orderby: To sort results in ascending or descending order, append either asc or desc to the field name, separated by a space. The default order is ascending.
e.g. createdDateTime desc, subject asc, organizer/emailAddress/name asc
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#orderby-parameter - FilterQuery: Filter conditions, used to obtain calendars that meet specific criteria.
Its format should be: fieldName [operator] [value]
e.g. subject eq 'Meet for lunch?' or start/dateTime ge '2023-01-01T00:00:00Z', organizer/emailAddress/address eq 'someuser@example.com'
Supported operators include:
- eq (equals): Exact match
- ne (not equal): Not equal
- gt (greater than): Greater than
- ge (greater than or equal): Greater than or equal
- lt (less than): Less than
- le (less than or equal): Less than or equal
- and, or, not: Logical operators
- in, contains, startsWith, endsWith: String matching
- any, all: Set operators
ref: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http - SelectField: A comma-separated list of fields to include in the response.
e.g. subject, body, start, end, organizer, location, isAllDay, hasAttachments
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - OutputFormat: The format of the body attribute to be returned. The possible values are "text" or "html".
If this Preference-Applied header is specified, the Prefer header will be returned as proof. If this header is not specified, the body attribute will be returned in HTML format.
Output:
- Events (object-array): List of retrieved event objects from the API. Each event contains the following key fields:
id (string): Event identifier.
createdDateTime (string): Event creation date and time. (ISO 8601 format)
lastModifiedDateTime (string): Event last modification date and time. (ISO 8601 format)
categories (list): Event categories.
subject (string): Event subject/title.
body (dict): Event body containing content and contentType.
start (dict): Event start date/time in ISO 8601 format with timezone. Contains dateTime and timeZone.
end (dict): Event end date/time in ISO 8601 format with timezone. Contains dateTime and timeZone.
organizer (dict): Event organizer object. Contains emailAddress which includes name and address.
attendees (list): List of attendees with their details.
location (dict): Event location object with displayName and other location details.
isAllDay (boolean): Indicates if the event is an all-day event.
isCancelled (boolean): Indicates if the event is cancelled.
isOrganizer (boolean): Indicates if the user is the organizer.
showAs (string): Scheduling status of the event (e.g. free, tentative, busy).
importance (string): Importance level. Its value must be one of the following: 'low', 'normal', 'high'.
sensitivity (string): Sensitivity level. Its value must be one of the following:'normal', 'personal', 'private', 'confidential'.
isReminderOn (boolean): Indicates whether a reminder is set. - Pagination (object): Page metadata object, containing the following fields:
- nextLink (string): The complete URL of the next page. This field does not exist if there is no next page.
- count (number): The number of records returned for the current page. Note: The Microsoft Graph API does not return the total number of records.
Usage:
- Determine if there is a next page: Check if the nextLink field exists
- Fetch the next page: Make a request directly using the URL of nextLink (no need to manually calculate the offset) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get an Event
Get an event in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- EventId: Specific event ID to retrieve.
How to obtain:
1. Call the outlook_get_events interface
2. Find the target event in the returned events array
3. Copy the id field value from that event object
e.g AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIE gcATqtKDt_3tEidellYjCb9RQAAAgENAAAATqtKDt_3tEidellYjCb9RQAHrbzCUQAAAA==
Options:
- SelectField: A comma-separated list of fields to include in the response. Used to reduce returned fields and improve performance. Leave empty to return all fields.
e.g id, subject, body, categories, createdDateTime, start, end, hasAttachments
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - TimeZone: The time zone to use for the start and end times of the event. Uses Windows time zone names (not IANA format like Asia/Shanghai).
Common time zones:
- 'China Standard Time' (UTC+8)
- 'Pacific Standard Time' (UTC-8)
- 'Eastern Standard Time' (UTC-5)
- 'GMT Standard Time' (UTC+0)
Note:
If not provided, the default time zone of the user's Outlook profile will be used.
For a complete list of time zones, see: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones" - OutputFormat: The format of the body attribute to be returned. It can be 'text' or 'html'. Default is 'html'.
If this Preference-Applied header is specified, the Prefer header will be returned as proof. If this header is not specified, the body attribute will be returned in HTML format.
Output:
- Event (object): Retrieved event object from the API. It contains the following key fields:
id (string): Event identifier.
createdDateTime (datetime): Date and time when the event was created.
lastModifiedDateTime (datetime): Date and time when the event was last modified.
categories (list): List of categories associated with the event.
subject (string): Event subject or title.
body (dict): Event body with contentType (Text/HTML) and content.
start (dict): Start date and time (dateTime and timeZone).
end (dict): End date and time (dateTime and timeZone).
location (dict): Event location (displayName showing the location name, locationType showing the location type, uniqueIdType showing the unique identifier type, address showing the street address, coordinates showing coordinates).
attendees (list): List of attendees with email addresses and names.
organizer (dict): Organizer information with email and name.
isDraft (boolean): Indicates whether the event is a draft.
isAllDay (boolean): Indicates whether the event is an all-day event.
isCancelled (boolean): Indicates whether the event is cancelled.
showAs (string): Scheduling status ('free', 'tentative', 'busy', etc.).
importance (string): Importance level ('low', 'normal', 'high').
isReminderOn (boolean): Indicates whether a reminder is set.
hasAttachments (boolean): Indicates whether the event has attachments.
webLink (string): Link to the event in the Outlook web client. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update an Event
Update an existing event in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- EventId: The unique identifier of the event to update.
How to obtain:
1. Call the outlook_get_events interface
2. Find the target event in the returned events array
3. Copy the id field value from that event object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrI yNt-VIEgcATqtKDt_3tEidellYjCb9RQAAAgENAAAATqtKDt_3tEidellYjCb9RQAHrbzCUQAAAA==
Options:
- Subject: New subject of the event. Default is "".
- StartDateTime: New start time of the event in ISO 8601 format, UTC format time. (e.g. "2026-02-04T10:00:00Z") Default is "".
- EndDateTime: New end time of the event in ISO 8601 format UTC format time. (e.g. "2026-02-04T11:00:00Z") Default is "".
- BodyContent: New content of the event. Default is "".
- DisplayName: New display name of the event. Default is "".
- IsAllDay: Specifies if the event is all day. Default is False.
- AdditionalFields: Additional fields to update in the event. Can be one or more of the following:
importance (str, optional): Importance of the event.
low: Low priority event
normal: Standard priority (default)
high: High priority event
attendees (list, optional): Attendees associated with the event, each containing emailAddress (dict with address) and type (string). Default is [].
showAs (str, optional): Show the event as "free", "tentative", "busy", "oof", "workingElsewhere", "unknown". Default is "unknown".
sensitivity (str, optional): Sensitivity of the event ("normal", "personal", "private", "confidential"). Default is "normal".
categories (list, optional): Categories associated with the event. Its format is a list of strings. Default is [].
isOnlineMeeting (bool, optional): Specifies if the event has an online meeting. Default is False.
onlineMeetingProvider (str, optional): Online meeting provider ("unknown", "teamsForBusiness", "skypeForBusiness", "skypeForConsumer"). Default is "unknown".
allowNewTimeProposals (bool, optional): Specifies if proposing a new time is allowed. Default is True.
reminderMinutesBeforeStart (int, optional): Number of minutes to remind before start. Default is 15.
isReminderOn (bool, optional): Specifies if reminder is on. Default is True.
organizer (dict, optional): Organizer information. It should include the following keys: emailAddress (dict): name and email address of the organizer.
Output:
- Event (object): Updated event object from the API. It contains the following key fields:id (string): Unique event identifier.
subject (string): Subject of the event.
body (object): Body of the event with contentType and content.
start (object): Start time with dateTime and timeZone.
end (object): End time with dateTime and timeZone.
attendees (array): List of attendees with emailAddress and status.
showAs (string): Calendar show as status ("free", "tentative", "busy", "oof", "workingElsewhere", "unknown").
isAllDay (bool): Specifies if the event is all day.
isOnlineMeeting (bool): Specifies if the event has an online meeting.
onlineMeeting (object): Online meeting details.
isDraft (bool): Specifies if the event is a draft.
type (string): The type of event. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Folder
Create a new mail folder in Microsoft Outlook using Microsoft Graph API. Requires folder name and optionally parent folder ID. Returns new folder object with properties, status code, and error message.
Input Parameters:
- DisplayName: Display name of the folder to be created. (e.g Test Folder)
Options:
- ParentFolderId: ID of the parent folder. If not specified, the folder will be created under the root folder. e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJQ7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAHrxi0DAAAAA==
- IsHidden: Whether the folder is hidden. Default is False.
Output:
- Folder (object): A dictionary containing the created folder details. It contains the following key fields:
id (string): Unique folder identifier.
displayName (string): Display name of the folder.
parentFolderId (string): ID of the parent folder.
childFolderCount (int): Number of immediate child folders.
unreadItemCount (int): Number of unread items in the folder.
totalItemCount (int): Total number of items in the folder. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Folder
Delete an existing folder in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the folder and cannot be undone.
Input Parameters:
- FolderId: The unique identifier of the folder to delete.
How to obtain:
1. Call the outlook_get_folders interface
2. Find the target folder in the returned folders array
3. Copy the id field value from that folder object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w 34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Output:
- Deleted (bool): Indicates whether the folder was successfully deleted. It is set to True if the deletion was successful.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Folders
Get folders from the user's mailbox in Microsoft Outlook using Microsoft Graph API.
Options:
- Limit: Number of messages to retrieve (default is 999, range: 1-999)
Microsoft Graph API supports up to 999 records per page. Use this with Offset for pagination, or use the nextLink from Pagination response for simpler iteration. Example: 50. - Offset: Number of messages to offset (default is 0, range: 0-999).
Used for manual pagination. Example: To get the 3rd page with Limit=50, set Offset=100.
Recommended:
Use nextLink from Pagination response instead of manually calculating offset. Example: 0 - Orderby: To sort results in ascending or descending order, append either asc or desc to the field name, separated by a space. The default order is ascending.
Note:
1. If you want to sort by multiple fields, separate them with a comma.
e.g. displayName asc, createdDateTime desc
2. If you use orderby, you must also use select_field to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#orderby-parameter - FilterQuery: Filter conditions, used to obtain messages that meet specific criteria.
Its format should be: fieldName [operator] [value]
e.g. startswith(displayName,'mary') or displayName eq 'Jhon'.
Supported operators include:
- eq (equals): Exact match
- ne (not equal): Not equal
- gt (greater than): Greater than
- ge (greater than or equal): Greater than or equal
- lt (less than): Less than
- le (less than or equal): Less than or equal
- and, or, not: Logical operators
- in, contains, startsWith, endsWith: String matching
- any, all: Set operators
Note: If you use filter_query, you must also use select_field to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http - SelectField: A comma-separated list of fields to include in the response.
e.g.id, displayName, parentFolderId, totalItemCount
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - SearchCriteria: Use the query parameter to restrict request results to match a search criterion. The search syntax follows these rules:
1. Format: ": " [AND | OR] " : "
2. Supported properties: displayName (full-text search), description (full-text search), other properties (prefix match)
3. Logical operators: AND, OR (must be uppercase and outside quotes)
e.g.:
- Single condition: "displayName:Archive"
- Multiple conditions: "displayName:Archive" OR "parentFolderId:AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJQ7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAAAgEIAAAA"
Note: If you use search_criteria, you must also use select_field to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/search-query-parameter?tabs=http
Output:
- Folders (object-array): Array of retrieved folder objects from the API containing:
- id (string): Unique folder identifier
- displayName (string): Display name of the folder
- parentFolderId (string): Parent folder ID of the folder
- childFolderCount (int): Number of child folders in the folder
- unreadItemCount (int): Number of unread items in the folder
- totalItemCount (int): Total number of items in the folder - Pagination (object): Page metadata object, containing the following fields:
- nextLink (string): The complete URL of the next page. This field does not exist if there is no next page.
- count (number): The number of records returned for the current page. Note: The Microsoft Graph API does not return the total number of records.
Usage:
- Determine if there is a next page: Check if the nextLink field exists
- Fetch the next page: Make a request directly using the URL of nextLink (no need to manually calculate the offset) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Folder
Get a folder in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- FolderId: The unique identifier of the message's mailFolder to retrieve. Possible values include:
- mail: Mail folder
- inbox: Inbox folder
- drafts: Drafts folder
- sent: Sent items folder
- deleted: Deleted items folder
- archive: Archive folder
- junk: Junk email folder
- outbox: Outbox folder
How to obtain:
1. Call the outlook_get_folders interface
2. Find the target folder in the returned Folders array
3. Copy the id field value from that folder object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJ Q7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAAAgEMAAAA
Output:
- Folder (object): Retrieved folder object from the API. It contains the following key fields:
id (string): Unique folder identifier.
displayName (string): Display name of the folder.
childFolderCount (integer): Number of child folders in the folder.
unreadItemCount (integer): Number of unread items in the folder.
totalItemCount (integer): Total number of items in the folder.
sizeInBytes (integer): Size of the folder in bytes.
isHidden (boolean): Indicates whether the folder is hidden.
parentFolderId (string): Parent folder ID of the folder. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Folder
Updates a folder in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- FolderId: The unique identifier of the message's mailFolder to retrieve.
How to obtain:
1. Call the outlook_get_folders interface
2. Find the target folder in the returned Folders array
3. Copy the id field value from that folder object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJQ7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAAAgEMAAAA - DisplayName: The display name of the folder to update.
Note
The displayName of the folder cannot be changed for the default folders (Inbox, Drafts, SentItems, DeletedItems, Drafts, Outbox, Archive, Junk).
Output:
- Folder (object): Updated folder dict from the API containing:
id (string): Unique folder identifier
displayName (string): Display name of the folder
parentFolderId (string): Parent folder ID
childFolderCount (int): Count of child folders
unreadItemCount (int): Count of unread items in the folder
totalItemCount (int): Total count of items in the folder - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete a Message
Delete an existing message in Microsoft Outlook using Microsoft Graph API. This operation permanently deletes the message and cannot be undone.
Input Parameters:
- MessageId: The unique identifier of the message to delete.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56 w34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Output:
- Deleted (bool): Indicates whether the message was successfully deleted. It is set to True if the deletion was successful.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Folder Messages
Get messages from a specific folder in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- FolderId: The unique identifier of the message's mailFolder to retrieve.
How to obtain:
1. Call the outlook_get_folders interface
2. Find the target folder in the returned folders array
3. Copy the id field value from that folder object
e.g. inbox, drafts, AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJQ7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAAAgEMAAAA
Options:
- Limit: Number of messages to retrieve (default is 999, range: 1-999).
Microsoft Graph API supports up to 999 records per page.
Use this with Offset for pagination, or use the nextLink from Pagination response for simpler iteration. Example: 50. - Offset: Number of messages to offset (default is 0, range: 0-999).
Used for manual pagination. Example: To get the 3rd page with Limit=50, set Offset=100.
Recommended: Use nextLink from Pagination response instead of manually calculating offset. Example: 0 - Orderby: To sort results in ascending or descending order, append either asc or desc to the field name, separated by a space. The default order is ascending.
e.g. receivedDateTime desc, subject, toRecipients/emailAddress/address asc
Note: If you use Orderby, you must also use SelectField to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#orderby-parameter - FilterQuery: Filter conditions, used to obtain messages that meet specific criteria.
Its format should be: fieldName [operator] [value]
e.g. subject eq 'Meet for lunch?' or startswith(surname,'mary')
Supported operators include:
- eq (equals): Exact match
- ne (not equal): Not equal
- gt (greater than): Greater than
- ge (greater than or equal): Greater than or equal
- lt (less than): Less than
- le (less than or equal): Less than or equal
- and, or, not: Logical operators
- in, contains, startsWith, endsWith: String matching
- any, all: Set operators
Note: If you use FilterQuery, you must also use SelectField to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http - SelectField: A comma-separated list of fields to include in the response.
e.g. id, subject, body, from, sender, hasAttachments, createdDateTime, receivedDateTime, sentDateTime, categories, isRead, isDraft
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - SearchCriteria: Use the query parameter to restrict request results to match a search criterion. The search syntax follows these rules:
1. Format: ": " [AND | OR] " : "
2. Supported properties: displayName (full-text search), description (full-text search), other properties (prefix match)
3. Logical operators: AND, OR (must be uppercase and outside quotes)
e.g.:
- Single condition: "subject:hello"
- Multiple conditions: ("subject:hello" OR "subject:world") AND "receivedDateTime:2026-01-01"
- Prefix match: "subject:hello*"
- Wildcard: "subject:hello?"
- Range: "receivedDateTime:2026-01-01..2026-01-31"
Note: If you use SearchCriteria, you must also use SelectField to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/search-query-parameter?tabs=http - OutputFormat: The format of the body attribute to be returned. The possible values are "text" or "html".
If this Preference-Applied header is specified, the Prefer header will be returned as proof. If this header is not specified, the body attribute will be returned in HTML format.
Output:
- Messages (object-array): Array of retrieved message objects from the API containing:
id (string): Unique message identifier
categories (list): List of categories associated with the message
subject (string): Email subject line
bodyPreview (string): First 255 characters of body
importance (string): Importance of the message
body (object): Full email body with contentType and content
hasAttachments (boolean): Indicates whether the email has attachments
isRead (boolean): Indicates whether the email has been read
isDraft (boolean): Indicates whether the email is a draft
createdDateTime (string): Date and time when the message was created (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified (ISO 8601 format)
receivedDateTime (string): Received date and time (ISO 8601 format)
sentDateTime (string): Sent date and time (ISO 8601 format)
sender (object): Sender of the message with emailAddress (name and address)
from (object): From field with emailAddress (name and address)
toRecipients (array): List of recipients with emailAddress (name and address)
ccRecipients (array): List of CC recipients with emailAddress (name and address)
bccRecipients (array): List of BCC recipients with emailAddress (name and address)
replyTo (array): List of reply-to addresses with emailAddress (name and address)
flag (object): Flag of the message with flagStatus
internetMessageId (string): Internet message ID - Pagination (object): Page metadata object, containing the following fields:
- nextLink (string): The complete URL of the next page. This field does not exist if there is no next page.
- count (number): The number of records returned for the current page. Note: The Microsoft Graph API does not return the total number of records.
Usage:
- Determine if there is a next page: Check if the nextLink field exists
- Fetch the next page: Make a request directly using the URL of nextLink (no need to manually calculate the offset) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Messages
Get multiple messages in Microsoft Outlook using Microsoft Graph API.
Options:
- Limit: Number of events to retrieve per request (default: 999, range: 1-999).
Microsoft Graph API supports up to 999 records per page. Use this with Offset for pagination, or use the nextLink from Pagination response for simpler iteration. Example: 50 - Offset: Number of events to skip before starting retrieval (default: 0, range: 0-999).
Used for manual pagination. Example: To get the 3rd page with Limit=50, set Offset=100.
Recommended: Use nextLink from Pagination response instead of manually calculating offset. Example: 0 - OrderBy: To sort results in ascending or descending order, append either asc or desc to the field name, separated by a space. The default order is ascending.
e.g. receivedDateTime desc, subject, from/emailAddress/address asc
Note: If you use orderby, you must also use select_field to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#orderby-parameter - FilterQuery: Filter conditions, used to obtain messages that meet specific criteria.
Its format should be: fieldName [operator] [value]
e.g. subject eq 'Meet for lunch?' or startswith(surname,'mary'), from/emailAddress/address eq 'someuser@example.com'
Supported operators include:
- eq (equals): Exact match
- ne (not equal): Not equal
- gt (greater than): Greater than
- ge (greater than or equal): Greater than or equal
- lt (less than): Less than
- le (less than or equal): Less than or equal
- and, or, not: Logical operators
- in, contains, startsWith, endsWith: String matching
- any, all: Set operators
Note: If you use filter_query, you must also use select_field to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=http - SelectField: A comma-separated list of fields to include in the response.
e.g. id, subject, body, from, sender, createdDateTime, receivedDateTime, sentDateTime, categories, isRead, isDraft
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - SearchCriteria: Use the query parameter to restrict request results to match a search criterion. The search syntax follows these rules:
1. Format: ": " [AND | OR] " : "
2. Supported properties: displayName (full-text search), description (full-text search), other properties (prefix match)
3. Logical operators: AND, OR (must be uppercase and outside quotes)
e.g.:
- Single condition: "subject:hello"
- Multiple conditions: ("subject:hello" OR "subject:world") AND "receivedDateTime:2026-01-01"
- Prefix match: "subject:hello*"
- Wildcard: "subject:hello?"
- Range: "receivedDateTime:2026-01-01..2026-01-31"
Note: If you use search_criteria, you must also use select_field to specify the fields you want to retrieve.
ref: https://learn.microsoft.com/en-us/graph/search-query-parameter?tabs=http - ParentFolderId: The unique identifier for the message's parent mailFolder.
Default behavior: If left empty, retrieves messages from all folders (inbox, sent items, drafts, etc.).
How to obtain:
1. Call outlook_get_folders to get the folder list.
2. From the response, navigate to Folders array
3. Copy the id field from the target folder object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJQ7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAAAgEJAAAA (full ID, do not truncate) - OutputFormat: The format of the body attribute to be returned. It can be 'text' or 'html'.
If this Preference-Applied header is specified, the Prefer header will be returned as proof. If this header is not specified, the body attribute will be returned in HTML format.
Output:
- Messages (object-array): Retrieved message array object from the API. It contains the following key fields:
id (string): Unique message identifier.
categories (list): List of categories associated with the message,
subject (string): Email subject line.
bodyPreview (string): First 255 characters of body).
importance (string): Importance of the message.
body (object): Full email body with contentType (Text/HTML) and content.
hasAttachments (boolean): Indicates whether the email has attachments.
isRead' (boolean): Indicates whether the email has been read.
isDraft (boolean): Indicates whether the email is a draft.
createdDateTime (string): Date and time when the message was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified. (ISO 8601 format)
receivedDateTime (string): received date and time. (ISO 8601 format)
sentDateTime (string): sent date and time. (ISO 8601 format)
sender (object): sender of the message with emailAddress (object) including name (string) and address (string)
from (object): from of the message with emailAddress (object) including name (string) and address (string)
toRecipients (array): list of recipients with emailAddress (object) including name (string) and address (string)
ccRecipients (array): list of CC recipients with emailAddress (object) including name (string) and address (string)
bccRecipients (array): list of BCC recipients with emailAddress (object) including name (string) and address (string)
replyTo (array): list of reply to with emailAddress (object) including name (string) and address (string)
flag (object): flag of the message with flagStatus (string)
internetMessageId (string): internet message id of the message
webLink (string): The URL to open the message in Outlook on the web.
parentFolderId (string): The unique identifier for the message's parent mailFolder.
conversationId (string): conversation id of the message
conversationIndex (string): conversation index of the message
isDeliveryReceiptRequested (boolean): whether the message is delivery receipt requested
isReadReceiptRequested (boolean): whether the message is read receipt requested
inferenceClassification` (string): inference classification of the message - Pagination (object): Page metadata object, containing the following fields:
- nextLink (string): The complete URL of the next page. This field does not exist if there is no next page.
- count (number): The number of records returned for the current page. Note: The Microsoft Graph API does not return the total number of records.
Usage:
- Determine if there is a next page: Check if the nextLink field exists
- Fetch the next page: Make a request directly using the URL of nextLink (no need to manually calculate the offset) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a Message
Get a message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The unique identifier of the message to retrieve.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w 34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Options:
- SelectField: A comma-separated list of fields to include in the response.
e.g. id, subject, body, from, sender, createdDateTime, receivedDateTime, sentDateTime, categories, isRead, isDraft
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter - OutputFormat: The format of the body attribute to be returned. It can be 'text' or 'html'. Default is html.
If this Preference-Applied header is specified, the Prefer header will be returned as proof. If this header is not specified, the body attribute will be returned in HTML format.
Output:
- Message (object): Retrieved message object from the API. It contains the following key fields:
id (string): Unique message identifier.
categories (list): List of categories associated with the message.
subject (string): Email subject line.
bodyPreview (string): First 255 characters of body).
importance (string): Importance of the message.
body (object): Full email body with contentType (Text/HTML) and content.
hasAttachments (boolean): Indicates whether the email has attachments.
isRead' (boolean): Indicates whether the email has been read.
isDraft (boolean): Indicates whether the email is a draft.
createdDateTime (string): Date and time when the message was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified. (ISO 8601 format)
receivedDateTime (string): received date and time. (ISO 8601 format)
sentDateTime (string): sent date and time. (ISO 8601 format)
sender (object): sender of the message with emailAddress (object) including name (string) and address (string)
from (object): from of the message with emailAddress (object) including name (string) and address (string)
toRecipients (array): list of recipients with emailAddress (object) including name (string) and address (string)
ccRecipients (array): list of CC recipients with emailAddress (object) including name (string) and address (string)
bccRecipients (array): list of BCC recipients with emailAddress` - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Move a Message
Move a message to a different folder in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The unique identifier of the message to move.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w3 4bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA= - DestinationFolderId: The unique identifier of the destination folder (parent mailFolder) where the message will be moved. Possible values include:
- mail: Mail folder
- inbox: Inbox folder
- drafts: Drafts folder
- sent: Sent items folder
- deleted: Deleted items folder
- archive: Archive folder
- junk: Junk email folder
- outbox: Outbox folder
How to obtain:
1. Call the outlook_get_folders interface
2. Find the target folder in the returned Folders array
3. Copy the id field value from that folder object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgAuAAADJFHJQ7qE3kSwrIyNt-VIEgEATqtKDt_3tEidellYjCb9RQAAAgEMAAAA
Output:
- Message (object): Updated message object returned from the API containing:
id (string): Unique message identifier
categories (list): List of categories associated with the message
subject (string): Email subject line
bodyPreview (string): First 255 characters of body
importance (string): Importance of the message
body (object): Full email body with contentType and content
hasAttachments (boolean): Indicates whether the email has attachments
isRead (boolean): Indicates whether the email has been read
isDraft (boolean): Indicates whether the email is a draft
createdDateTime (string): Date and time when the message was created (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified (ISO 8601 format)
receivedDateTime (string): Received date and time (ISO 8601 format)
sentDateTime (string): Sent date and time (ISO 8601 format)
sender (object): Sender of the message with emailAddress (name and address)
from (object): From field with emailAddress (name and address)
toRecipients (array): List of recipients with emailAddress (name and address)
ccRecipients (array): List of CC recipients with emailAddress (name and address)
bccRecipients (array): List of BCC recipients with emailAddress (name and address)
replyTo (array): List of reply-to addresses with emailAddress (name and address)
flag (object): Flag of the message with flagStatus
internetMessageId (string): Internet message ID
webLink (string): Web link of the message
parentFolderId (string): Parent folder ID of the message (should reflect the new folder after move)
conversationId (string): Conversation ID of the message
conversationIndex (string): Conversation index of the message
isDeliveryReceiptRequested (boolean): Whether delivery receipt is requested
isReadReceiptRequested (boolean): Whether read receipt is requested
inferenceClassification (string): Inference classification of the message - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Reply to Message
Reply to a message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The ID of the message to reply to.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56 w34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Options:
- Comment: Reply content to be included in the message. Supports both plain text and HTML format.
Plain text example:
Thank you for your email. I will review and get back to you soon.
HTML example:Thank you for your email.
I will review and get back to you soon.
Note: If empty, only the original message will be included in the reply without additional content. - ReplyAll: Whether to reply to all recipients (default is False)
Output:
- Replied (bool): Indicates if the message was successfully replied to.
True: The reply was sent successfully (OriginalStatusCode = 202).
False: The reply failed due to:
- Parameter validation error (StatusCode = -1)
- Network timeout or connection failure (StatusCode = 500)
- Upstream API error (StatusCode = 200 but OriginalStatusCode ≠ 202)
Always check ErrorMessage for detailed failure reasons when Replied is False. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Send a Message
Send an email message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- Subject: Subject of the email.
- BodyContent: Body content of the email.
- ToRecipients: Recipient list. Format: an array of objects containing email addresses.
Format Specification:
- Each recipient is an object, containing the "emailAddress" field
- The "emailAddress" field contains the "address" field (email address)
Single recipient: [{"emailAddress": {"address": "user@example.com"}}]
Multiple recipients: [{"emailAddress": {"address": "user1@example.com"}}, {"emailAddress": {"address": "user2@example.com"}}]
Options:
- BodyType: Type of body content. Available options:
- html: HTML format (supports rich text, images, links, etc., recommended to use)
- text: Plain text format (only supports plain text, no formatting)
Default is html. - AttachmentName: The name of the attachment file. (e.g example.txt)
- AttachmentContent: The content of the attachment (plain text string).
Important Note:
- For text files (.txt, .json, .xml, etc.): Directly pass the text content of the file.
- For binary files (images, PDFs, Word documents, etc.): Directly pass the file bytes.
- The system will automatically convert the content to Base64 format and send it to the Microsoft Graph API.
Note: If you are using a binary file, you need to convert it to Base64 format before passing it to this function.
Text file example: This is the content of the example attachment file.
Binary file example: iVBORw0KGgoAAAANSUhEUgAAAAUA... - SaveToSentItems: Whether to save to sent items, default is True.
- AdditionalFields: Additional fields for the email. It includes following keys:
importance (str, optional):Importance of the event. Available options:
- low: Low priority event
- normal: Standard priority (default)
- high: High priority event
ccRecipients (list): A list of cc recipients addresses in the format [{"emailAddress": {"address": "email@example.com"}}]
bccRecipients (list): A list of bcc recipients addresses in the format [{"emailAddress": {"address": "email@example.com"}}]
categories (list): The categories of the message. The categories can be an empty array, or it can have one or more values.
e.g. [], ["IT"], ["IT", "HR", ...]
flag (dict): The flag of the message with flagStatus. Values: 'notFlagged', 'complete', 'flagged'. e.g., {"flagStatus": "complete"}
Output:
- EmailSent (bool): Indicates if the request was sent.
True: The request was sent successfully (OriginalStatusCode = 202).
False: The request failed due to:
- Parameter validation error (StatusCode = -1)
- Network timeout or connection failure (StatusCode = 500)
- Upstream API error (StatusCode = 200 but OriginalStatusCode ≠ 202)
Always check ErrorMessage for detailed failure reasons when Sent is False. - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Send and Wait for Response
Send an email and wait for a response to an email message sent in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- Subject: Subject of the email. Maximum length: 255 characters. Supports Unicode characters.
Example: Q4 Sales Report - Action Required - BodyContent: Body content of the email.
When BodyType is 'html', supports HTML tags like , ,.
When 'text', only plain text is supported. Maximum length: ~1MB. Example: Dear Team, Please review the attached report. - ToRecipients: Recipient list. Format: an array of objects containing email addresses.
Format Specification:
- Each recipient is an object, containing the "emailAddress" field
- The "emailAddress" field contains the "address" field (email address)
Single recipient: [{"emailAddress": {"address": "user@example.com"}}]
Multiple recipients: [{"emailAddress": {"address": "user1@example.com"}}, {"emailAddress": {"address": "user2@example.com"}}]
Options:
- BodyType: Type of body content. Available options:
- html: HTML format (supports rich text, images, links, etc., recommended to use)
- text: Plain text format (only supports plain text, no formatting)
Default is html. - WaitTime: Timeout in seconds for waiting for the response. Default is 60 seconds.
⚠️ Note:
This timeout is for the polling loop only. The total execution time may be longer due to network latency (~30s for sending email + WaitTime). - PollingInterval: Interval in seconds for checking for response. The system will repeatedly check for new replies at this interval.
Default is 5 seconds.
Recommendation:
- For urgent responses: Use 3-5 seconds
- For normal cases: Use 10-15 seconds (reduces API calls) - AttachmentName: The name of the attachment file. (e.g example.txt)
- AttachmentContent: The content of the attachment (plain text string).
Important Note:
- For text files (.txt, .json, .xml, etc.): Directly pass the text content of the file.
- For binary files (images, PDFs, Word documents, etc.): Directly pass the file bytes.
- The system will automatically convert the content to Base64 format and send it to the Microsoft Graph API.
Note: If you are using a binary file, you need to convert it to Base64 format before passing it to this function.
Text file example: This is the content of the example attachment file.
Binary file example: iVBORw0KGgoAAAANSUhEUgAAAAUA... - AdditionalFields: Additional fields for the email. It includes following keys:
- importance (str, optional): Importance of the event. Available options:
- low: Low priority event
- normal: Standard priority (default)
- high: High priority event
- ccRecipients (list, optional): A list of cc recipients addresses in the format [{"emailAddress": {"address": "email@example.com"}}]
- bccRecipients (list, optional): A list of bcc recipients addresses in the format [{"emailAddress": {"address": "email@example.com"}}]
- categories (list, optional): The categories of the message. The categories can be an empty array, or it can have one or more values.
e.g. [], ["IT"], ["IT", "HR", ...]
- flag (dict, optional): The flag of the message with flagStatus. Values:
- 'notFlagged': No flag (default) - Normal email without follow-up marker
- 'flagged': Marked for follow-up - Reminds you to take action later
- 'complete': Follow-up completed - Action has been taken, no further follow-up needed
e.g., {"flagStatus": "complete"}
- saveToSentItems (bool, optional): Whether to save to sent items, default is True.
Output:
- EmailSent (bool): Indicates if the request was sent.
True: The request was sent successfully (OriginalStatusCode = 202).
False: The request failed due to:
- Parameter validation error (StatusCode = -1)
- Network timeout or connection failure (StatusCode = 500)
- Upstream API error (StatusCode = 200 but OriginalStatusCode ≠ 202)
Always check ErrorMessage for detailed failure reasons when EmailSent is False. - HasResponse (bool): Indicates if a response was received.
True: A response was received from the upstream API.
False: No response was received from the upstream API. - Response (object): The response message received from the upstream API. Contains the following core fields:
- id (string): Unique message identifier
- subject (string): Email subject
- body (object): Email body with contentType and content
- sender (object): Sender information with emailAddress
- receivedDateTime (string): ISO 8601 timestamp
- hasAttachments (bool): Whether the email has attachments
⚠️ Empty Object Meaning:
- When Response = {} and HasResponse = False: No reply received within WaitTime
- When Response = {} and HasResponse = True: Should not happen
Full schema: https://learn.microsoft.com/en-us/graph/api/resources/message - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Message
Update a message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The unique identifier of the message to update.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g.AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAA4iQ8Yfq794S 56w34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AA AA= (full ID, not truncated)
Options:
- Importance: The importance of the message. Available options:
low: Low priority message
normal: Standard priority (default)
high: High priority message - Categories: The categories of the message. The categories can be an empty array, or it can have one or more values.Pass an empty array [] or an array of category names like ["IT", "HR"].
Default value: [] - FlagStatus: The flag of the message with flagStatus. Values:
'notFlagged': default - Normal email without follow-up marker
'flagged': Marked for follow-up - Reminds you to take action later
'complete': Follow-up completed - Action has been taken, no further follow-up needed - IsRead: Indicates whether the message has been read. Set to true to mark as read (remove unread badge), false to mark as unread.
- IsDraft: Indicates whether the message is a draft.
⚠️ Important: When IsDraft=false, the following fields cannot be updated and will be ignored
- Subject
- Body
- internetMessageId (in AdditionalFields)
- replyTo (in AdditionalFields) - Subject: The new subject of the message. It can only be updated when IsDraft = true.
- Body: The body of the message. It can only be updated when IsDraft = true. It should contain 'content' and 'contentType' fields.
content: The content of the message.
contentType: The content type of the message. Available options:
text: Plain text format (only supports plain text, no formatting)
html: html format (supports html tags like , ,etc.)
e.g., {"content": "This is the body content.", "contentType": "text"} - AdditionalFields: Additional fields to retrieve. It can be one or more of the following:
bccRecipients (list, optional): The email addresses of the BCC recipients. list of recipients with emailAddress (dict) including name (string) and address (string). e.g. [{"emailAddress": {"address": "bcc@example.com", "name": "bcc"}}]
ccRecipients (list, optional): The email addresses of the CC recipients. list of recipients with emailAddress (dict) including name (string) and address (string). e.g. [{"emailAddress": {"address": "cc@example.com", "name": "CC"}}]
from (dict, optional): The email address of the owner and sender. It should contain dict 'emailAddress' with 'address' and 'name' fields. inferenceClassification (str, optional): Categorize user emails based on inferred relevance or importance, or based on explicit rewriting. Possible values are: focused or other.
internetMessageId (str, optional): The message ID. It can only be updated when isDraft = true.
isRead (bool, optional): Indicates whether the message has been read.
replyTo (list, optional): The email addresses to use when replying. It can only be updated when isDraft = true. list of recipients with emailAddress (dict) including name (string) and address (string)
sender (dict, optional): The sender of the message. It should contain dict 'emailAddress' with 'address' and 'name' fields.
toRecipients (list, optional): The To recipients for the message. list of recipients with emailAddress (dict) including name (string) and address (string). e.g. [{"emailAddress": {"address": "rc@example.com", "name": "RC"}}]
Output:
- Message (object): Updated message dict from the API. It contains the following key fields:
id (string): Unique message identifier.
categories (list): List of categories associated with the message,
subject (string): Email subject line.
bodyPreview (string): First 255 characters of body).
importance (string): Importance of the message.
body (dict): Full email body with contentType (Text/HTML) and content.
hasAttachments (boolean): Indicates whether the email has attachments.
isRead' (boolean): Indicates whether the email has been read.
isDraft (boolean): Indicates whether the email is a draft.
createdDateTime (string): Date and time when the message was created. (ISO 8601 format)
lastModifiedDateTime (string): Date and time when the message was last modified. (ISO 8601 format)
receivedDateTime (string): received date and time. (ISO 8601 format)
sentDateTime (string): sent date and time. (ISO 8601 format)
sender (dict): sender of the message with emailAddress (dict) including name (string) and address (string)
from (dict): from of the message with emailAddress (dict) including name (string) and address (string)
toRecipients (list): list of recipients
ccRecipients (list): list of CC recipients with emailAddress (dict) including name (string) and address (string)
bccRecipients (list): list of BCC recipients with emailAddress (dict) including name (string) and address (string)
replyTo (list): list of reply to with emailAddress (dict) including name (string) and address (string)
flag (dict): flag of the message with flagStatus (string)
internetMessageId (string): internet message id of the message
webLink (string): web link of the message
parentFolderId (string): parent folder id of the message
conversationId (string): conversation id of the message
conversationIndex (string): conversation index of the message
isDeliveryReceiptRequested (boolean): whether the message is delivery receipt requested
isReadReceiptRequested (boolean): whether the message is read receipt requested
inferenceClassification` (string): inference classification of the message.Email priority classification. focused = Important emails (shown in Focused inbox), other = Less important emails (shown in Other inbox).' - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Add Message Attachment
Add a file attachment to an email message in Microsoft Outlook using Microsoft Graph API. Requires message ID and file path. Optional custom attachment name. Returns new attachment object with properties, status code, and error message.
Input Parameters:
- MessageId: The unique identifier of the email (Message ID). After obtaining the email list through the outlook_get_messages interface, extract the id field from the returned messages array. (e.g AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt...)
- AttachmentName: The name of the attachment file. (e.g example.txt)
- AttachmentContent: The content of the attached file.
Instructions for Use:
Text files (.txt, .json, .xml, etc.): Simply paste the text content of the file directly.
- Example: This is the content of the example attachment file.
Image/PDF/Word, etc. files: You need to first convert the file to Base64 encoding format.
- Tip: You can use online tools (such as base64encode.org) or programming languages for conversion.
- Example: iVBORw0KGgoAAAANSUhEUgAAAAUA... (This is the format of a PNG image after conversion)
Note: The system will automatically handle the encoding, so there is no need to manually add the data:image/png;base64, prefix.
Output:
- Attachment (object): Object representing the created attachment containing:
id (string): Unique attachment identifier
contentType (string): MIME type of the attachment
contentLocation (string): URI to the location of the attachment. (usually it is null)
contentBytes (string): Raw content of the attachment as a base64-encoded value
contentId (string): An ID that uniquely identifies an embedded image attachment
isInline (boolean): Whether the attachment is inline in the body
name (string): The name of the attachment
size (integer): The size of the attachment in bytes
lastModifiedDateTime (string): Last modified time of the attachment (ISO 8601 format) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Download Message Attachment
Get a specific attachment from a message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The unique identifier of the message to retrieve attachment from.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w 34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA= - AttachmentId: The unique identifier of the attachment to download.
How to obtain:
1. Call the outlook_get_message_attachments interface
2. Find the target attachment in the returned Attachments array
3. Copy the id field value from that attachment object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3 tEidellYjCb9RQAAAgEKAAAATqtKDt_3tEidellYjCb9RQAHrbzljAAAAAESABAA9arOK1eSOUSr9DE7sXKBDw==
Output:
- Attachment (object): Object representing the downloaded attachment containing:
id (string): Unique attachment identifier
contentType (string): MIME type of the attachment
contentLocation (string): URI to the location of the attachment
contentBytes (string): Raw content of the attachment as a base64-encoded value
contentId (string): An ID that uniquely identifies an embedded image attachment
isInline (boolean): Whether the attachment is inline in the body
name (string): The name of the attachment
size (integer): The size of the attachment in bytes
lastModifiedDateTime (string): Last modified time of the attachment (ISO 8601 format) - OriginalStatusCode (number): The original HTTP status code returned by the upstream API (Use for debugging)
- StatusCode (number): HTTP status code or operation status code (200 for success, -1 for parameter error, 500 for exceptions)
- ErrorMessage (string): Error description, empty when there is no error
Get Many Message Attachments
Get attachments from a specific message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The unique identifier of the message to retrieve attachments from.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56 w34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA=
Options:
- SelectField: A comma-separated list of fields to include in the response.
e.g. id, name, size, contentType
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter
Output:
- Attachments (object-array): Array of retrieved attachment objects from the API containing:
- id (string): Unique attachment identifier
- size (integer): Size of the attachment in bytes
- isInline (boolean): Whether the attachment is inline/embedded
- name (string): Name of the attachment file
- contentType (string): MIME type of the attachment
- contentId (string): Content ID for inline attachments
- contentLocation (string): URI of the location of the attachment
- lastModifiedDateTime (string): Last modified date and time (ISO 8601 format)
- contentBytes (string): Base64-encoded content of the attachment - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Message Attachment
Get a specific attachment from a message in Microsoft Outlook using Microsoft Graph API.
Input Parameters:
- MessageId: The unique identifier of the message to retrieve attachment from.
How to obtain:
1. Call the outlook_get_messages interface
2. Find the target message in the returned Messages array
3. Copy the id field value from that message object
e.g. AAMkAGVmMDEzMTBkLTJmMmQtNDI5MC1hZjZkLTM1OWZkOGQ4MjY1OABGAAAAAAAiQ8Yfq794S56w 34bI9f9HBwAlu4YBssorTpGhGD6e17MOAACq9o06AAAAlu4YBssorTpGhGD6e17MOAACq9o08AAAA= - AttachmentId: The unique identifier of the attachment to retrieve.
How to obtain:
1. Call the outlook_get_message_attachments interface
2. Find the target attachment in the returned Attachments array
3. Copy the id field value from that attachment object
e.g. AQMkADAwATM3ZmYAZS0wZTRlLWM1N2ItMDACLTAwCgBGAAADJFHJQ7qE3kSwrIyNt-VIEgcATqtKDt_3t EidellYjCb9RQAAAgEKAAAATqtKDt_3tEidellYjCb9RQAHrbzljAAAAAESABAA9arOK1eSOUSr9DE7sXKBDw==
Options:
- SelectField: A comma-separated list of fields to include in the response.
e.g. id, name, size, contentType
The complete list of fields can be found in the Microsoft Graph API documentation.
ref: https://learn.microsoft.com/en-us/graph/query-parameters?tabs=http#select-parameter
Output:
- Attachment (object): Object containing the retrieved attachment from the API with properties:
id (string): Unique attachment identifier
size (integer): Size of the attachment in bytes
isInline (boolean): Whether the attachment is inline/embedded
name (string): Name of the attachment file
contentType (string): MIME type of the attachment
contentId (string): Content ID for inline attachments
contentLocation (string): URI of the location of the attachment
lastModifiedDateTime (string): Last modified date and time (ISO 8601 format)
contentBytes (string): Base64-encoded content of the attachment - OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Default 0 means the request did not reach upstream (e.g., timeout). Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
5. Example Usage
This section will guide you to create a simple workflow for creating a new calendar event in your Microsoft Outlook account. This workflow demonstrates how to use the calendar management capabilities to schedule meetings and events programmatically.
The workflow consists of three main components: Start -> Microsoft Outlook -> Answer, where the Microsoft Outlook node will create a new calendar event with specified details.
Step-by-step Guide:
- Add Tool Node:
- In the workflow canvas, click the "+" button to add a new node.
- In the popup panel, select the "Tools" tab.
- Find and select Microsoft Outlook from the tools list.
- In the list of Microsoft Outlook supported operations, click to select Create an Event, which will add the corresponding node to the canvas.
- Configure Node:
- Click the newly added Create an Event node, and the configuration panel will expand on the right side.
- Credentials Configuration: At the top of the panel, find the credentials field. Click the dropdown menu and select your pre-configured Microsoft Outlook credentials.
- Parameter Configuration: Fill in the input parameters with detailed information:
- For Subject parameter: Enter a title for your new event, such as "Team Meeting" or "Project Review".
- For StartDateTime parameter: Enter the start date and time in ISO 8601 format, for example "2024-03-15T09:00:00" for March 15, 2024, at 9:00 AM.
- For EndDateTime parameter: Enter the end date and time in ISO 8601 format, for example "2024-03-15T10:00:00" for March 15, 2024, at 10:00 AM.
- For Location parameter (optional): Enter the meeting location, such as "Conference Room A" or "Online".
- For BodyContent parameter (optional): Add event description or agenda details.
- For Attendees parameter (optional): Enter attendee email addresses separated by semicolons, like "user1@company.com;user2@company.com".
- Run and Validate:
- Once all required parameters are correctly filled, the error indicators in the top-right corner of the workflow canvas will disappear.
- Click the "Test Run" button in the top-right corner of the canvas to execute the workflow.
- After successful execution, you can click the log icon in the top-right corner to view the detailed input and output of the node, verifying that the operation was successful.
After completing these steps, your entire workflow will be configured and ready. Click "Test Run" to create a new calendar event in your Microsoft Outlook calendar with the specified details and attendees.
6. FAQs
Q: Why am I getting a 401 or 403 error when trying to access Outlook resources?
A: These errors typically indicate authentication or permission issues. Please check the following:
- Ensure your Microsoft Graph API credentials are properly configured and not expired
- Verify that your application has the necessary permissions (scopes) for the operations you're trying to perform
- Check if your access token needs to be refreshed
Q: I'm getting an error about required fields when creating events or messages. What should I check?
A: Please verify that you've provided all required parameters:
- For events: Subject, StartDateTime, and EndDateTime are mandatory
- For messages: Subject, BodyContent, and ToRecipients are required
- Ensure date/time formats follow ISO 8601 standard (e.g., 2024-03-15T09:00:00)
Q: My email attachments are not being added properly. What could be wrong?
A: Common attachment issues include:
- Ensure the ContentBase64 parameter contains properly encoded base64 data
- Verify the AttachmentName parameter doesn't contain invalid characters
- Check that the message ID you're attaching to exists and is valid
- Confirm the attachment size doesn't exceed Microsoft's limits
Q: How do I handle time zones in calendar events?
A: Microsoft Graph API uses UTC time by default. When specifying StartDateTime and EndDateTime:
- Use ISO 8601 format with timezone information (e.g., 2024-03-15T09:00:00-05:00 for EST)
- Or convert your local time to UTC before sending the request
- Consider using the IsAllDay parameter for events that don't require specific times
Leave a Reply.