<%! import json from plexpy import helpers, notifiers, users available_notification_actions = notifiers.available_notification_actions() 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']) %> % if notifier:

#### ${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']}
% if item['name'] == 'osx_notify_app': Register % endif

${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']} notifiation agent.

% for action in available_notification_actions:
Notify on ${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. % 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 % 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.

% else:
Subject Line

Set a custom subject line.

Message Body

Set a custom body.

% endif
% else:

#### Error

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