Skip to content
andrewrdakers edited this page Oct 17, 2014 · 11 revisions

Support Actions:

slack::chat::send

This is an action to send a message to slack. Required parameters are token, channel, and text.

Input

  • token (required, default: nil): Your token there.

  • channel (required, default: nil): You can use channel names, alternatively you can get your channel id there.

  • text (required, default: nil): The content of your message.

Output

Output is a ruby hash.

Example

listen 'timer::every', minutes:1 do |post_info|
  run 'slack::chat::send', :token => '<token>', :channel => '<channel>', :text => 'Save the Whales'
end

slack::channel::list

This is an action to list out all your slack channels. Required parameter is token.

Input

  • token (required, default: nil): Your token there.

Output

Output is a ruby hash.

Example

listen 'timer::every', minutes:1 do |post_info|
  run 'slack::channel::list', :token => '<token>'
end

slack::channel::invite

This is an action to send a message to slack. Required parameters are token, channel, and text.

Input

  • token (required, default: nil): Your token there.

  • channel (required, default: nil): You can use channel names, alternatively you can get your channel id there.

  • user (required, default: nil): You can user names, alternatively you can get your user id there.

Output

Output is a ruby hash.

Example

listen 'timer::every', minutes:1 do |post_info|
  run 'slack::channel::invite', :token => '<token>', :channel => '<channel>', :user => '<user>'
end

slack::channel::History

This is an action to list out the message history of a slack channel. Required parameters are token and channel.

Input

  • token (required, default: nil): Your token there.

  • channel (required, default: nil): You can use channel names, alternatively you can get your channel id there.

Output

Output is a ruby hash.

Example

listen 'timer::every', minutes:1 do |post_info|
  run 'slack::channel::history', :token => '<token>, :channel => '<channel>'
end

slack::channel::topic

This is an action to list out the message history of a slack channel. Required parameters are token and channel.

Input

  • token (required, default: nil): Your token there.

  • channel (required, default: nil): You can use channel names, alternatively you can get your channel id there.

  • topic (required, default: nil): What your topic will change to.

Output

Output is a ruby hash.

Example

listen 'timer::every', minutes:1 do |post_info|
  run 'slack::channel::topic', :token => '<token>, :channel => '<channel>', :topic => '<topic>'
end

Clone this wiki locally