> 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).

# Get Attachments Metadata

- Component: `appmixer.microsoft.mail.GetAttachments`
- 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.GetAttachments>

Get message attachments metadata only (id, name, content type, size, etc.). The binary content is not included — use the Download Attachment component to download the content. Output Type selects between one message holding a Result array of every attachment, and one message per attachment.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Message ID (`messageId`) | text | Message ID. Use e.g. the NewEmail trigger to get the message ID. |
| Output Type (`outputType`) | select | Choose how the attachments leave this component. 'All attachments at once' sends a single message with a Result array of all attachments plus their Items Count. 'One attachment at a time' sends one message per attachment, each carrying the attachment fields plus its Current Item Index and Items Count — the branch below runs once per attachment. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/microsoft/mail/GetAttachments?outPort=out&ignoreAuth=true`.

## Full metadata (component.json)

```json
{
  "name": "appmixer.microsoft.mail.GetAttachments",
  "label": "Get Attachments Metadata",
  "author": "David Durman <david@client.io>",
  "description": "Get message attachments metadata only (id, name, content type, size, etc.). The binary content is not included — use the Download Attachment component to download the content. Output Type selects between one message holding a Result array of every attachment, and one message per 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 trigger to get the message ID."
          },
          "outputType": {
            "type": "select",
            "options": [
              {
                "content": "One attachment at a time",
                "value": "attachment"
              },
              {
                "content": "All attachments at once",
                "value": "attachments"
              }
            ],
            "index": 2,
            "label": "Output Type",
            "tooltip": "Choose how the attachments leave this component. 'All attachments at once' sends a single message with a Result array of all attachments plus their Items Count. 'One attachment at a time' sends one message per attachment, each carrying the attachment fields plus its Current Item Index and Items Count — the branch below runs once per attachment.",
            "defaultValue": "attachment"
          }
        }
      },
      "schema": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string"
          },
          "outputType": {
            "enum": [
              "attachment",
              "attachments"
            ]
          }
        },
        "required": [
          "messageId"
        ]
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/microsoft/mail/GetAttachments?outPort=out&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType",
            "in/messageId": "dummy"
          }
        }
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
