Slack
API actions for the Slack integration.
Slack
Send and manage Slack messages, channels, and reactions.
Add a reaction
Add an emoji reaction to a Slack message.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The ID of the channel that contains the message, for example C123456. Use the channel's ID, not its name. |
timestamp | string | Yes | The timestamp of the message to react to (the value returned when the message was sent). |
emoji | string | Yes | The emoji name without colons, for example thumbsup. |
Response
{
"status": "example_value"
}Archive a channel
Archive a Slack channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The ID of the channel to archive, for example C123456. Use the channel's ID, not its name. |
Response
{
"status": "example_value"
}Create a channel
Create a new public or private Slack channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name for the new channel. Use lowercase letters with no spaces. |
is_private | boolean | No | Set to true to make the channel private. |
topic | string | No | An optional topic to set for the channel. |
Response
{
"channel": {
"id": "example_value",
"is_archived": true,
"is_private": true,
"name": "example_value"
},
"status": "example_value"
}List channels
List the Slack channels you can access, optionally hiding archived ones.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
exclude_archived | boolean | No | Set to true to leave out archived channels. |
limit | number | No | The maximum number of channels to return, from 1 to 1000. |
Response
{
"channels": [],
"status": "example_value"
}Schedule a message
Schedule a message to be posted at a future time.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The ID of the channel to post to, for example C123456. Use the channel's ID, not its name. |
text | string | Yes | The message text to send. |
post_at | number | Yes | When to send the message, given as a Unix timestamp in seconds (for example, 1893456000). |
Response
{
"channel": "example_value",
"post_at": "example_value",
"status": "example_value"
}Send a direct message
Send a direct message to a Slack user.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | The ID of the person to message, for example U123456. |
text | string | Yes | The message text to send. |
Response
{
"channel": "example_value",
"status": "example_value",
"ts": "example_value"
}Send a message to a channel
Post a message to a public or private Slack channel.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | The ID of the channel to post to, for example C123456. Use the channel's ID, not its name. |
text | string | Yes | The message text to send. |
thread_ts | string | No | To reply inside a thread, enter the timestamp of the first message in that thread. Leave empty to post a new message. |
Response
{
"channel": "example_value",
"status": "example_value",
"ts": "example_value"
}