One of the things I love about Sonarr is that everything just works. You add a TV show, it automatically downloads the latest season or episode, places it into the correct folder, and Plex picks it up and displays it in your library. Boom. Within just a couple minutes, the episode you requested can now be played on your TV!

However, one thing that has always bothered me is that Sonarr doesn’t “notify” you once an episode is grabbed or downloaded. This means I sort of have to babysit Sonarr or Nzbget to make sure it grabs the episode and starts downloading.

Earlier this week, I came across a great solution: Windows 10 Toast Notifications!

All credit for this goes to Fragande on Reddit for this solution. He posted a very basic writeup on Reddit and created the Powershell script, but I decided to write a step-by-step guide as I set mine up because there were a few steps missing that I had mess around with to get it working.


How does it work?

Basically, you install a Powershell module called BurntToast. This module allows you to create custom desktop notifications on your Windows 10 computer.

For those of you who haven’t heard the term toast notification, it’s the alerts that popup in the bottom righthand corner of your screen:

Once BurntToast is installed, you will add a Custom Post Processing Script in your Sonarr settings. This is where you’ll point to the Powershell script Fragande created.

In the my example, I’m downloading Season 1 Episode 1 of Ozark. The beauty of this is that you no longer need to keep checking on the episode status; you can close the webui and keep working on other things.

Here’s what the “toast notifications” for that look like for Grabbed and Downloaded:

If this is something you want to configure, follow the steps below.


Prerequisities

  • Windows 10 computer
  • .Net 3.5 or later installed
  • Powershell v5.1 or later

Step 1: Install Burnt Toast Module

Before you begin, make sure you have .Net 3.5 and Powershell installed.

Open Powershell and type $PsVersionTable to find what version of Powershell you are on.


Option 1: Powershell Gallery Install

If on version 5.1, You can either install BurntToast by entering Install-Module -Name BurntToast, or manually below.


Option 2: Manual Install

Download BurntToast.zip. Right-click the .zip file > Properties > Unblock File.

Next, right-click the zip file > Extract All > Extract the contents to C:\users\USERNAME\Documents\WindowsPowerShell\modules\BurntToast . If the directories don’t already exist, create them.

If using Powershell 6 or later, extract into C:\users\USERNAME\Documents\PowerShell\Modules\BurntToast instead.


Step 2: Open Powershell & Import Module

Next, open Powershell as Administrator.

Type Import-Module BurntToast. If you  receive an error regarding execution polices, disable it by entering this command first: Set-ExecutionPolicy Unrestricted

Enter command Import-Module BurntToast again. This time it should be successful.


Step 3: Test BurntToast Notifications

To make sure BurntToast is installed correctly and ensure you receive Windows 10 Toast Notifications, type this code (change the text in parenthesis, if you want)

New-BurntToastNotification -Text "SmartHomePursuits Test Toast Notification"

You’ll know it’s working if you see your message popup.

If you don’t see any Powershell error messages but don’t see any toast notifications, check your Windows “Notifications and Action Settings.” If those were turned off, turn them on.


Step 4: Set Sonarr to Run in Tray Mode

Open Services.msc.

Search for the Sonarr service. Right-click > Properties > switch to the Log On tab.

If it’s set to This Account, change it Local System Account. Check the box for Allow Service to interact with desktop. Click OK once complete.


Step 5: Restart Sonarr Service & Kill Sonarr Process

Stop and Start the Sonarr process in Services.msc.

If the Sonarr.exe process is still running in Task Manager, kill it there too:

Now, relaunch Sonarr. You should now see Sonarr running in your system tray:


Step 6: Download Powershell Script for Sonarr

Next, download the Sonarr toast notification Powershell script from Github by clicking Download Zip.

Extract the script to any location. I have a C:\users\USERNAME\Documents\Scripts folder already, so I’m going to extract it there.

Right-click the script > Properties > Unblock just like you did in step 1.


Step 7: Create Batch file for Sonarr

In the Sonarr Custom Post Processing settings, you can’t point to .ps1 powershell file directly (at least in V3, not sure about V2) or you’ll receive an error that says the executable type is invalid:

So, we are going to create a simple batch file that launches the Powershell script instead.

In the same location you extracted the .ps1 file to in Step 6, right click the empty space > New > Text Document. Name it SonarrNotification.bat.

Right click the .bat file > Edit and enter this command. Change the path to the location of your .ps1 file and save,

powershell.exe -ExecutionPolicy Bypass -Command "C:\Users\USERNAME\Documents\Scripts\burnttoast_sonarr.ps1"


Step 8: Add Batch File Path to Sonarr

Launch Sonarr’s webui by entering localhost:8989 into a web browser.

Navigate to Settings > Connect.

Click the + button and then locate Custom Script.

