shoutrrr icon indicating copy to clipboard operation
shoutrrr copied to clipboard

Add support for Apprise

Open PiDroid-B opened this issue 4 years ago • 5 comments

Hello,

I use Watchtower and i like this amazing project !

To improve the management of migrations, i use Apprise as a "notification broker" then i can change all the end points at the same place (i.e. : migration of mattermost, add discord channel etc... without change it on each services).

I search about integration of Apprise in Watchtower and/or Shoutrrr and found this : https://github.com/containrrr/shoutrrr/issues/59

i like a lot if i can use Apprise as like as i can use Discord or Mattermost (or everything else in this page : https://containrrr.dev/shoutrrr/v0.5/services/overview/ )

There is a futur integration of Apprise with Shoutrrr ?

Thank's a lot !

PiDroid-B avatar Apr 02 '22 16:04 PiDroid-B

Yeah, we should probably add an apprise provider that puts the content in the body field. You can already do it by using the generic service, but you would have to make a custom template payload, which makes it a lot harder to use.

piksel avatar Apr 08 '22 14:04 piksel

Has there been any more thought in this? Or any guides on how to achieve it using the generic method?

RichyHBM avatar Feb 13 '23 18:02 RichyHBM

@RichyHBM No, not really. I have not had the time to look into it, my statement above is just from a technical stand, it should be possible to do using a custom template, but it would require some trial and error. You would need to create a custom template that matches the apprise JSON body, something like:

{
   "urls": {"pbul://apikey, mailto://user:[email protected]"},
   "title": {"{{ .Title }}"},
   "body": {"{{range .Entries -}}{{.Message}}{{\"\n\"}}{{- end -}}"},
   "type": {"info"},
}

and using the shoutrrr URL: generic://apprise-api-hostname/notify/ (this is assuming you are using watchtower)

piksel avatar Feb 14 '23 07:02 piksel

Has there been any more thought in this? Or any guides on how to achieve it using the generic method?

Feel free to have a stab at it if you want! 👍🏼

simskij avatar Apr 29 '23 11:04 simskij