On Import script not running

Sonarr version 4.0.15.2941:
OS Windows host - running in docker:

I’m trying to test a import script but I can’t get it to trigger.

Here is the connection setting in Sonarr - the test button says its successful.

Here is my script - simply prints out environment variables

#!/bin/bash

echo "Sonarr triggered a script!"
echo "Download ID: $sonarr_download_id"
echo "Event Type: $sonarr_eventtype"
echo "Series Title: $sonarr_series_title"
echo "Episode File Path: $sonarr_episodefile_path"
echo "Event type: $sonarr_eventtype"
exit 0

To attempt to test, I copied a flie I already have to a new folder. I then delete the file in my media directory and rescanned the series to get it removed.

Here are the sonarr logs for when I run the scan after deleting the file

2025-07-15 15:48:23.1|Info|RefreshSeriesService|Updating The 8 Show
2025-07-15 15:48:24.6|Info|RefreshEpisodeService|Starting episode info refresh for: [415307][The 8 Show]
2025-07-15 15:48:24.6|Info|RefreshEpisodeService|Finished episode refresh for series: [415307][The 8 Show].
2025-07-15 15:48:24.6|Info|DiskScanService|Scanning The 8 Show
2025-07-15 15:48:24.8|Info|DiskScanService|Completed scanning disk for The 8 Show
2025-07-15 15:48:24.8|Info|ExistingMetadataImporter|Found 0 existing metadata files
2025-07-15 15:48:24.8|Info|ExistingSubtitleImporter|Found 0 existing subtitle files
2025-07-15 15:48:24.8|Info|ExistingOtherExtraImporter|Found 0 existing other extra files
2025-07-15 15:48:24.8|Info|ExistingExtraFileService|Found 0 possible extra files, imported 0 files.

I then go to “wanted → missing” and press “manually import” and navigate to the new folder and choose interactive import and set the series. In the lower left of the UI I can see that it’s “processing” and then it completes.

After running the manual import there are absolutely zero new logs in sonnar.txt or in sonar.debug.txt to even indicate it was imported and the script does not run (that I can tell) as there are also no logs printed form the script.

Am I missing anything else I might need to do to get this triggered?

EDIT: My log level is set to “debug” in sonarr settings.

The issue was that I was simply looking at the wrong logs. The documentation to me read that the logs would show up in the debug log file, however, they actually appear in the trace log file but with a “debug” or “info” tag.

Debug logs do contain debug messages, as well as info, warnings, errors, etc, but glad you’ve got everything working.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.