% if notifier: <% import json from plexpy import notifiers, users from plexpy.helpers import checked available_notification_actions = notifiers.available_notification_actions(agent_id=notifier['agent_id']) user_emails = [{'user': u['friendly_name'] or u['username'], 'email': u['email']} for u in users.Users().get_users() if u['email']] sorted(user_emails, key=lambda u: u['user']) %>

#### ${notifier['agent_label']} Settings (Notifier ID: ${notifier['id']})

% for item in notifier['config_options']: % if item['input_type'] == 'help':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'text' or item['input_type'] == 'password':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'number':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'button':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'checkbox':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'select':
${item['label']}

${item['description'] | n}

% elif item['input_type'] == 'selectize':
${item['label']}

${item['description'] | n}

% endif % endfor
Description

Optional: Enter a description to help identify this agent in the notification agents list.

Notification Triggers

Select items that will trigger a notification for this ${notifier['agent_label']} notification agent.

% for action in available_notification_actions:
${action['label']}

${action['description'] | n}

% endfor
Notification Conditions

Add custom conditions to only allow certain notifications. By default, all notifications will be sent if there are no conditions. Click here for a description of all the parameters.

Condition Logic

Optional: Enter custom logic to use when evaluating the conditions (e.g. {1} and ({2} or {3})). Leave blank for implicit and between all conditions.

Note: Only the keywords and/or and brackets () are supported. For order of operations, and is evaluated before or.

Notification Text

% if notifier['agent_name'] == 'scripts': Set the custom arguments passed to the script for each type of notification. % elif notifier['agent_name'] == 'webhook': Set the custom JSON data sent to the webhook for each type of notification. % else: Set the custom formatted text for each type of notification. % endif Click here for a list of available parameters which can be used.

You can also add text modifiers to change the case or slice parameters with a list of items. Click here to view usage information.

You can also add tags to exclude certain text depending on the media type. Click here to view usage information.

% if notifier['agent_name'] == 'scripts': % for action in available_notification_actions:
- ${action['label']}
  - Script Arguments

    Set custom arguments passed to the script.

% endfor % elif notifier['agent_name'] == 'webhook': % for action in available_notification_actions:
- ${action['label']}
  - JSON Headers ${notifier['notify_text'][action['name']]['subject']}

    Set custom JSON headers.

    JSON Data ${notifier['notify_text'][action['name']]['body']}

    Set custom JSON data.

% endfor % else: % for action in available_notification_actions:
- ${action['label']}
  - Subject Line

    Set a custom subject line.

    Message Body ${notifier['notify_text'][action['name']]['body']}

    Set a custom body.

% endfor % endif

Test Notifications

Test if ${notifier['agent_label']} notifications are working. Check the logs for troubleshooting.

Note: Test with the real values since parameters will not be substituted. (i.e. Use "Game of Thrones" not {title})

% if notifier['agent_name'] == 'scripts':
Script

Choose the script to test.

Script Arguments

Set custom arguments passed to the script.

% elif notifier['agent_name'] == 'webhook':
JSON Headers

Set custom JSON headers sent to the webhook.

JSON Data

Set custom JSON data sent to the webhook.

% else:
Subject Line

Set a custom subject line.

Message Body
Test Notification

Set a custom body.

% endif
% else:

#### Error

Failed to retrieve notifier configuration. Check the logs for more info.
% endif