Skip to main content
Version: v6.5.0

Send a message to the group

Command Description

Send text messages, pictures, files, and other messages to the group you previously joined

Command Prototype

DingTalk.SendToGroup(DingTalk_obj, group, message)

Command parameter

parametermandatorytypedefault valueInstructions
DingTalk_objTrueexpressionDingTalkObjectThe DingTalk object created using the DingTalk. Create command
groupTruestring""The ID of the group that was previously pulled using DingTalk. Create Group. Please note that messages can only be sent to the group you pulled, and cannot be sent to other groups
messageTruestring""Specify the message to be sent, which can be a string representing the sending of a regular message, with a maximum length of 2048 bytes; It can also be images, files, and other messages created previously using commands such as DingTalk. CreateImageMessage and DingTalk. CreateFileMessage

Return result

Run instance

/********************************* Send Message to Group **************************************
Command Prototype:
DingTalk.SendToGroup(DingTalk_obj, group, message)
Input Parameters:
DingTalk_obj -- DingTalk object. Note: DingTalk object created using the DingTalk.Create command.
group -- Group ID. Note: The ID of the group previously created using DingTalk.CreateGroup. Note: You can only send messages to groups you created, not to other groups.
message -- Message to send. Note: Specify the message to be sent. Can be a string representing regular message (maximum 2048 bytes), or can be image/file messages previously created using DingTalk.CreateImageMessage, DingTalk.CreateFileMessage commands.
Output Parameters:
None
Important Notes:
None
********************************************************************************/
DingTalk.SendToGroup(DingTalkObject, "", "")