Skip to main content
Version: Latest

External

With external filters you can run scripts and webhooks to do your own custom filtering. If Expected exit status matches it will continue. If not it stops there.

Many of the fields have support for macros, which allow you to enhance your workflow significantly by providing custom logic/data processing to the input data provided by autobrr.

We have a separate repo for community scripts created by our users. https://github.com/autobrr/community-scripts

Script

Run external script that does something. Use exit codes correctly, like exit 0 for no issues. In Linux, non-zero exit codes are considered not-ok/error etc.

External filters run after the filter's own checks have passed, so your script only sees releases that already matched:

Filterall checks passed ✓EXTERNAL · SCRIPT/scripts/check-space.shargs: {{ .TorrentName }}exit 0exit 1Continue ✓runs the filter's actionsRejected ✗unexpected exit status

See stop if disk is full for a good example of what it can do.

FieldDescriptionExamples
CommandCommand, full pathe.g. /usr/bin/myprogram
ArgumentsArguments.e.g. --name {{ .TorrentName }} --file {{ .TorrentPathName }}
Expected exit statusExpected exit status.e.g. 0

Webhook

Send a payload to some custom API and do more processing. Use status codes to trigger different behaviours.

A real-world example is cross-seeding with qui, where the API's status code decides between cross-seeding now, retrying later, or rejecting:

Filterall checks passed ✓EXTERNAL · WEBHOOKPOST /api/cross-seed/webhook/checkqui · X-API-Key200202404Cross-seed ✓action sends to qui applyStill downloadingautobrr retries laterNo match ✗release rejected
FieldDescriptionExamples
EndpointURL of your API.e.g. http://127.0.0.1:5000/api/filter
HTTP methodRequest method. Defaults to POST when not set.e.g. POST
HTTP Request HeadersCustom headers as KEY=value pairs, separated by ;.e.g. X-Api-Key=mykey;Authorization=Bearer token
DataJSON payload. Sent with Content-Type: application/json.e.g. { "name": "{{ .TorrentName }}" }
Expected HTTP status codeStatus code that counts as a pass.e.g. 200
Retry http status code(s)Status codes that trigger a retry, comma separated.e.g. 500,502
Maximum retry attemptsHow many times to try the request in total.e.g. 3
Retry delay in secondsWait time between attempts.e.g. 5

On Error

Each external filter has an On Error setting that controls what happens when the script or webhook itself fails (for example a connection error):

  • Reject: the release is rejected (default behavior).
  • Continue to next: the failed external filter is skipped and filtering continues with the next check.