Skip to main content
Version: Streamsheets 2.4

SLACK.CHANNEL.MESSAGE

star This is a premium feature.

Sends a message to specified Slack channel. This functions takes an optional JSON parameter to define more advanced settings and additional options. Please refer to https://api.slack.com/methods/chat.postMessage for more information about available and supported options (as of 2021-05-17).

Syntax

=SLACK.CHANNEL.MESSAGE(Token, TextOrJSON [, ChannelID, ResponseTarget ])

Arguments

NameDescription
TokenA token which is registered to a workspace and has required access rights
TextOrJSONThe text to send or a JSON which contains the text and additional required or optional parameters
ChannelIDOptional. The name or ID of the channel to post the message to. Not required if specified within passed JSON
ResponseTargetOptional. Specify inbox, outbox, cell or cell-range to write any response to

Return Value

A unique random request ID which can be used with REQUESTINFO to check the state of the request. In case of an error the corresponding error-code is returned.

Example

AB
1textHello
2channelDB1234567890
FunctionComment
=SLACK.CHANNEL.MESSAGE("123key","Hello","#test",INBOX())Sends the message "Hello" to the #test channel and adds server response to the inbox
=SLACK.CHANNEL.MESSAGE("123key",JSON(A1:B2),,INBOX())Same as before but uses a JSON parameter and pass channel ID instead of its name