Skip to contents

This function sends a message to an Enterprise WeChat robot using the provided webhook URL.

Usage

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

Arguments

message

The message content to be sent.

include_timestamp

Logical indicating whether to include the current timestamp in the message. Default is FALSE.

at_mobiles

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

at_all

Logical indicating whether to mention all members. Default is FALSE.

Value

None

Examples

if (FALSE) {
options(webhook_wx = "https://qyapi.weixin.qq.com/robot/send?access_token=YOUR_ACCESS_TOKEN")
send_message_wx("Code execution completed.", include_timestamp = TRUE, at_mobiles = "1234567890")
send_message_wx("Code execution completed.", include_timestamp = TRUE, at_all = TRUE)
}