Connect Slack
What is this connection for?
Section titled “What is this connection for?”Slack allows ELChat to warn a team from a conversation: new lead, incident, urgent request, summary or other event requiring human intervention. ELChat can also find or create the target channel.
What you need
Section titled “What you need”ELChat requires a Bot User OAuth Token in xoxb-xxxxxxxxxxxxxxxxxxxxx format. This token represents a Slack application installed in your workspace.
Step 1 — Create the application Slack
Section titled “Step 1 — Create the application Slack”- Open the page Slack API — Your Apps.
- Click Create New App and choose your workspace.
- Name the
ELChat. - Open OAuth & Permissions.
- In Bot Token Scopes add:
chat:writeto send a message;channels:readto list public channels;channels:manageto create a public channel.
- Install or reinstall the application in the workspace.
- Copy the Bot User OAuth Token
xoxb-....
scopes correspond to the methods actually called: chat.postMessage, conversations.list and conversations.create.
Step 2 — Provide access to the channels
Section titled “Step 2 — Provide access to the channels”Invite the ELChat bot in each channel where it is to publish. The chat:write scope does not allow by default to publish in all public channels without being a member. chat:write.public.
Step 3 — Connect Slack to
Section titled “Step 3 — Connect Slack to”- Open Dashboard > your site > AI Actions > Connectors.
- Click Connect on map Slack.
- Paste the
xoxb-.... 4 token. Validate.
Check the connection
Section titled “Check the connection”Request ELChat to list the channels. Check that a test channel appears and then send a non-sensitive message. The implemented list is limited to 100 channels and does not browse the following pages.
Available capacities
Section titled “Available capacities”• Real capacity Send a message in a channel Creating a channel: Writing
ELChat does not read message history, does not answer in a wire, does not manage files and does not send a private message.
Reconnect and disconnect
Section titled “Reconnect and disconnect”Make token from the Slack app, reconnect ELChat and test the list of channels. Also uninstall the application or revoke its token in Slack to completely cut off access.
Frequent problems
Section titled “Frequent problems”invalid_auth: the token is incomplete, revoked or does not start withxoxb-.missing_scope: add the specified scope and reinstall the application.not_in_channel: invite the bot into the channel.channel_not_found: use a channel returned by the list, not an invented name.- **Slack usually allows about one message per second and per channel; wait before trying again.
##Safety
The token of the bot must remain secret. Limit the application to the above telescopes, invite it only in the necessary channels and immediately revoke an exposed token.
Example: notify the commercial channel
Section titled “Example: notify the commercial channel”Invite the ELChat application in the public channel #leads-test, then connect its token xoxb-... in ELChat. First ask for the channel list and check that #leads-test appears. Then send Test ELChat : nouveau lead fictif.
L The channel name is used to locate the destination, but use a channel returned by the list rather than a guessed ID. The test without actual data checks the perimeter before linking a notification to a workflow.