Skip to main content

Slack

Add Query

You can add a query step by adding a workflow from the page list.
When you select the Slack data source from the workflow step sidebar, the query input window appears.

slack

Event Types

Send Channel Message

Send a message to a Slack channel.

send-channel-message

Parameters

type SlackSender = 'USER' | 'BOT';
type SlackMessage = 'TEXT' | 'BLOCKS' | 'ATTACHMENT';
type SlackContent = `string` | `Record<string, unknown>[]`;
NameTypeDescription
Sender Type (senderType)SlackSenderMessage sending user type
Channel Name (channel)stringChannel name
Message Type (messageType)SlackMessageMessage type
Content (content)SlackContentMessage content
Thread (threadTs)stringThread timestamp
Reply Broadcast (replyBroadcast)booleanThread message channel send
Other settings (optionalArguments)Record<string, unknown>Other settings

Query Result

When you execute the message sending action, the result value is returned in the following structure.

interface Result {
ok: boolean;
channel: string;
ts: string;
message: Record<string, unknown>;
warning: string;
response_metadata: Record<string, unknown>;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.message;

Send Direct Message

Send a direct message.

send-direct-message

Parameters

NameTypeDescription
Sender Type (senderType)SlackSenderMessage sending user type
User Name (user)stringUser name
Message Type (messageType)SlackMessageMessage type
Content (content)SlackContentMessage content

Query Result

When you execute the direct message sending action, the result value is returned in the following structure.

interface Result {
ok: boolean;
channel: string;
ts: string;
message: Record<string, unknown>;
warning: string;
response_metadata: Record<string, unknown>;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.message;

Search Message

Search for a message.

search-message

Parameters

NameTypeDescription
Search (query)stringSearch content

Query Result

When you execute the message search action, the result value is returned in the following structure.

interface Result {
ok: boolean;
query: string;
messages: Record<string, unknown>;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.messages;

List Users

Search for a user.

list-users

파라미터

NameTypeDescription
Limit (limit)numberLimit
Cursor (cursor)stringCursor
Other settings (optionalArguments)Record<string, unknown>Other settings

Query Result

When you execute the user list action, the result value is returned in the following structure.

interface Result {
ok: boolean;
offset: number;
members: Record<string, unknown>[];
cache_ts: number;
response_metadata: Record<string, unknown>;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.members;

List Channels

Search for a channel.

list-channels

Parameters

NameTypeDescription
Type (channelType)stringChannel type
Limit (limit)numberLimit
Cursor (cursor)stringCursor
Other settings (optionalArguments)Record<string, unknown>Other settings

Query Result

When you execute the channel list action, the result value is returned in the following structure.

interface Result {
ok: boolean;
channels: Record<string, unknown>[];
response_metadata: Record<string, unknown>;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.channels;

List Messages

View a message.

view-message

Parameters

NameTypeDescription
Channel Name (channel)stringChannel name
Limit (limit)numberLimit
Cursor (cursor)stringCursor
Other settings (optionalArguments)Record<string, unknown>Other settings

Query Result

When you execute the message viewing action, the result value is returned in the following structure.

interface Result {
ok: boolean;
messages: Record<string, unknown>[];
has_more: boolean;
pin_count: number;
channel_actions_ts: string;
channel_actions_count: number;
warnings: string;
response_metadata: Record<string, unknown>;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.messages;

List Replies

View a thread.

view-thread

Parameters

NameTypeDescription
Channel Name (channel)stringChannel name
Thread (ts)stringThread timestamp
Limit (limit)numberLimit
Cursor (cursor)stringCursor
Other settings (optionalArguments)Record<string, unknown>Other settings

Query Result

When you execute the thread viewing action, the result value is returned in the following structure.

interface Result {
ok: boolean;
messages: Record<string, unknown>[];
has_more: boolean;
}

Use Result Value

To use the result value in another step, write as follows.

return outputs.stepName.messages;