Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Slack

Author: Irene Cho

This plugin sends messages or files to Slack.

Primary Features

You can choose either a slack bot or user to send a file or a message to Slack.  

What you can send

 As User (As you)
- Text messages and files.

As Bot
- Text messages only.

Prerequisite 

You must have a Slack account and workplace.

You must set up Slack API.

(warning) NOTE

This plugin is designed as “Permissive Operation”.  Failing to complete sending message/file WILL NOT stop the bot itself. In cases of failure, error messages from Slack will be the output in the Return Value.




Need help?

Technical contact to tech@argos-labs.com


May you search all operations,

Contents





Anchor
tip1
tip1

Input

1. Credentials

    • As a Bot
      - Incoming webhook URL.
    • As a User
      - User Token.

2. Message

3. File(file path) (only when sending as a User)



Anchor
tip2
tip2

Steps to set up Slack API


Anchor
tip3
tip3
A. Setting up “bot” as sender.

  1. Login to your Slack account (either with browser or with app).
  2. Open Slack Bot setup website (https://api.slack.com/).
  3. Start building the slack bot and put app name and slack workspace.
    1. App Name shows up as the “sender” when bot is sending messages. You can pick any name you want.
    2. List of workplaces existing under your login account will show up automatically.




  4. Select OAuth & Permissions and add bot token scopes.
        a. Add required scopes: calls:write, files:write, incoming-webhook

             

             

  5. Select Incoming Webhooks and activate them. Add new webhook to your workspace.






  6. Click [Copy] and save the Webhook URL information.


Anchor
tip4
tip4

B. Setting up “user (you)” as sender.

7. Select OAuth & Permission and add user token scopes.

a. Requires user token scopes: files:write, chat:write


8. Install App to Workspace at the OAuth & Permissions page.


9. Save the OAuth Access Token which starts with xoxp-….



Anchor
tip5
tip5

Parameter Settings


  1. Sending message from Bot.



2. Sending message from User (you).



Anchor
tip6
tip6

Return Value

  • Select [Sting]
    • Success: User definable (default is 0).
    • Failure: Print error message but the bot will still run.