Skip to contents

This function sends a message to a DingTalk robot using the provided webhook URL.

Usage

send_message_ding(
  message,
  include_timestamp = FALSE,
  at_mobiles = NULL,
  at_all = FALSE
)

Arguments

message

The message content to send.

include_timestamp

Whether to include the current timestamp in the message. Default is FALSE.

at_mobiles

A character vector of mobile numbers to mention in the message. Default is NULL.

at_all

Whether to mention all users in the message. Default is FALSE.

Examples

if (FALSE) {
options(webhook_ding = "https://oapi.dingtalk.com/robot/send?access_token=YOUR_ACCESS_TOKEN")
send_message_ding("Hello, World!")
send_message_ding("Code execution completed.", include_timestamp = TRUE,
 at_mobiles = c("1234567890", "0987654321"))
send_message_ding("Code execution completed.", include_timestamp = TRUE, at_all = TRUE)
}