Skip to end of banner
Go to start of banner

sendIntegrationMessage

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Description

Sends a message to integration such as Slack.

Parameters

Return Type

None

Example

JSlackAttachment att1;
att1.pretext = "Optional text that appears above the attachment block";
att1.title = "This is an example of attachment ...";
att1.text = "*Bold* ~strike~ text";
att1.color = "#4286f4";

JSlackAttachment att2;
att2.title = "This is an example of attachment with code.";
att2.text = "'var i = 0; doSomethingWith(i);'";
att2.color = "#f45641";

JSlackMessage message;
message.channel = "C94S1U658";
message.text = "Test slack message with attachment...";
message.attachments = {att1, att2};

return sendIntegrationMessage("SLACK", message);

See also

  • No labels