Issue
This article explains how to insert a message into a Connect Chat or Connect Support conversation using Connect Action.
There might be business requirements where predefined messages need to be inserted in the chat by clicking a connect action.
Release
Any release supporting Connect Support plugin
Cause
The suggested script below can be added into a Connect Action and it will result in the message displaying in the Connect conversation both for the Agent and End User
var id = sn_connect.Conversation.get(conversation.sys_id);
id.sendMessage({body:"MESSAGE HERE",field:'comments'});
Related Links
For more details, refer to the below API
https://developer.servicenow.com/app.do#!/api_doc?v=london&id=conversation-sendMessage_String_String