Slack DM Integration
Overview
You can integrate a Slack App with QueryPie and receive Direct Message notifications from QueryPie.
This document applies to version 10.2.6 or higher. For Slack integration methods for version 10.2.5 or lower, please refer to the 10.1.0 version manual documentation .
Required Permissions for Configuration
- Slack Workspace administrator account (required to install App in Slack Workspace)
 - QueryPie Owner and Approval Admin account
 
Creating DM App in Slack API (via Manifest Files)
Create a Slack App dedicated for QueryPie DM integration using App Manifest.
- Go to https://api.slack.com/apps  and click 
Create an App. - In the Create an app modal, select the app creation method. Click 
From a manifest. - In the Pick a workspace modal, select the Slack Workspace to integrate with QueryPie and proceed to the next step.
 - In the Create app from manifest modal, enter the App Manifest in JSON format. 
Delete the pre-filled content and paste the App Manifest below, then proceed to the next step.
:light_bulb_on: Please change the values in{{..}}to your desired values. - Review the settings and click the 
Createbutton to complete app creation. 
Installing Slack App in Slack Workspace
- In Settings > Install App, click the 
Install to Workspacebutton to install the created app in the Slack Workspace. - On the permission request page, click 
Allow. - You can confirm that a Slack DM dedicated app has been created in the configured Slack Workspace.
 
Obtaining Bot User OAuth Token
In the OAuth Tokens for Your Workspace section of the Features > OAuth & Permissions menu, copy and record the Bot User OAuth Token.

Creating App-Level Token
When creating a Slack app with App manifest, you can activate Socket Mode and related permissions, but App Level Token (xapp-) is not automatically generated.
- App Level Token is a security credential, so it would be a security risk if it were automatically generated/exposed through manifest
 - App manifest only defines app configuration, and actual authentication tokens are created/managed separately
 
Follow these steps to manually create an App-Level Token.
- Go to the App-Level Tokens section in Settings > Basic Information menu of the app settings page and click the 
Generate Token and Scopebutton. - In the Generate an app-level token modal, click the Add Scope button and add 
connections:write. - In the generated App-Level Token modal, copy the app token and record it separately. App-Level Token starts with 
xapp-. 
Configuring Slack DM in QueryPie
- Navigate to Admin > General > System > Integrations > Slack menu and click the 
Configurebutton to open the settings modal. - Enter the App Token and Bot User OAuth Token you recorded earlier in the settings modal.
 - Additional settings are as follows. To receive Workflow notifications via DM and perform approval/rejection within messages, activate all setting toggles.
- Send Workflow Notification via Slack DM : Enable Slack DM sending for workflow requests
 - Allow Users to approve or reject on Slack DM  : Enable approval or rejection functionality within Slack DM
 
 - Click the 
Savebutton to complete the setup. 
Managing Slack DM Settings
- After registering Slack Configuration, you can check the current settings status on the screen.
 - Click the 
Editbutton to modify the entered settings. 
Testing Slack DM for Workflow Requests
Using DB Access Request as an example, test whether the Slack DM functionality works properly.
- In QueryPie User > Workflow page, click the Submit Request button, select DB Access Request to enter the request creation screen. Enter the necessary information in the request creation screen and submit the request.
 - Approvers can receive notifications for requests that need approval via DM with the Slack App added earlier.
Since Allow Users to approve or reject on Slack DM is enabled, you can directly enter reasons in DM and approve or reject requests. - When clicking the 
Detailsbutton in DM, you can view detailed content about the approval request in QueryPie Admin and approve or reject it.