Slack

Connect your Slack app for OAuth in Paragon

Setup Guide

You can find your Slack app credentials by visiting your Slack App dashboard.

Note: You'll need to create a new Slack app if you don't already have one.

You'll need the following information to set up your Slack App with Paragon Connect:

  • Client ID

  • Client Secret

  • Scopes Requested

Add the Redirect URL to your Slack app

Paragon provides a redirect URL to send information to your Slack app. To add the redirect URL to your Slack app:

1. Copy the link under "Redirect URL" in your integration settings in Paragon. The Redirect URL is:

https://passport.useparagon.com/oauth

2. Log in to your Slack App dashboard and select your Slack app.

3. In your Slack App page sidebar, navigate to OAuth & Permissions > Redirect URLs.

4. Press "Add New Redirect URL".

5. Paste-in the redirect URL from Paragon. The redirect URL can be found in Step 1.

6. Press "Add", then press "Save URLs".

Slack provides you with the Client ID and Client Secret needed for the next steps after adding the redirect URL to your application. You can find the credentials under Basic Information > App Credentials in the Slack app sidebar.

Add your Slack app to Paragon

1. Select Slack from the Integrations Catalog.

2. Under Integrations > Connected Integrations > {YOUR_APP} > Settings, fill out your credentials from the end of Step 1 in their respective sections:

  • Client ID: Found under Basic Information > App Credentials > Client ID on your Slack App page.

  • Client Secret: Found under Basic Information > App Credentials > Client Secret on your Slack App page.

  • Permissions: Select the scopes you've requested for your application.

Press the blue "Connect" button to save your credentials.

Note: Leaving the Client ID and Client Secret blank will use Paragon development keys.

Connecting to Slack

Once your users have connected their Slack account, you can use the Paragon SDK to access the Slack API on behalf of connected users.

See the Slack REST API documentation for their full API reference.

Any Slack API endpoints can be accessed with the Paragon SDK as shown in this example.

// You can find your project ID in the Overview tab of any Integration
// Authenticate the user
paragon.authenticate(<ProjectId>, <UserToken>);
// Get All Channels
await paragon.request("slack", "conversations.list", {
method: "GET"
});
// Send Message to Channel
await paragon.request("slack", "chat.postMessage", {
method: "POST",
body: {
"channel": "YOUR_CHANNEL_ID",
"text": "Hello, world",
"as_user": true
}
});

Building Slack workflows

Once your Slack account is connected, you can add steps to perform the following actions.

  • Send message in channel

  • Send DM

When composing your Slack message, you can reference data from previous steps by typing {{ to invoke the variable menu.

Additionally, you can choose whether to send a message as a bot or yourself. If you choose to send as a bot, you can choose to give your bot a custom name and icon.