Slack
Last updated
Last updated
Go to https://api.slack.com/apps and create a new app.
Name your application and select a workspace.
Then you receive your clientID and clientSecret.
Generate the App-Level token as well, this token is used for the Slack Events API (see below).
Set a name for the token, and include the authorizations:read
scope.
Copy and paste clientId
and clientSecret
into the Backoffice. Additionally, add the App-Level Token using the key name authToken
.
The next thing is adding the redirect URL and scopes.
And add these scopes.
In order to use the application accross workspaces you have to distribute it.
Some components (NewChannelMessageRT) use Slack Events API (https://api.slack.com/events-api). In order to use this component(s) in Appmixer, you have to register Appmixer's Slack URI in Slack first.
Go to https://api.slack.com/apps then choose your Appmixer app.
Go to your app settings (https://api.slack.com/apps/{your-app-id}/event-subscriptions)
The Request URL has to point to your Appmixer backend server. The rest of the URL /plugins/appmixer/slack/events
has to remain like this. Your Appmixer backend server has to be running before you enter the URL. Slack will immediately try to connect to that URL.
Then you need to subscribe to messages.channels
and message.groups
events.
Don't forget to hit Save Changes:
You can now use the appmixer.slack.list.NewChannelMessageRT component in a flow.
In Appmixer 4.2 the Slack module was upgraded. We did remove all the legacy API and switched to their newest API. For some time, it was possible to use the Appmixer Slack module with both legacy Slack apps and the new Slack apps. But the legacy apps are deprecated and will retire in August 2021 (https://api.slack.com/legacy/workspace-apps). If you use the legacy Slack app, you either have to create a new Slack app or migrate the existing one.
In order to migrate your Slack legacy app, go to Oauth & Permission section.
Then scroll down to Scopes and hit the Update Scopes button.
Ignore the first page, because that's all about scopes for bots.
Scroll all the way down and hit continue. You get to a second page with user scopes.
Select channels:read, channels:history, channels:write, groups:read, groups:write, groups:history, chat:write and users:read.
Verify the scopes and migrate the app.
And confirm. The Appmixer Slack module since version 4.2.1 is already updated and ready for the new Slack apps.
Flows that use the SendPrivateChannelMessage component won't work. The component will appear unauthenticated. The reason is a different Oauth scope in the new Slack app version. In this case, the user has to authenticate the component again.