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

# Outlook

> Connect Outlook to KODE OS for reservations data

> Connect Outlook to KODE OS for reservations data integration

## Overview

Use this integration to connect Microsoft Outlook calendars and reservations to KODE OS. Hybrid pull and push collection keeps meeting and room data current where your connector supports discovery, actions, and related workflows.

| Property            | Value                |
| ------------------- | -------------------- |
| **System Type**     | Reservations         |
| **Communication**   | REST                 |
| **Collection**      | Hybrid (Pull + Push) |
| **Collection Mode** | SNAPSHOT             |
| **Actions**         | Supported            |

## Supported Capabilities

* Discover Devices & Points
* Collect Sensor Data
* Collect Non-Sensor Data

## Prerequisites

* An active account with Outlook and access to their API or developer portal
* OAuth client credentials (Client ID and Client Secret) from the Outlook developer portal
* KODE OS environment with access to Data Sources

### Vendor Onboarding References

Use these official vendor resources to verify API access, credentials, and permission prerequisites:

* [Microsoft Graph sendMail](https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0)
* [Outlook mail API overview](https://learn.microsoft.com/en-us/graph/outlook-create-send-messages)

## Generate API Credentials

1. Log in to the Outlook developer portal or admin console
2. Navigate to the API or developer settings section
3. Create a new API application or client
4. Note the **Client ID** and **Client Secret** -- you will need these when configuring the connector in KODE OS

## Configure Connector in KODE OS

1. Navigate to **Data Sources** in your building
2. Click **API Catalog** and search for **Outlook**
3. Click **+ Add Datasource**
4. Fill in the fields below and complete the three-page setup flow

| Field                  | Required | Type     | Description                                                |
| ---------------------- | -------- | -------- | ---------------------------------------------------------- |
| **URL**                | Yes      | text     | The base URL or IP address of the external system          |
| **Tenant ID**          | Yes      | text     | The tenant identifier in the external system               |
| **User Email Address** | Yes      | text     |                                                            |
| **Client ID**          | Yes      | text     | The OAuth client ID from the vendor's developer portal     |
| **Client Secret**      | Yes      | password | The OAuth client secret from the vendor's developer portal |

## Discover Devices and Points

After configuring the connector, click **Discover** on the connector detail page. KODE OS will query the Outlook system and return a list of available devices and their data points.

Review the discovered items and select the devices you want to register in KODE OS.

For more details on the discovery process, see the [Discovery guide](/products/integrations/capabilities/discovery).

## Devices and Points

When you discover devices from Outlook, KODE OS maps them to the following device types and data points:

### Presence / Occupancy Sensor

Canonical Type: `presenceDetection`

| # | Point    | Description                                | Unit | Writable | Ontology Field | Collection |
| - | -------- | ------------------------------------------ | ---- | -------- | -------------- | ---------- |
| 1 | `status` | **True** -- active / **False** -- inactive | --   | No       | `status`       | Polling    |

## What Data You Get

### Point History

Time-series readings including status, collected at regular intervals from connected devices

### Bookings

Space reservation records including attendees, check-in/out times, confirmation status, and room/space details

KODE OS maps Outlook data to these standard fields:

| KODE Field        | Source Field                                                                       | Notes       |
| ----------------- | ---------------------------------------------------------------------------------- | ----------- |
| **attendeeName**  | `Utils.getSafe( attendee.emailAddress, bookingAttendee -> bookingAttendee.name`    | transformed |
| **attendeeEmail** | `Utils.getSafe( attendee.emailAddress, bookingAttendee -> bookingAttendee.address` | transformed |
| **status**        | `Utils.getSafe( attendee.status, bookingAttendee -> bookingAttendee.response`      | transformed |

### Email Dispatch

Outbound email sending capability through the integrated platform

### Polling Schedule

* **Point History** -- Default polling: 5 minutes (min: 5 minutes, max: 1 hours)
* **Booking** -- Default polling: 5 minutes (min: 5 minutes, max: 1 days)

For more details on collection modes, see the [Data Collection guide](/products/integrations/capabilities/data-collection).

## Available Actions

### Send Email

**Type:** Write

Sends an email notification via Outlook/Microsoft 365 with pre-filled building and device context

| Field             | Type   | Required | Input     | Options / Default                                                                    |
| ----------------- | ------ | -------- | --------- | ------------------------------------------------------------------------------------ |
| **Send Email To** | STRING | Yes      | Text Box  | --                                                                                   |
| **Subject**       | STRING | Yes      | Text Box  | {buildingName} - BMS {priority} Event from {deviceName} - {pointName}                |
| **Body**          | STRING | Yes      | Text Area | Pre-filled template with site, time, device, point, state, priority, and direct link |

#### Example Request

```json theme={null}
{
  "send_email_to": "ops@example.com",
  "subject": "example-value",
  "body": "example-value"
}
```

#### Expected Result

* KODE OS sends the action to the external API using the configured connector credentials
* The external system returns success (typically HTTP 2xx) and processes the requested operation

For more details on how actions work, see the [Actions guide](/products/integrations/capabilities/actions).

## Use Cases

Once connected, this integration enables you to:

* Centralize space and resource booking data across platforms
* Track no-show rates and actual utilization versus bookings
* Coordinate meeting room conditions (HVAC, lighting) with reservation schedules

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication or connection error">
    Verify that the credentials are correct and have not expired. Check that the URL is reachable from the KODE OS environment. Ensure the Client ID and Client Secret match the values from the Outlook developer portal.
  </Accordion>

  <Accordion title="Discovery returns no devices">
    Verify the connector credentials have sufficient permissions in the Outlook system to list devices. Run a test connection first to confirm connectivity. Some systems require specific API scopes or roles for device enumeration.
  </Accordion>

  <Accordion title="Data collection stops or gaps appear">
    Check the connector status on the Data Sources page. If the status shows an error, review the error logs on the connector detail page. Common causes include expired credentials, network changes, or rate limiting by the Outlook API.
  </Accordion>
</AccordionGroup>
