Skip to main content
Skip table of contents

Slack Connector v1.0

1. General Information

Slack is a new way to communicate with your team. It's faster, better organized, and more secure than email.

Login to Slack using Google or Email.

After logging you will be re-directed to your workspace.

2. Authentication and App creation

To work around with Slack we need to create an App.

In the context of Slack, an "App" refers to a third-party application that integrates with the Slack platform.

Slack uses OAuth2.0 for authenticating users. There are primarily two types of tokens supported by Slack for authentication.

  1. Bot Token Type

  2. User Token Type

If we use OAuth as authentication type in OneTeg for Slack connector it creates Bot token. Bot Token has some restrictions, it can not perform actions on behalf of user like sending a message, deleting message, getting conversation history etc. In order to create User Token we firstly have to create App for our workspace.

a. App Creation

Go to https://api.slack.com/

Now click Your Apps to got to the Apps section.

Click Create New App to create app for desired workspace. Choose From Scratch option to create app. Now that app has been created successfully it would redirect to the below page

image-20241231-065015.png

b. Token Creation

To create token go to OAuth & Permissions in you App’s menu.

image-20241231-065037.png

c. Adding Scopes

Scopes define the API methods an app is allowed to call, which information and capabilities are available on the workspace it’s installed on. Many scopes are restricted to specific resources like channels or files.

Now scroll down to add user scopes.

d. Installing App/ Generate Token

After desired scopes have been added, scroll up to install app/ generate token. Click on the button

Reinstall to Workspace , This would create both User and Bot token, but we would use User token in our OneTeg application.

2. Connector Actions and Tests

a. Get All Channels in Workspace

We use the action Web API: Conversations list (GET) action to get the list of all channels in our workspace.

 

Action Name / Method

Web API: Conversations list (GET)

Action Description

This action is used to get list of all channels in a workspace.

Test Case

Get list of channels in workspace

 

b. Send a Message

 

Action Name / Method

Web API: chat Post Message (POST)

Action Description

This action is used to send a message to the channels.

Test Case

This action is used to send a message to the channels.

Request Body Name

Paramenter

 

Channel

required

 

Text

required

 

Icon Emoji

 

Mrkdwn

 

Attachments

 

Link Names

 

Unfurl Media

 

Blocks

 

Thread Ts

 

As User

 

Unfurl Links

 

Username

 

 

image-20240122-112523.png

4. Connection Settings and Configuration

Settings Parameters

Value

Description

Required (Y/N)

Default Value

Connector

Slack

Connector Name

Y

Slack

Host Name

https://slack.com/api

Endpoint required for performing CRUD

Y

https://slack.com/api

Authentication

Bearer

Type of authentication

Y

 

Get the value of User OAuth Token from Slack App

image-20241231-065106.png

Place the value for User OAuth Token in Api Key .

image-20241231-065118.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.