Give your script a name like Sonarr Toast Notifications. You can choose the alerts you want to receive, such as:

  • On Grab
  • On Import
  • On Upgrade
  • On Rename

Then, enter the path of your batch file: C:\users\USERNAME\Documents\Scripts\SonarrNotification.bat.

Note: Sonarr v3 doesn’t support arguments, so just point to the batch file itself in the PATH field.


Testing Connection

Click Test to see if everything is working correctly.

If it does, you’ll see a “Test” toast notification popup instantly. This is good news; this means that Sonarr is correctly processing the script.


Step 9: Download A TV Episode to Test

Now that everything is set up, it’s time to test the final step: Downloading a TV episode!

Pick any missing episode or add a new TV show to Sonarr. If all goes well, you should see a notification like this:


Radarr Toast Notifications for Windows 10

If you’d like to setup toast notifications for Radarr, you can do that as well! Basically all you’d have to do is create a 2nd powershell script (with slightly different code to match the Radarr environment variables), and then add the Script to Radarr > Connect > Custom.

The example Radarr notification script I created is below:

Import-Module BurntToast
$eventtype = $env:radarr_eventtype
$movie_title = $env:radarr_movie_title
$releasedyear = $env:radarr_movie_year
$movie_quality = $env:radarr_release_quality
$applogo = "C:\users\USERNAME\pictures\radarr_logo.png" #Path to Radarr logo image

If ($eventtype -eq "Test") {

New-BurntToastNotification -AppLogo $applogo -Text $eventtype, "Radarr test notification."

}

Elseif ($eventtype -eq "Grab") {

New-BurntToastNotification -AppLogo $applogo  -Text " Grabbed: $movie_title", $releasedyear, $movie_quality

}

Elseif ($eventtype -eq "Download" -And $isupgrade -eq "False") {

New-BurntToastNotification -AppLogo $applogo  -Text "Downloaded: $movie_title", $releasedyear, $movie_quality

}

Elseif ($eventtype -eq "Download" -And $isupgrade -eq "True") {

New-BurntToastNotification -AppLogo $applogo  -Text "Upgraded: $movie_title", $releasedyear, $movie_quality

}
Else {}

Just create a new Powershell script, copy and paste the code above into it, and save it with a name like Radarr_ToastNotifications.ps1. Then, add the path of the script to your C:\Scripts folder.

The only things you have to change in the text above is the USERNAME and location of your Radarr logo. After it’s all set up, here is what it’ll look like with Radarr:


Wrapping Up

That’s it! Again, huge kudos to Fragande for coming up with this free, self-hosted solution.

There are of course a number of other ways get notifications using services like Pushover, Pushbullet, or Discord, but this solution works really well for Windows users and is really handy – especially if you tend to add shows from your computer instead of adding Sonarr TV shows remotely.

I don’t know if I necessary want to get more notifications on my phone, but I’ll set up and create a guide for mobile notifications soon (if I can figure out a way to get batches of notifications instead of alerts for every single episode.)

If you’d like customize your script even further, be sure to check out the full list of Sonarr’s environment variables.

Hopefully this guide helps you out, and feel free to share it!

Similar Posts

3 Comments

  1. Great tutorial… By why not just use prowl? Its been built into sonarr radarr lidarr since the beginning even tautualli has it…. No need to do anything just set the Prowl API inside of the connections tab of each one select what notifications you want each app has a ton to choose from and your on your way… mine goes to my cell phone so the moment a show or movie has been updated I know.. Especially great for movies since I have them tied to my IMDB and movies get set up months in advanced when ever I see a trailer and think one of my viewers or myself will enjoy that movie I like it on IMDB and blam 7 months later when its released I see it in my plex.

    Just found your site and read a few posts so far love alot of it but thought I would comment on this one as I think prowl is simpler if I have any other questions Ill reach out!

    Corbin

    1. Thank you! I’m glad you like my site.

      I mainly set this up because I didn’t want to be notified on my phone everytime something downloads. I primarily watch TV shows not movies, so on any given day I have a ton of new shows coming in and that would be a lot of phone notifications. I’ve heard of prowl, but I don’t think I ever looked into it before setting this up. I definitely will now though.

      It was also sort of a proof of concept, I just wanted to see if I could get it to work, haha.

  2. Dont get me wrong what you did here was amazing… Prowl works well for notifications and I only have mine turned on for certain things tv is not one of them for the sheer fact that someone requested greys anatomy…the entire series in the middle of the night and my phone went bezerk I like prowl with tautulli and radarr especially as I watch alot of movies so its nice to know when a new one has hit as far as tautulli it tells me when someone is buffering so I know if there is a problem on my side or theres as well as it tells me if my server is down for some reason or another.

Leave a Reply

Your email address will not be published. Required fields are marked *