# Export To Microsoft Calendar

> Create or update Microsoft calendar data from Datahub.

The Export To Microsoft Calendar node creates or updates calendar events in Microsoft Calendar. It uses Microsoft Graph APIs to securely interact with calendars within Microsoft 365.

For each row in the input data, one calendar event is created or updated in the default calendar of the specified mailbox.

How it works:

1. Select a valid connection to Microsoft.
2. Open Advanced to configure the mailbox (email), start and end date/time, timezone, subject, location, optional body, and optional update behavior.
3. For each input row, an event is created or updated.
4. The output contains event details and the original data.

## Configuration

| Setting | Required | Description |
| --- | --- | --- |
| Connection | Yes | A Microsoft Office 365 connection or an OAuth2 connection (Microsoft Graph). |
| Advanced | Yes | Opens a configuration screen where you define all calendar mappings and settings. |

### Advanced configuration

Required fields:

- **Email**: mailbox where the event will be created.
- **Start**: start date and time.
- **End**: end date and time.
- **Time zone column**: timezone (e.g. `W. Europe Standard Time`).
- **Subject column**: title of the event.

Optional fields:

- **Location**: event location.
- **Body**: event description (supports HTML).

## Create vs update

By default (Update Existing disabled), a new event is created for each row.

When **Update Existing** is enabled:

- If no Event ID is provided, a new event is created.
- If an Event ID is provided, the node attempts to update that event.
- If the event no longer exists, a new event is created instead.

## Output

The node creates a new output table. Each row represents a processed calendar event and includes:

| Column | Description |
| --- | --- |
| Id | Microsoft event ID |
| Email | Mailbox used |
| StartTime | Event start time |
| EndTime | Event end time |
| TimeZone | Timezone used |
| Location | Event location |
| Subject | Event title |
| BodyPreview | Preview of the event description |

All original input columns are also included.

## Tips

- The connection must have permission to access the mailbox calendar.
- Each input row results in one calendar event.
- Events are created in the default calendar of the mailbox.