//Carry out any custom action you wish for this event. Check out the snippets for reference or ideas.
def listenerName = "TaskCreated";
LOG.info("Running listener: ${listenerName}");
def channel = 'testing';
//Slack account code defined in Topology->Integration->Messaging
def account = 'SLACK';
//Create and post a FlexDeploy Slack Message object with interactive buttons to approve/reject
def message = SLACK.makeTaskCreatedMessage(EVENT.payload,true);
def tsId = SLACK.postMessage(account,channel,message);
LOG.setMessage('"Posted task ${EVENT.payload.taskId} to Slack'"); |