Search

Send Message

Last Updated: Dec 28, 2022

Articles

Use this function to post a given message to the provided channel.

Syntax

Send Message (token, channel_id, text)

Parameters

Input Parameter Name Description
token Authentication token
channel_id ID of the channel to post the message
text The message to be posted

  • To know more about token, click here.
  • To view the Channel ID, right click on the channel name in the left menu and select Copy link in Slack. Paste in a text editor, the URL is of the format: https://<Slack URL>/<Channel ID>.

Returns

Return Value Description
Output
  • On Success returns 1 | Timestamp(ts) of message
  • On Failure returns 0 | Error Message

Sample

Send Message (xoxp-12QWERT, ABC123, Hello)

  • Uses token xoxp-12QWERT to authenticate connection to Slack, send the message Hello to channel with ID ABC123.
    Returns the Timestamp of the sent message.

To view all the Slack functions, click here.

Did you find what you were looking for?