A company’s main database has information about everything and everyone. Oracle already tracks orders, stock balances, payments, document statuses, exchange logs, service requests, and nightly job results. However, until someone opens a report or checks a log, this information remains trapped inside the database.
This raises a common practical question: how do you send a message from Oracle PL/SQL to a chat, messenger, or webhook so that people receive an alert instantly?
In this article, we will demonstrate this scenario using the MyChat corporate messenger as an example. The Oracle database generates a JSON string in PL/SQL, sends an HTTP POST request via UTL_HTTP, and MyChat displays the message to a user or in a conference. For an employee, this looks like a regular message in the corporate chat, whether on a computer or a smartphone. For an Oracle specialist, it’s just a small PL/SQL package, an ACL, and a REST API call. Incredibly compact and practical.
Why this is important, and not just for Oracle administrators
Alerts from a database aren’t just for beautiful integrations. They are necessary to ensure that critical events don’t get lost between reports, emails, and manual checks.
Examples from everyday corporate life:
- warehouse stock falls below the minimum limit;
- a customer’s order is stuck awaiting approval;
- an invoice payment is overdue;
- a nightly data import from an external system fails with an error;
- an Oracle maintenance job takes longer than usual;
- a high-priority service request is submitted;
- a document needs to be signed today, but the responsible person hasn’t logged into the system yet;
- an operation in the ERP, CRM, or e-commerce website returns an error.
In all of these cases, you could send an email. However, email inboxes often turn into graveyards of unread messages. Plus, there is always a chance of hitting the spam folder if you don’t control the recipient’s mail server. On the other hand, a short message in a workplace chat is usually noticed much faster, especially if it is directed not to everyone, but to the right conference or straight to the responsible person’s private dialogue.
The more complex and larger the system, the more vital real-time chat notifications become. It is incredibly frustrating to come to work on a Monday morning only to find out that a backup started on Friday night and failed halfway through because the disk ran out of space (a real-life case).
Why MyChat, and not Slack, Teams, or Telegram
When searching online for similar tasks, you will most often see queries like “Oracle PL/SQL Slack webhook”, “send Teams notification from Oracle”, “PL/SQL Telegram sendMessage”, or “UTL_HTTP webhook”. This is a well-known class of tasks: a database event is converted into an HTTP request, and a message appears on the other side.
However, corporate infrastructure has its own specifics. Not every company is willing to send order numbers, invoice amounts, customer names, inventory balances, or technical errors through a public, external service.
MyChat is perfect for this scenario because the messenger server is installed inside your own infrastructure. Messages remain within the corporate security perimeter, and notifications land exactly where employees are already working: private chats, the sales department, warehouse channels, technical rooms, or a shift support group. Not in someone else’s public cloud on the internet, but on your self-hosted server that you fully control. It can still be hosted in a cloud — it doesn’t have to be limited to a LAN, but it will be in your private cloud, under your control.
What does the notification look like to the user?
The user doesn’t see all this UTL_HTTP, JSON, and Oracle ACL details. They get a clear message:
Warehouse: the stock balance of the item "X-120 Cartridge" is below the minimum. Remaining: 4 units. Minimum: 10 units. Warehouse: Central, Main. Responsible: Purchasing Department.
Or this:
Finance: Invoice #INV-2026-01845 is 3 days overdue. Client: Stena LLC. Amount: 148,500. Manager: John Snow.
A good notification from Oracle Database to Messenger should answer four questions: what happened, where it happened, how important it is, and who should act.

