Send Microsoft Teams Notifications from Autonomous Database on Dedicated Exadata Infrastructure
DBMS_CLOUD_NOTIFICATION
package.- Prepare to Send Microsoft Teams Notifications from Autonomous Database
Get started by configuring a bot in your Microsoft Teams app. Next, create a credential to use with theDBMS_CLOUD_NOTIFICATION
procedures to send Microsoft Teams notifications from Autonomous Database. - Send Messages to a Microsoft Teams Channel
- Send Query Results to a Microsoft Teams Channel
Parent topic: Send Email and Notifications from Autonomous Database
Prepare to Send Microsoft Teams Notifications from Autonomous Database
Get started by configuring a bot in your Microsoft Teams app. Next, create a credential to use with the DBMS_CLOUD_NOTIFICATION
procedures to send Microsoft Teams notifications from Autonomous Database.
To configure Microsoft Teams notifications:
Send Messages to a Microsoft Teams Channel
DBMS_CLOUD_NOTIFICATION.SEND_MESSAGE
procedure to send a message to a Microsoft Teams channel.
Example:
BEGIN
DBMS_CLOUD_NOTIFICATION.SEND_MESSAGE
(
provider => 'msteams',
credential_name => 'TEAMS_CRED',
message => 'text from new teams api',
params => json_object('channel' value 'channelID'));
END;
/
Use the params
parameter to specify the channel.
-
channel: specifies the Channel ID obtained from Step 10 in Prepare to Send Microsoft Teams Notifications from Autonomous Database.
See SEND_MESSAGE Procedure for more information.
Send Query Results to a Microsoft Teams Channel
DBMS_CLOUD_NOTIFICATION.SEND_DATA
procedure to send the output of a query to a Microsoft Teams channel.
Example:
BEGIN
DBMS_CLOUD_NOTIFICATION.SEND_DATA
(provider => 'msteams',
credential_name => 'TEAMS_CRED',
query => 'SELECT tablespace_name FROM dba_tablespaces',
params => json_object('tenant'value '5b743bc******c0286',
'team'value '0ae401*********5d2bd',
'channel'value '19%3a94be023*****%40thread.tacv2',
'title'value 'today',
'type'value 'csv'));
END;
/
Use the params
parameter to specify the tenant, team, channel, title, and data type in string
values.
-
tenant: specifies the tenant ID obtained from Step 8 in Prepare to Send Microsoft Teams Notifications from Autonomous Database.
-
team: specifies the team ID obtained from Step 8 in Prepare to Send Microsoft Teams Notifications from Autonomous Database.
-
channel: specifies the channel ID obtained from Step 9 in Prepare to Send Microsoft Teams Notifications from Autonomous Database.
-
title: specifies the title of the file. The title can only contain alphabets, digits, underscores, and hyphens. The file name that appears in Microsoft Teams will be a concatenation of the title parameter and the timestamp to ensure uniqueness. The maximum title size is 50 characters.
For example:
'title'_'timestamp'.'format'
-
type: This specifies the output format. Valid values are CSV or JSON.
The maximum file size supported when using
DBMS_CLOUD_NOTIFICATION.SEND_DATA
for Microsoft Teams is 4MB.
See SEND_DATA Procedure for more information.