Receive notification of radarr and sonarr results

I would like to receive notifications related to radarr & sonarr results. I have successfully linked a webhook, and can receive bare notifications.

However, I’m at a loss figuring out how to place the actual radar/sonarr results into the Message. With the help of the guys on Discord, I’ve tried adding the below ({{ trigger.data }}), but this does not present the result. A result would be a title grabbed, or moved, etc.

How do I structure Message so that it presents these results?

alias: Testing Webhooks
description: ''
trigger:
  - platform: webhook
    webhook_id: m
action:
  - service: notify.mobile_app_sas22
    data:
      message: '{{ trigger.data }}'
mode: single

If I have my webhook and Automation as below, I receive the proper notification.
I’m basically trying to figure out how to dynamically add the result coming from radarr/sonarr to the Message field.

Webhook:

http://10.9.8.22:8123/api/webhook/r-health

Automation:

- id: '165016819312456'
  alias: Radarr - Health Issue
  description: ''
  trigger:
  - platform: webhook
    webhook_id: r-health
  action:
  - service: notify.mobile_app_sas22
    data:
      title: Radarr
      message: Health Issue

Hi, I am wondering if you found a solution and also, if possible, if you could explain how you initially setup the webhooks from radarr (how you established the conenction with HA, etc).

No solution yet, for a dynamic option. I’m certain it’s simply a matter of code structure.

In radarr/sonarr, I believe it’s under Connections. Copy the link I have above, change your IP, port, and the attribute. Copy the Automation for your own use.

alias: notification - radarr
description: ""
trigger:
  - platform: webhook
    webhook_id: radarr1
condition: []
action:
  - service: notify.mobile_app_gm1917
    data:
      message: 🍿{{trigger['json']['movie']['title']}}🍿
      title: New Movie!!
mode: single

This is how it works for me. Just add “{{trigger[‘json’][‘movie’][‘title’]}}” , this gives the title of the movie, but you can just change the value ‘title’ with what you want to know from radarr or sonarr. When using sonarr you also need to change ‘movie’ in ‘series’.
Hope tis helps.

2 Likes

I kind of want to do the same, show some latest add thumbnails. I truly want to interact with it more though. I would like to add and play on selected device. Anyone get any further on this? A google search shows a guy make it add movies via voice which is kind of cool, but not exactly what im looking for.

I was to the point to where I wanted to write HTML and interact with it that way. The issue there is I cannot easily get my cards out of lovelace to a HTML page. That gives me an idea though. I could write something and put it in an iFrame. :slight_smile:

How would you go about this if you wanted an Alexa device to read out loud whats been added?

I tried using this method for even just a text method but I get nothing.
But ultimately I’m trying to get this to announce when sonarr/radar find a new episode/movie and just list the title of the series/movie.

Could Voice monkey be useful for this?

Have you added the Alexa Integration? I believe you could modify the Automation above and direct the output to Alexa.

https://www.home-assistant.io/integrations/alexa/

Thanks for the amazing post ! For those of you wondering how to find the names of all the particular properties available for notifications, just send the code below once to your mobile device and it will list out all the options in the .json. You can do this though the ‘test’ function in Sonarr or Radarr :slight_smile: Hope this helps :smiley:

alias: notification - radarr
description: ""
trigger:
  - platform: webhook
    webhook_id: radarr1
condition: []
action:
  - service: notify.mobile_app_gm1917
    data:
      message: 🍿{{trigger['json']}}🍿
      title: Give me your properties !
mode: single

I used this method to also resolve the code for Lidarr :slight_smile:

service: notify.mobile_app_gm1917
data:
  message: 🎵 {{trigger['json']['artist']['name']}}
  title: New Artist

Hi
Cool , will try this too !
Thank you so much for this !