> 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 Private Channel Message

- Component: `appmixer.slack.list.SendPrivateChannelMessage`
- Kind: Action
- Version: 1.1.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.list.SendPrivateChannelMessage>

Post a message to a specific private channel.

## Input ports

### Port `message`

| Field | Type | Description |
| --- | --- | --- |
| Channel (`channelId`) | text | - |
| Message (`text`) | textarea | - |
| Thread Message ID (`threadTs`) | text | Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. |
| Broadcast reply (`replyBroadcast`) | toggle | Used in conjunction with Thread Message ID, when set to `true` will broadcast the reply to the channel. |
| Send as bot (`asBot`) | toggle | Send the message as a bot user. Make sure the bot is a member of the [private channel](https://api.slack.com/methods/chat.postMessage#private). Ask your Slack admin if unsure which bot app to add. |
| Bot username (`username`) | text | - |
| Bot icon URL (`iconUrl`) | text | - |

## Output ports

### Port `newMessage`

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

## Full metadata (component.json)

```json
{
  "name": "appmixer.slack.list.SendPrivateChannelMessage",
  "label": "Send Private Channel Message",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.1.0",
  "icon": "(data URI omitted)",
  "description": "Post a message to a specific private channel.",
  "private": false,
  "auth": {
    "service": "appmixer:slack",
    "scope": [
      "channels:read",
      "chat:write"
    ]
  },
  "quota": {
    "manager": "appmixer:slack:list",
    "resources": "postMessage",
    "maxWait": 30000,
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "message",
      "schema": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "threadTs": {
            "type": "string"
          },
          "replyBroadcast": {
            "type": "boolean"
          },
          "asBot": {
            "type": "boolean"
          },
          "username": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string"
          }
        },
        "required": [
          "channelId",
          "text"
        ]
      },
      "inspector": {
        "inputs": {
          "channelId": {
            "type": "text",
            "label": "Channel",
            "index": 1,
            "source": {
              "url": "/component/appmixer/slack/list/ListChannels?outPort=channels",
              "data": {
                "messages": {
                  "in/types": "private_channel"
                },
                "transform": "ListChannels#channelsToSelectArray"
              }
            },
            "attrs": {
              "label": {
                "data-tooltip": "Select a private channel."
              }
            }
          },
          "text": {
            "type": "textarea",
            "label": "Message",
            "index": 2
          },
          "threadTs": {
            "type": "text",
            "label": "Thread Message ID",
            "index": 3,
            "tooltip": "Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead."
          },
          "replyBroadcast": {
            "type": "toggle",
            "label": "Broadcast reply",
            "index": 4,
            "tooltip": "Used in conjunction with Thread Message ID, when set to `true` will broadcast the reply to the channel."
          },
          "asBot": {
            "type": "toggle",
            "label": "Send as bot",
            "tooltip": "Send the message as a bot user. Make sure the bot is a member of the <a href='https://api.slack.com/methods/chat.postMessage#private' target='_blank'>private channel</a>. Ask your Slack admin if unsure which bot app to add.",
            "defaultValue": false,
            "index": 5
          },
          "username": {
            "type": "text",
            "label": "Bot username",
            "index": 6,
            "when": {
              "eq": {
                "./asBot": true
              }
            }
          },
          "iconUrl": {
            "type": "text",
            "label": "Bot icon URL",
            "index": 7,
            "when": {
              "eq": {
                "./asBot": true
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "newMessage",
      "schema": {
        "type": "object",
        "required": [
          "ts",
          "type",
          "text",
          "bot_id"
        ],
        "properties": {
          "ts": {
            "type": "string",
            "title": "Message Timestamp",
            "example": "1737024600.555666"
          },
          "type": {
            "type": "string",
            "title": "Message Type",
            "example": "message"
          },
          "subtype": {
            "type": "string",
            "title": "Message Subtype",
            "example": "bot_message"
          },
          "text": {
            "type": "string",
            "title": "Text",
            "example": "Reminder: standup in 15 minutes!"
          },
          "user": {
            "type": "string",
            "title": "User ID",
            "example": "U0ABC12345"
          },
          "username": {
            "type": "string",
            "title": "Bot Username",
            "example": "Appmixer"
          },
          "bot_id": {
            "type": "string",
            "title": "Bot ID",
            "example": "B0ABC12345"
          },
          "app_id": {
            "type": "string",
            "title": "App ID",
            "example": "A0ABC12345"
          },
          "team": {
            "type": "string",
            "title": "Team ID",
            "example": "T0ABC12345"
          }
        }
      }
    }
  ]
}
```
