# Create event

> The **Create Event** activity calls the Microsoft Graph [CreateEvent](https://docs.microsoft.com/en-us/graph/api/group-post-events?view=graph-rest-beta&tabs=http) API to create a new event object (**Event**) in your specified team (**TeamId**).

## Overview

The **Create Event** activity calls the Microsoft Graph [CreateEvent](https://docs.microsoft.com/en-us/graph/api/group-post-events?view=graph-rest-beta&tabs=http) API to create a new event object (**Event**) in your specified team (**TeamId**).

After creating your new event, the activity outputs the identifier (**EventId**) as a `String` that you can use as an input variable in subsequent activities (for example, [Delete Event](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-delete-event#delete-event)).

## How it works

The following steps and message sequence diagram is an example of how the activity works from design time (that is, the activity dependencies and input/output properties) to run time.

1. Complete the [Setup](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-setup#setup) steps.
2. Add the [Microsoft Teams Scope](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-scope#microsoft-teams-scope) activity to your project.
3. Add an activity or run an external process that outputs a `Team.Id` value (e.g., [Get Teams](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-get-teams#get-teams)).
4. Add the **Create Event** activity inside the **Microsoft Teams Scope** activity.
5. Enter values for the [Input](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-create-event#input) properties, including a new `Event` variable.
6. Create and enter a `String` variable for your [Output](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-create-event#output) property.
7. Run the activity.
   * Your input property values are sent to the [CreateEvent](https://docs.microsoft.com/en-us/graph/api/group-post-events?view=graph-rest-beta&tabs=http) API.
   * The API returns the event id `String` value to your output property variable.

     ![docs image](https://dev-assets.cms.uipath.com/assets/images/marketplace/marketplace-docs-image-33087-2d721062-0bcc0e91.webp)

## Properties

The values for the following properties are specified when adding this activity to your project in UiPath Studio.

### Common

#### DisplayName

The display name of the activity.

| Attributes | Details |
| --- | --- |
| **Type** | `String` |
| **Required** | Yes |
| **Default value** | *Create Event* |
| **Allowed values** | Enter a `String` or `String` variable. |
| **Notes** | N/A |

### Input

#### Event

The `Event` object that represents your new event.

| Attributes | Details |
| --- | --- |
| **Type** | `Event` |
| **Required** | Yes |
| **Default value** | Empty |
| **Allowed values** | Enter a `Event` variable. |
| **Notes** | Because you're creating a new event, the `Event` object does not yet exist. To create the `Event` object variable that represents your new event, enter the following as your variable **Default** value: *new Microsoft.Graph.Event()*.  The variable you create for this property can be used as an input variable in subsequent activities (for example, [Delete Event](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-delete-event#delete-event)). |

#### TeamId

The Id of the `Team` object that you want to create the event in.

| Attributes | Details |
| --- | --- |
| **Type** | `String` |
| **Required** | Yes |
| **Default value** | Empty |
| **Allowed values** | Enter a `String` or `String` variable. |
| **Notes** | To get the `Team.Id` value, use an external process or activity that includes the `Team.Id` value in its output (for example, [Get Teams](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-get-teams#get-teams) or external API call) |

### Misc

#### Private

If selected, the values of variables and arguments are no longer logged at Verbose level.

| Attributes | Details |
| --- | --- |
| **Type** | Checkbox |
| **Required** | No |
| **Default value** | Not Selected |
| **Allowed values** | Selected or Not Selected |
| **Notes** | N/A |

### Output

#### EventId

The identifier assigned to your new `Event` object.

| Attributes | Details |
| --- | --- |
| **Type** | `String` |
| **Required** | No (required if you plan to use the output data in subsequent activities) |
| **Default value** | Empty |
| **Allowed values** | Enter a `String` variable. |
| **Notes** | The variable you create for this property can be used as an input variable in subsequent activities (for example, [Delete Event](https://docs.uipath.com/marketplace/automation-cloud/latest/user-guide/microsoft-teams-delete-event#delete-event)). |
