Home Docs Changelog Download Pricing Service Center Contact

How to Send Slack Messages using SQL Statements

1. Overview

SQLMessenger allows you to send messages directly to Slack workspace members using SQL statements through its External Interface feature. This method supports PostgreSQL, MySQL, SQL Server, Oracle, and Informix.

In addition to sending Slack messages, SQLMessenger can also perform the following capability:

2. Step-by-Step Implementation

Step 1: Configure the Slack app in SQLMessenger.

First, configure your Slack application within SQLMessenger. For detailed configuration steps, please refer to the dedicated guide: Sending Messages to Slack Workspace Members via Slack API.

Configure the Slack app in SQLMessenger

Configure the Slack app in SQLMessenger

Step 2: Create a data source and enable the “Allow sending messages to Slack from the interface table in this data source” option.

Create data source in SQLMessenger

Create data source in SQLMessenger

Enable the “Allow sending messages to Slack from the interface table in this data source” option

Enable the “Allow sending messages to Slack from the interface table in this data source” option

Step 3: Send messages with SQL statements.

To send a message, simply insert a row into sqlmessenger_intf.

Example: Send a message to Slack user ID U015NGUUGQ0 using Slack app MySlackApp:

INSERT INTO sqlmessenger_intf
            (oper_type,
             slack_app_name,
             send_to,
             body)
VALUES      ('S',-- Operation type: 'S' indicates sending message via Slack API
             'MySlackApp',-- Name of your configured Slack app
             'U015NGUUGQ0',
             -- Slack member ID (use commas to separate multiple recipients)
             'This is a test message' -- Message content to be delivered
); 

Parameter Descriptions:

oper_type

Always use 'S' for sending messages to Slack via API.

slack_app_name

The name of your configured Slack application in SQLMessenger.

send_to

Recipient's Slack member ID (supports multiple recipients separated by commas).

body

The message content to be delivered to Slack members.

3. Technical Support

If you run into any issues while using SQLTelebot, feel free to contact us for technical support.

More Use Cases

SQLMessenger can also be used to automate a variety of tasks. Here are some examples:

From Manual to Automated: Improving Report Workflow with SQLMessenger

From Hours of Manual Work to One-Click Reports

Automating Data Workflows with SQLMessenger

From 90 Minutes of Manual Work to One Click: How SQLMessenger Transformed Employee’s Workflow

Automated Email List Cleanup with SQLMessenger and Gemini AI

Transforming Manual Alert Management into an Automated Workflow

Using External Interface, DataSource Management, Sending Messages to Slack Workspace Members via Slack API

Last updated on November 30, 2025


Cookie Settings

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies in accordance with our Cookie Policy.

You can change your preferences at any time by clicking on "Cookie Settings" in the website footer.

Cookie Preferences

Manage your cookie preferences. You can enable or disable different types of cookies below. Necessary cookies cannot be disabled as they are required for the website to function properly.

Necessary Cookies

Always active

These cookies are essential for the website to function and cannot be switched off. They are usually only set in response to actions made by you such as setting your privacy preferences, logging in or filling in forms.

Preferences Cookies

Makes the site easier to use

These cookies allow the website to remember choices you make and provide enhanced, more personal features.

Analytics Cookies

Helps us improve our website

These cookies help us understand how visitors interact with our website, which helps us improve our products and services.

Marketing Cookies

Used to track visitors across websites

These cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging.