# Add Attachment

> `UiPath.MicrosoftOffice365.Activities.Calendar.AddAttachment`

`UiPath.MicrosoftOffice365.Activities.Calendar.AddAttachment`

## Description

Uses the Microsoft Graph [Add attachment](https://docs.microsoft.com/en-us/graph/api/event-post-attachments?view=graph-rest-1.0&tabs=http) API to add an attachment (**FilePath**) to a specified event (**Event**).

### Scopes

This activity requires the following scopes:

* Calendars.ReadWrite

OR

* Calendars.ReadWrite.Shared

## Project compatibility

Windows - Legacy | Windows

## Configuration
### Properties panel

#### Common

* **DisplayName** - The display name of the activity. This property supports `String` variables and string formatted values.

#### Input

* **Account** - (Optional) The email address with which to interact. This may include any shared mailbox to which the current user has access rights. If left blank, the current user's account is assumed. This property supports `String` variables and string formatted values.

  :::note
  **Account** field is mandatory for **ApplicationIdAndSecret** and **ApplicationIdAndCertificate** authentication types.
  :::
* **Event** - The event that needs to be updated. This field supports only `Event` variables. Enter the output property variable from either the [Search Events](https://docs.uipath.com/activities/other/latest/productivity/office365-search-events) or [Create Event](https://docs.uipath.com/activities/other/latest/productivity/office365-create-event) (**Events** or **Event**) activities. If you're using the **Events** output property from the **Search Events** activity, specify the item in the array that you want to use (e.g., *myEvents(0)*).
* **FilePath** - The local location of the file that you want to attach. The size of the attachment must be under 4MB. This property supports `String` variables and string formatted values.

#### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.

## How it works

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

1. Complete the steps.
2. Add the [Microsoft Office 365 Scope](https://docs.uipath.com/activities/other/latest/productivity/microsoft-office-365-scope) activity to your project.
3. Add an activity or run an external process that outputs a `Event` object (e.g., [Search Events](https://docs.uipath.com/activities/other/latest/productivity/office365-search-events) or [Create Event](https://docs.uipath.com/activities/other/latest/productivity/office365-create-event)).
4. Add the **Add Attachment** activity inside the **Microsoft Office 365 Scope** activity.
5. Enter values for the Input properties.
6. Run the activity.
   * Your input property values are sent to the [AddAttachment](https://docs.microsoft.com/en-us/graph/api/event-post-attachments?view=graph-rest-1.0&tabs=http) API.

![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/activities-docs-image-179100-ffcaa143.webp)
