Skip to content

Data transfer to Slack

tag-outlineSince 26.3

This feature is available in Lite, Enterprise, and Ultimate editions only.

DBeaver can send a Data Transfer text report or exported result files to Slack.

Configure a Slack profile

Before sending Data Transfer results, create a Slack profile:

  1. Go to Window -> Preferences -> General -> Slack.
  2. Select Add ... .
  3. Choose a token type and enter the profile settings.
  4. Select OK to save the profile.

The profile list shows the Name and Type of each profile. You can use Remove () or Edit ... () to manage an existing profile.

Configure a long-lived token

  1. Choose Long-lived token.

  2. Enter a Name and Slack token.

  3. Select OK.
  4. Select Test connection.

You can save the profile after both required fields are set.

Info

For information about Slack tokens, see Slack token documentation.

Configure a rotating token

  1. Choose Rotating token.

  2. Enter a Name, Client ID, and Client secret.

  3. Add a refresh token in one of these ways:

    • If you already have a Slack refresh token, enter it in Refresh token (optional). DBeaver exchanges it for an access token on the next connection. Continue to step 8.
    • If you don't have a refresh token, obtain one from Slack in the following steps.
  4. Select Obtain refresh token from Slack .... This opens Slack OAuth authorization.

  5. Configure the authorization settings:

    Setting Description
    Callback endpoint Sets the local OAuth redirect path; the default is /slack/oauth/callback
    Callback port Sets the local callback listener port; the default is 18443
    Request scopes for Requests the selected scopes for User or Bot; User is the default
    Upload files Requests files:write; enabled by default
    Send messages Requests chat:write; enabled by default
    Start direct messages with people Requests im:write; disabled by default
    Start group direct messages with people Requests mpim:write; disabled by default

    Note

    The Callback endpoint and Callback port form the localhost callback URL localhost:<Callback port><Callback endpoint>. The complete URL, including the port, must exactly match an allowed redirect URL configured for the Slack app.

  6. Select Authorize to start browser authorization.

  7. Complete authorization in the browser. DBeaver waits for the callback, stores the returned tokens, and closes the dialog after authorization succeeds.
  8. Select OK to save the profile.
  9. Select Test connection.

Info

For information about token rotation, see Slack token rotation documentation.

Set up Data Transfer

After configuring a Slack profile, set up Data Transfer to send its results:

  1. Create an export task.
  2. Go to the Output page.
  3. Enable Send results to Slack.
  4. Configure the Slack settings.
  5. Run the task.

The following settings are available:

Setting Description
Profile Selects the Slack profile to use
Configure profiles ... Opens Slack preferences
Channel ID Sets the Slack channel or conversation ID (which usually starts with C, G, or D)
Message Adds an optional initial message
Send notification on success Sends a notification when the task succeeds
Don't send result files Sends a text report without exported result files
Don't notify about empty results Skips the notification when the exported results are empty
Send notification on failure Sends a notification when the task fails

When the task runs, DBeaver sends a text report or the exported result files, along with the optional initial message. Clipboard output isn't sent to Slack.