Skip to main content

Connection - Slack​

The Slack Connection stores the sign-in and security settings that the Slack - Send message Task and the Slack Trigger use to connect to a Slack workspace.

Common settings​

Slack Connection, Common settings tab with the Protocol and Information groups

The Common settings and Proxy tabs are the same for every Connection type that has them; see Common settings and Proxy. The Slack Connection has no Test button.

Main settings​

These fields are on Connection settings -> Main settings.

The Connection settings tab holds two tabs: Main settings and Proxy.

Slack Connection, Main settings tab with the Credentials group

Client ID

The Client ID of your Slack app. Required.

Client Secret

The Client Secret of your Slack app.

Redirect Url

The HTTPS address that receives the reply from Slack after sign-in, on the computer that runs the Client. The default is "https://localhost:9999". It must start with "https://" and must match a redirect URL of the Slack app.

Auto-accept server certificates

Selected by default. The Slack sign-in, the Slack Task and the Slack Trigger do not use this setting.

Certificate

Required. The certificate that Authenticate uses for its HTTPS listener at Redirect Url. Select a certificate with a private key from Certificates. Slack accepts only HTTPS redirect URLs, so a certificate is needed even for "localhost".

Setup application

Opens the Slack app management page in the web browser, where you create and manage Slack apps.

Authenticate

Opens the Slack authorization page in the web browser. After you allow access, the Slack token is saved in the Connection. The Slack Task and the Slack Trigger use this token.

Proxy​

The Slack Task, the Slack Trigger and Authenticate do not use the settings on this tab. They connect to Slack directly.

Set up the Slack app​

To connect VisualCron to Slack, complete the following steps:

  1. On Main settings, click Setup application. The Slack app management page opens.
  2. Create a Slack app in the workspace that VisualCron works with.
  3. Add the Redirect Url value of the Connection, for example "https://localhost:9999", to the redirect URLs of the app.
  4. Add these Bot Token Scopes to the app: "commands", "chat:write", "channels:read", "files:write", "users:read" and "groups:read".
  5. Copy the Client ID of the app into Client ID.
  6. Copy the Client Secret of the app into Client Secret.
  7. In Certificate, select a certificate with a private key.
  8. Click Authenticate.
  9. In the web browser, allow the app access to the workspace.
  10. Click OK.

The Connection is ready for the Slack Task and the Slack Trigger. The screenshots below show these steps on the Slack site.

Setting up Slack -> Create workspace​

Setting up Slack -> Sign in​

Setting up Slack -> Create Slack app​

Setting up Slack -> Edit permissions​

Setting up Slack -> Set Redirect URLs​

The Redirect URL configured in the Slack app must use HTTPS (for example https://localhost:9999) and must match the Redirect Url set on the VisualCron connection.

Setting up Slack -> Set Basic information​

Setting up Slack -> Authorize permissions for VisualCron​

Troubleshooting​

"Missing scope" error​

Authenticate requests these Bot Token Scopes: "commands", "chat:write", "channels:read", "files:write", "users:read" and "groups:read". Add all six to the Slack app, then click Authenticate again.

The Connection keeps the scopes that the Slack app granted at the last Authenticate. Adding a scope to the Slack app has no effect until you click Authenticate again. Without "files:write", "users:read" or "groups:read", file uploads, the user list or private channel lookups fail.