> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.microsoft.mail.DownloadAttachment

- Component: `appmixer.microsoft.mail.DownloadAttachment`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.microsoft.mail 2.3.0](https://connectors.appmixer.com/connector/appmixer.microsoft.mail/2.3.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.microsoft.mail/2.3.0/component/appmixer.microsoft.mail.DownloadAttachment>

Download a message attachment.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Message ID (`messageId`) | text | Message ID. Use e.g. the NewEmail->ListAttachments->DownloadAttachment flow. |
| Attachment ID (`attachmentId`) | text | Attachment ID. Use e.g. the NewEmail->ListAttachments->DownloadAttachment flow. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`fileId`) | string | - |
| Filename (`filename`) | string | - |
| Content Type (`contentType`) | string | - |
| Length (`length`) | integer | - |
| MD5 (`md5`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.mail.DownloadAttachment",
  "author": "David Durman <david@client.io>",
  "description": "Download a message attachment.",
  "auth": {
    "service": "appmixer:microsoft",
    "scope": [
      "Mail.Read"
    ]
  },
  "inPorts": [
    {
      "name": "in",
      "inspector": {
        "inputs": {
          "messageId": {
            "type": "text",
            "index": 1,
            "label": "Message ID",
            "tooltip": "Message ID. Use e.g. the NewEmail->ListAttachments->DownloadAttachment flow."
          },
          "attachmentId": {
            "type": "text",
            "index": 2,
            "label": "Attachment ID",
            "tooltip": "Attachment ID. Use e.g. the NewEmail->ListAttachments->DownloadAttachment flow."
          }
        }
      },
      "schema": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string"
          },
          "attachmentId": {
            "type": "string"
          }
        },
        "required": [
          "messageId",
          "attachmentId"
        ]
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "title": "File ID",
            "example": "5996f73d-5e00-4263-9b3d-390aa89a00ce"
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "example": "invoice.pdf"
          },
          "contentType": {
            "type": "string",
            "title": "Content Type",
            "example": "application/pdf"
          },
          "length": {
            "type": "integer",
            "title": "Length",
            "example": 48213
          },
          "md5": {
            "type": "string",
            "title": "MD5",
            "example": "f50881ced34c7d9e6bce100bf33dec60"
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
