DownloadAttachments
Downloads one or more attachments from a specified email message.
Input
| Name | Type | Required | Description |
| MessageId | String | True | Identifier of the email message from which attachments should be downloaded. |
| UserId | String | False | Identifier of the user account. This is required only if the authenticated user is an administrator performing actions on behalf of another user. |
| AttachmentId | String | False | Identifier of a specific attachment to download. If not specified, all attachments from the message are returned. |
| DownloadTo | String | False | Destination path where the attachments are saved. If not specified, the content bytes are returned directly. Required when MessageId is provided. |
| Encoding | String | False | Specifies the encoding type used for the FileData input, such as Base64.
The allowed values are NONE, BASE64. The default value is BASE64. |
Result Set Columns
| Name | Type | Description |
| Id | String | Identifier of the downloaded attachment. |
| Name | String | File name of the downloaded attachment. |
| ContentBytes | String | Raw content bytes of the downloaded attachment. |
| LastmodifiedDatetime | String | Timestamp indicating when the attachment was last modified. |
| ContentType | String | The content type of the attachment. If DownloadTo is specified, this value is null. |
| FileData | String | Encoded file content returned as output. Used only if DownloadTo and FileStream are not specified. |