> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the Microsoft Graph Action Templates

[Back to Actions Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions)

Use prebuilt Microsoft Graph action templates to auto-create dialog tasks for managing events, to-do lists, and email.

**To access templates:**

1. Go to **Automation AI** > **Use Cases** > **Dialogs** and click **Create a Dialog Task**.

2. Under **Integration**, select **Microsoft Graph**.

   ![Integration - Microsoft Graph](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img2.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=536889405075568db5eb3df27bcd9225)

3. If no integration is configured, click **Explore Integrations** to set one up. See [Actions Overview](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#actions).

   ![Explore Integrations](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img3.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=b9b47f0f7dd04ced3f9978647bc039d7)

***

## Supported Actions

| Task | Description | Method |
| - | - | - |
| List all events | Retrieves all calendar events. | GET |
| List all to-do lists | Retrieves all to-do list items. | GET |
| Create a to-do list | Creates a to-do list. | POST |
| Create an event | Creates a calendar event. | POST |
| Send an Email | Sends an email to a user. | POST |

***

### List All Events

1. Install the template from [Microsoft Graph Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-microsoft-graph-action#step-2-install-the-microsoft-graph-action-templates).

2. The **List All Events** dialog task is added with the following components:

   ![List All Events dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img4.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=0ebdc8b1f6f0e3f60f3afbb1b974cb46)

   * **listallEvents** - User intent to view all events.

   * **listAllEventsService** - Bot action service to fetch all events. Click **+Add Response**:

     ![Add Response](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img5.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=5c0f6c4fb497a4604fe880674856de38)

     **Sample Response:** (truncated)

     ```json theme={null}
     {
       "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('john.doe%40outlook.com')/events",
       "value": [
         {
           "id": "AQMkADAwATNiZmY...",
           "subject": "event test",
           "start": {"dateTime": "2022-12-10T04:30:00.0000000", "timeZone": "UTC"},
           "end": {"dateTime": "2022-12-10T05:10:00.0000000", "timeZone": "UTC"}
         }
       ]
     }
     ```

   * **listAllEventstMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   ![VA prompt to view all events](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img6.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=2054b8501f98682a879e82f9a8d0d1c2)

***

### List All To-Do (Tasks) Lists

1. Install the template from [Microsoft Graph Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-microsoft-graph-action#step-2-install-the-microsoft-graph-action-templates).

2. The **List All Todo Lists** dialog task is added with the following components:

   ![List All Todo Lists dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img7.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=94612ce8ab76dc25692e1b9a293b23c3)

   * **listAllToDolists** - User intent to view all to-do lists.

   * **listAllToDoListService** - Bot action service to fetch all to-do lists. Click **+Add Response**:

     ![Add response](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img8.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=18088f447f3cc3f23eeec63063fa1812)

     **Sample Response:** (truncated)

     ```json theme={null}
     {
       "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('john1215%40outlook.com')/todo/lists",
       "value": [
         {"displayName": "Tasks", "isOwner": true, "wellknownListName": "defaultList"},
         {"displayName": "create List from bot", "isOwner": true}
       ]
     }
     ```

   * **listAllTodoListsMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   ![VA prompt to view All Todo Lists](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img9.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=97e8a3f1a95ab9c82273151c5b2b0350)

***

### Create an Event

1. Install the template from [Microsoft Graph Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-microsoft-graph-action#step-2-install-the-microsoft-graph-action-templates).

2. The **Create an Event** dialog task is added with the following components:

   ![Create an Event dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img10.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=ce84922d1549eb25564e142aba151fb0)

   * **createEvent** - User intent to create an event.

   * **eventSubject**, **startDate**, **startTime**, **endDate**, **endTime**, **attendeesEmailAddresses** - Entity nodes.

   * **getMailboxSettingsService** - Bot action service to fetch mailbox settings.

   * **entityFormatterScript** - Script to format attendee email entities.

   * **createEventService** - Bot action service to create an event. Click **Edit Request**:

     ![Edit request](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img11.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=f1c6547a0ce6577a592c3c707028a4a9)

     **Sample Request:**

     ```json theme={null}
     {
       "subject": "My event 1",
       "start": {"dateTime": "2022-11-09T11:45", "timeZone": "India Standard Time"},
       "end": {"dateTime": "2022-11-09T11:50", "timeZone": "India Standard Time"},
       "attendees": [{"emailAddress": {"address": "john.doe@example.com"}}]
     }
     ```

   * **createEventMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   ![VA prompt to create an event](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img12.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=03f4122778cb6a33369196a5e468bea1)

***

### Create a To-do (Tasks) List

1. Install the template from [Microsoft Graph Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-microsoft-graph-action#step-2-install-the-microsoft-graph-action-templates).

2. The **Create a todo list** dialog task is added with the following components:

   ![Create a Todo list dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img13.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=8871c3c541a69d8f87998bd0fd7c3f72)

   * **createTodolist** - User intent to create a task list.

   * **listName** - Entity node for the todo list name.

   * **createTodolistService** - Bot action service to create a todo list. Click **Edit Request**:

     ![Edit request](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img14.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=99e83ced43ec369d3d016c640eeed30c)

     **Sample Request:**

     ```json theme={null}
     {"displayName": "Postman created list3"}
     ```

     **Sample Response:**

     ```json theme={null}
     {
       "displayName": "Postman created list3 (1)",
       "isOwner": true,
       "isShared": false,
       "wellknownListName": "none"
     }
     ```

   * **createTodolistMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   ![prompt to create todo list](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img15.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=70cf3769911a8430aabb4830985065b6)

***

### Send an Email

1. Install the template from [Microsoft Graph Action Templates](https://koreai.mintlify.site/ai-for-service/integrations/actions/configuring-the-microsoft-graph-action#step-2-install-the-microsoft-graph-action-templates).

2. The **Send email** dialog task is added with the following components:

   ![Send EMail dialog task is added](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img16.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=355a7d651dc1d8aa6f84e8a054213a56)

   * **sendEmail** - User intent to send an email.

   * **mailSubject**, **mailContent**, **recipientsEmailAddresses** - Entity nodes.

   * **prepareEmailIdsScript** - Bot action service to format email IDs.

   * **sendEmailService** - Bot action service to send email. Click **Edit Request**:

     ![Edit request](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img17.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=cd92d039bf39d95bc224e76ae77e4377)

     **Sample Request:**

     ```json theme={null}
     {
       "message": {
         "subject": "Testing MS graph",
         "body": {"contentType": "Text", "content": "Integration is working fine"},
         "toRecipients": [
           {"emailAddress": {"address": "alan@abc.com"}},
           {"emailAddress": {"address": "john@abc.com"}}
         ]
       }
     }
     ```

   * **sendMailMessage** - Message node to display responses.

3. Click **Train**, then **Talk to Bot** to test:

   ![VA prompt to send email](https://mintcdn.com/koreai/NuCnGNJCXSVC7wUP/ai-for-service/integrations/actions/images/ms-graph-tem-img18.png?fit=max\&auto=format\&n=NuCnGNJCXSVC7wUP\&q=85\&s=94eed721066e830426476b39806a99e8)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.