Real cases for Oracle Database
Low stock levels
Oracle has a table of balances and minimum standards. DBMS_SCHEDULER runs a PL/SQL procedure once an hour that searches for items below the threshold. If the item is normal, a message is sent to the purchasing conference. If the item is critical, Oracle additionally sends a private message to the responsible manager.
Stuck customer order
An order has been created, the amount is large, but the “awaiting approval” status hasn’t changed for over two hours. A PL/SQL procedure sends a message to the sales manager with the order number, customer, amount, and the person responsible for approving it.
Nightly data exchange errors
Every night, the database receives data from the external system: prices, invoices, balances, and payments. If an exchange package fails, the MyChat technical conference receives a message: the task name, time, error code, and a link to the internal log.
Overdue payment
The financial module detects that an invoice is overdue. A private message is sent to the manager, and the supervisor only receives notice of major overdue payments above a specified threshold. This prevents the chat from becoming a cluttered mess, but critical payments remain visible.
Critical service request
A request with a “Critical” priority appears in the ticket table. Oracle sends a message to the on-call engineers’ conference: the ticket number, service location, city, client, and a brief description of the problem.
Oracle PL/SQL webhook: how it works
Technically, this is similar to a regular webhook, except that Oracle Database is the initiator. An event occurs in the database, PL/SQL generates JSON, and then an HTTP POST is performed to the MyChat REST API.
This example uses standard Oracle mechanisms:
- UTL_HTTP – sending an HTTP/HTTPS request from PL/SQL;
- JSON_OBJECT – neat JSON assembly without manual string concatenation;
- UTL_I18N.STRING_TO_RAW – sending the request body in UTF-8, so that it can be written in national languages, not just English;
- Oracle ACL – allowing a specific schema to connect to the MyChat Server host;
- DBMS_SCHEDULER – running regular checks and sending scheduled notifications.
Oracle sends JSON via the POST method to MyChat Server via its Integration API.
What can the package MYCHAT_API do?
In our example, we create a PL/SQL package called MYCHAT_API. It covers the two most common operations:
- sends a private message to a user;
- sends a message to a text conference.
Integration API key and the MyChat messenger server’s base URL are stored within a separate Oracle schema. The application’s worker schema can only grant execute permission to the package. This is more convenient than hardcodingthe API key across procedures, triggers, and jobs. The key rule is not to hardcode it. Settings should be in one place and easy to modify.
MyChat has two main entities: users and conferences. Each user has a unique number, a UIN. And each conference has a UID. These are convenient numeric identifiers that can be used as references. They can be viewed in the server Admin panel in the list of users and in the list of active conferences.
Example: send a private message from Oracle
After installing the package, you can run a query directly from SQL*Plus, SQL Developer, a PL/SQL procedure, or a job:
select dbms_lob.substr(
mychat_api.send_private_message(
p_user_to => '6',
p_msg => 'Test message from Oracle PL/SQL'
),
4000,
1
) as response
from dual;In a real scenario, instead of test text, data from tables is usually substituted:
Order #15842 has been awaiting approval for over two hours. Client: Stena LLC. Amount: 248,000.
Thus, Oracle can send a message from a procedure, job, or PL/SQL application package without a separate external service.
Example: send a message to a MyChat conference
If the notification is not for only one person, but for a department or duty group too, it’s more convenient to send it to a conference:
select dbms_lob.substr(
mychat_api.send_conference_message(
p_uid => 2,
p_msg => 'Test message from Oracle PL/SQL'
),
4000,
1
) as response
from dual;p_uid is the UID of a MyChat text conference. This format is suitable for warehouse notifications, technical errors, sales events, accounting, and on-call shifts.


