GetAttachment
Retrieves file attachments associated with a given email or item. It returns binary content and metadata such as name, size, and content type.
Input
| Name | Type | Required | Description |
| AttachmentIds | String | True | A semicolon-separated list of attachment identifiers to retrieve. Each ID must correspond to an attachment associated with an email item. |
| IncludeMimeContent | String | False | Optional. Specifies whether to include the MIME (Multipurpose Internet Mail Extensions) content of the item or attachment in the response. Useful for preserving formatting or metadata. |
| BodyType | String | False | Optional. Defines the format of the body content included in the response. Acceptable values are Best (default), HTML, or Text. Determines how the attachment body is rendered. |
| AttachmentFolder | String | False | Specifies the local folder path where the downloaded attachments will be saved. Required if FileStream is not used. |
| Overwrite | String | False | If set to true, any existing files with the same name in the destination folder will be overwritten. If false, conflicting files will be indexed or renamed to avoid conflicts.
デフォルト値はtrueです。 |
Result Set Columns
| Name | Type | Description |
| AttachmentId | String | The unique identifier of the retrieved file attachment. Useful for referencing the attachment in subsequent operations. |
| Name | String | The filename or display name of the attachment as it appears to the user. |
| ContentType | String | The MIME type of the attachment content, which defines the file format (for example, application/pdf, image/png). |
| ContentId | String | A custom identifier for the attachment content. Can be used by applications to track or reference specific attachments, especially in inline content scenarios. |
| ContentLocation | String | A URI that points to the content location of the attachment, if available. Often used in web-accessible attachments or linked resources. |
| Size | String | The size of the attachment in bytes. Useful for determining file transfer or storage constraints. |
| LastModifiedTime | String | The timestamp indicating when the attachment file was last modified. Helps in identifying the most recent version of a file. |
| IsInline | String | Indicates whether the attachment is embedded inline within the email body content, such as an image or formatted document. |
| IsContactPhoto | String | Indicates whether the attachment represents a contact photo, commonly used in address book entries or user profiles. |
| Content | String | The Base64-encoded binary content of the attachment. Used when the file is returned directly within the response rather than saved to a folder or stream. |