Gotify extras text/markdown #2022
chiragkrishna
started this conversation in
Notification Templates
Replies: 2 comments
-
Finallly was able to solve this using generic WATCHTOWER_NOTIFICATION_URL: "generic://gotifyURL/message?token=token"
WATCHTOWER_NOTIFICATION_REPORT: "true"
WATCHTOWER_NOTIFICATION_TEMPLATE: |
{{- if .Report }}
{{- with .Report }}
{{- if gt (len .Failed) 0 }}
{
"title": "❌ Watchtower BlackBox ❌",
"priority": 10,
"extras": {"client::display": {"contentType": "text/markdown"}},
"message": "--------------\n\n**Scanned:** {{len .Scanned}}/{{len .Scanned}}\n\n**Updated:** {{len .Updated}}{{- range .Updated }}\n\n - {{.Name}} ({{.ImageName}}){{- end }}\n\n**Skipped:** {{len .Skipped}}{{- range .Skipped }}\n\n - {{.Name}} ({{.ImageName}})\n\n**Reason:** {{.Error}}{{- end }}\n\n**Failed:** {{len .Failed}}{{- range .Failed }}\n\n - {{.Name}} ({{.ImageName}})\n\n**Reason:** {{.Error}}{{- end }}"
}
{{- else }}
{
"title": "✅ Watchtower BlackBox ✅",
"priority": 5,
"extras": {"client::display": {"contentType": "text/markdown"}},
"message": "--------------\n\n**Scanned:** {{len .Scanned}}/{{len .Scanned}}\n\n**Updated:** {{len .Updated}}{{- range .Updated }}\n\n - {{.Name}} ({{.ImageName}}){{- end }}\n\n**Skipped:** {{len .Skipped}}{{- range .Skipped }}\n\n - {{.Name}} ({{.ImageName}})\n\n**Reason:** {{.Error}}{{- end }}\n\n**Failed:** {{len .Failed}}{{- range .Failed }}\n\n - {{.Name}} ({{.ImageName}})\n\n**Reason:** {{.Error}}{{- end }}"
}
{{- end }}
{{- end }}
{{- end }} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I did, for example, it shows me an error when starting the container.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i am not able to figure out how to include the title, priority, extras, message and text/markdown properly
i know i can include the priority and title in url : gotify://gotify.com/token/?title=title&priority=priority
i am trying this template
i get this as notification
Beta Was this translation helpful? Give feedback.
All reactions