Where is the best place to start sending?
There are three typical options.
Manual check from SQL*Plus or SQL Developer
This is a convenient way to make sure that Oracle sees MyChat Server, the ACL is configured, the Integration API key is correct, and Cyrillic text doesn’t turn into gibberish.
Call from an existing PL/SQL procedure
If a business event is already handled by a procedure, you can add a MYCHAT_API call next to the existing logic. For example, after changing the order status or after completing an exchange.
Regular task using DBMS_SCHEDULER
For most notifications, this is the safest option. Oracle selects events for which no notification has yet been sent, sends notifications to MyChat, and marks the records as processed.
Triggers are also possible, but they should be used with caution. An HTTP request within a trigger can slow down the transaction and tie the business operation to network availability. It’s often more reliable to write the event to a queue table and send it as a separate job.
Common technical problems: ACL, HTTPS, and encoding
When people search for Oracle ACL UTL_HTTP, they usually have already encountered an error like:
ORA-24247: network access denied by access control list
This means that Oracle does not allow the current schema network access to the required host. To send messages to MyChat, you need to grant the schema the right to connect via DBMS_NETWORK_ACL_ADMIN.
The second most common zone is HTTPS. UTL_HTTP can handle HTTPS, but some configurations may require an Oracle Wallet and certificates. For local tests, it’s easier to first test a regular GET/POST to the server, then deal with certificates, proxies, and security policies.
To check which protocol (HTTP or HTTPS) and port your MyChat Server is using — visit Admin panel.
The third issue is encoding. If the message contains UNICODE national characters, the JSON body must be sent in UTF-8. In our package, this is done via UTL_I18N.STRING_TO_RAW(…, ‘AL32UTF8’).
Why not just email?
Email remains a good channel for documents, reports, and long notifications. But for urgent events, it’s often too complicated.
Chat is better suited for quick attention: “balance below minimum”, “exchange rate dropped”, “order stuck”, “payment overdue”, “critical request created,” “scheduled task not completed.”
A message in MyChat can be immediately discussed with colleagues, forwarded to the responsible party, added to a conference call, or used as a conversation starter within the department.
How to avoid turning your chat into clutter
The main rule: send only what requires a response.
Bad notification:
The ORDERS table contains new orders.
Good notification:
Sales: Order #15842 has been pending approval for over two hours. Client: Stena LLC. Amount: 248,000. Responsible: John Snow.
It’s better to have fewer messages, but each one is relevant. Then employees will start trusting automatic notifications and won’t get annoyed. Instead, they’ll get used to the convenience and reliability.
What does the company gain from this?
Integrating Oracle with a corporate messenger provides quick results without much effort:
- responsible people learn about problems earlier;
- managers see frozen processes without manually checking reports;
- the warehouse responds to critical balances;
- technical support receives exchange errors immediately after a failure;
- internal data remains in the corporate infrastructure;
- the database becomes an active participant in the process, not a silent archive.
To put it simply: Oracle shouldn’t wait for people to come to it for information. If an event is important, Oracle can send a message directly to MyChat. Everyone wins — administrators, managers, and performers.
If you were searching for Slack, Teams, or Telegram
This article may also be useful for those who were looking for:
- Oracle send message to chat;
- PL/SQL send webhook notification;
- Oracle PL/SQL Slack webhook;
- Oracle PL/SQL Telegram sendMessage;
- Oracle send Teams notification;
- UTL_HTTP POST JSON example.
The overall architecture is similar: PL/SQL generates JSON and sends an HTTP request. MyChat main feature is that it’s a corporate messenger that can be hosted on your own server and used for internal notifications without an external SaaS. However, you can easily take the package from the link at the end of the article and customize it — the operating system logic will remain almost the same.
Short message templates
It’s better to start with two or three clear scenarios: low balances, exchange errors, and late payments. If these notifications help people work faster, it will become clear which events should be enabled next.
Warehouse
Warehouse: the balance of the item "{Item}" is below the minimum. Remaining: {Balance}, minimum: {Minimum}. Warehouse: {Warehouse}.
Finance
Finance: Account No. {Number} is overdue by {Days} d. Client: {Client}. Amount: {Amount}.
Technical support
Oracle: Job "{JobName}" completed with error {Code}. Time: {Time}. See the import log for details.
Sales
Sales: Order # {Number} has been pending approval for more than {Hours} hrs. Client: {Client}. Amount: {Amount}.
Download a ready-made package for DBA administrators
The MyChat Integration API allows you to send messages from Oracle PL/SQL to your corporate chat. For the user, this is a standard MyChat notification. For the developer or DBA, it’s a PL/SQL package, UTL_HTTP, JSON POST, and ACL.
Download mychat-oracle.zip (Readme, SQL scripts, and a CMD installer). The package was tested in SQL*Plus: Release 23.26.1.0.0 on Oracle AI Database 26ai Free Release.
This integration is useful not because the database “can write in chat,” but because important events begin to reach people on time.
Take it, try it, write your impressions and questions on MyChat official support forum.