Overview
The Firstbase Workflows node for Slack lets you send, manage, and react to Slack messages and channels directly from a workflow, connecting through a dedicated Slack App.
Common Use Cases Include:
- Send a private Slack message to an employee's manager for approval when a hardware order needs sign-off.
- DM an employee to notify of device refresh eligibility and of the incoming new device.
- Post a notification in a designated IT/ops channel when an offboarding task completes.
- Message a departing employee's manager to confirm device return status before final offboarding sign-off.
Connection Overview
Supported Authentication Methods
Users are able to connect using an API Access token or OAuth2. There are limitations related to each and so it will be important to reference your use case when choosing an authentication method.
API access token:
- Required if you want to trigger events from Slack e.i new message posted to a channel, bot app mentioned, etc…
- Works with standard slack “Actions” but is not the recommended method.
OAuth2:
- Recommended for a majority of use cases when using Slack.
- Doesn't work with the Slack Triggers.
API Access Token
This method requires Slack workspace admin permissions.
Users will create a slack app and generate a Bot User OAuth Token.
Step 1 – Create a New App
Log into your slack account and then go to Slack API Apps. Select “Create New App” ->”Blank app”
Give the App a Name and select the appropriate Workspace and then click “Create”.
Step 2– Adjust App Scopes
Upon creation you will be guided to the OAuth & Permissions view. If you are not, click “OAuth & Permissions” under “Features”. Scroll down to “Scopes” and update the recommended scopes. A suggestion of scopes to include is below. A more robust description of scopes can be found here.
| Scope name | Notes |
| channels:read | View basic information about public channels in a workspace |
| channels:history | View messages and other content in public channels that your Slack app has been added to |
| chat:write | Send Messages as your Slack app |
| files:read | View files shared in channels and conversations that your Slack app has been added to |
| files:write | Upload, edit, and delete files as your Slack app |
| groups:read | View messages and other content in private channels that your Slack app has been added to |
| groups:history | View messages and other content in private channels that your Slack app has been added to |
| im:read | View basic information about direct messages that your Slack app has been added to |
| im:history | View messages and other content in direct messages that your Slack app has been added to |
| im:write | Start direct messages with people |
| mpim:read | View basic information about group direct messages that your Slack app has been added to |
| mpim:history | View messages and other content in group direct messages that your Slack app has been added to |
| reactions:read | View emoji reactions and their associated content in channels and conversations that your Slack app has been added to |
| reactions:write | Add and edit emoji reactions |
| usergroups:read | View user groups in a workspace |
| users.profile:read | View profile details about people in a workspace |
| users:read | View people in a workspace |
Step 3 – Generate OAuth Tokens
Scroll up from Scopes to OAuth Tokens. If you are an admin, you will be able to generate a Token. If you are not, you will see a “Request approval to install this app on your workspace, in order to generate your OAuth tokens. Click Request to Workspace Install to send the request.” Contact your administrator to approve the generation of an OAuth token.
Step 4 – Generate a Signature Secret (optional)
To add an additional layer of security, it is recommended to include a signature secret in credential setup. Go to Settings -> Basic Information. Copy value of Signing Secret.
If you are wanting to use the “Slack Triggers” proceed to the next step. If not, proceed to the credential setup in the Firstbase platform.
Step 5 – Generate Webhook to Trigger Events
Under Features in the Slack app go to Event Subscriptions ->Enable Events. It will ask for a Request URL that is generated when you add a Slack “Trigger” to a workflow. This is found within the Firstbase Workflows app. Once a Trigger has been placed in a workflow, open the node and click “Webhook URLs”. It will have a test as well as production URL. Input the appropriate URL into the Request URL field in Slack. Finally, add your event you desire to subscribe to.
OAuth2
This method requires Slack workspace admin permissions.
Users will create a slack app and generate a Bot User OAuth Token
Step 1 – Create a New App & Add Scopes
Follow Steps 1 & 2 Above
Step 2 – Add Redirect URL
In Firstbase Workflows, create a new credential, select Slack OAuth2 API. Copy the OAuth Redirect URL. Then input into slack by going to Features -> OAuth & Permissions and then scroll down to “Add New Redirect URL”.
Step 3 – Find Client ID and Client Secret
In Settings -> Basic Information you will see the App Credentials. You will need both the Client ID and Client Secret.
Setup in Firstbase Workflows
These can be saved as a global credential, reusable across Workflows, or scoped to a single workflow.
Step 1 – Navigate to Workflows
In the Firstbase platform, as an admin, click the Workflows tab.
Step 2 – Create the new credential
In Workflows, click Credentials -> Create Credential (top right) -> Type in your preferred method of connecting Slack.. Enter the credentials: Slack API (Access Token & Signature Secret) - OAuth2 (Client ID, Client Secret, & Signature Secret). Click Save.
Step 3 – Using the credential in a workflow
Once a slack node has been created, open the node and under Credential select your newly created credential.
Questions? Reach out to your Firstbase Solutions Engineer or Customer Success Manager
Comments
0 comments
Please sign in to leave a comment.