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

# Send Direct Message

- Component: `appmixer.slack.messages.SendDirectMessage`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.slack 6.0.7](https://connectors.appmixer.com/connector/appmixer.slack/6.0.7.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.slack/6.0.7/component/appmixer.slack.messages.SendDirectMessage>

Send a direct message or multi-person direct message.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Users (`userIds`) | multiselect | Add up to 8 users to send the message to. |
| Message (`text`) | textarea | - |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Message Timestamp (`ts`) | string | - |
| Type (`type`) | string | - |
| Text (`text`) | string | - |
| User (`user`) | string | - |
| Bot ID (`bot_id`) | string | - |
| App ID (`app_id`) | string | - |
| Team (`team`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.slack.messages.SendDirectMessage",
  "label": "Send Direct Message",
  "author": "Appmixer <info@appmixer.com>",
  "icon": "(data URI omitted)",
  "description": "Send a direct message or multi-person direct message.",
  "private": false,
  "auth": {
    "service": "appmixer:slack",
    "scope": [
      "users:read",
      "im:write",
      "mpim:write",
      "chat:write"
    ]
  },
  "quota": {
    "manager": "appmixer:slack:list",
    "resources": "postMessage",
    "maxWait": 30000,
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "userIds": {},
          "text": {
            "type": "string"
          }
        },
        "required": [
          "userIds",
          "text"
        ]
      },
      "inspector": {
        "inputs": {
          "userIds": {
            "type": "multiselect",
            "label": "Users",
            "tooltip": "Add up to 8 users to send the message to.",
            "index": 1,
            "source": {
              "url": "/component/appmixer/slack/list/ListUsers?outPort=out",
              "data": {
                "transform": "./transformers#usersToSelectArray",
                "messages": {
                  "in/outputType": "array",
                  "in/isSource": true
                }
              }
            }
          },
          "text": {
            "type": "textarea",
            "label": "Message",
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Message Timestamp",
          "value": "ts",
          "schema": {
            "type": "string",
            "example": "1737024600.999000"
          }
        },
        {
          "label": "Type",
          "value": "type",
          "schema": {
            "type": "string",
            "example": "message"
          }
        },
        {
          "label": "Text",
          "value": "text",
          "schema": {
            "type": "string",
            "example": "Hi! Your report is ready."
          }
        },
        {
          "label": "User",
          "value": "user",
          "schema": {
            "type": "string",
            "example": "U0ABC12345"
          }
        },
        {
          "label": "Bot ID",
          "value": "bot_id",
          "schema": {
            "type": "string",
            "example": "B0ABC12345"
          }
        },
        {
          "label": "App ID",
          "value": "app_id",
          "schema": {
            "type": "string",
            "example": "A0ABC12345"
          }
        },
        {
          "label": "Team",
          "value": "team",
          "schema": {
            "type": "string",
            "example": "T0ABC12345"
          }
        }
      ]
    }
  ]
}
```
