You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/smardigo/backup/script/create-teams-message.groovy

26 lines
868 B
Groovy

def smardigoUrl = "https://" + managementHostname + "/api/redirect/process/" + contextScopeId + "/dossier/simple-connect/" + contextProcessId
def message = [:]
message["@type"] = "MessageCard"
message["@context"] = "http://schema.org/extensions"
message["themeColor"] = "0076D7"
message["summary"] = "Neue Aufgabe: " + comment
def section = [:]
section["activityTitle"] = activityTitle
section["activitySubtitle"] = activitySubtitle
section["activityImage"] = "https://smardigo.de/wp-content/uploads/2020/01/smardigo-min.png"
message.sections = [section]
def potentialAction = []
def openInSmardigo = [:]
openInSmardigo["@type"] = "ViewAction"
openInSmardigo["@context"] = "http://schema.org"
openInSmardigo["name"] = "Vorgang öffnen"
openInSmardigo["target"] = [smardigoUrl]
potentialAction.add(openInSmardigo)
message.potentialAction = potentialAction
message