Email Notifications

When you want to send an email on job-event

Email Templates
Notification emails use HTML templates located in server/src/templates/:

  • approval.html - Approval request notifications
  • jobstatus.html - Job outcome notifications (success, failed, aborted, warning)
  • jobevent.html - Job lifecycle event notifications (launch, relaunch, delete, approve, reject)

    These templates can be customized by replacing them with your own versions.
    In Docker or Kubernetes deployments, mount your custom templates to /app/dist/src/templates/ to override the defaults.
    Example Docker mount: -v /path/to/custom/templates:/app/dist/src/templates/

Attributes

Attribute Comments
recipients
array / required

Recipients
email address

A list of email addresses who need to receive a notification

onStatus
array

Jobstatus event

A list of jobstatus events you want to send a notification on. Use any, if you always want a notification.
At least one of onStatus or onEvent must be specified for notifications to be sent.

Choices:
  • any
  • success
  • failed
  • aborted
  • warning
onEvent
array

Job trigger events

A list of job lifecycle events (triggers) you want to send a notification on.
Unlike onStatus which notifies on job outcomes, onEvent notifies on user actions and job lifecycle events.
Use any to be notified of all job events.

Choices:
  • any
  • launch
  • relaunch
  • delete
  • approve
  • reject

Examples

1) Send a notification on failed

notifications:
  recipients:
    - info@ansibleguy.com
  onStatus:
    - failed

2) Send notifications on job events (launch, relaunch, approve, reject)

notifications:
  recipients:
    - admin@ansibleguy.com
    - auditor@ansibleguy.com
  onEvent:
    - launch
    - relaunch
    - approve
    - reject

3) Send notifications on all events

notifications:
  recipients:
    - admin@ansibleguy.com
  onStatus:
    - any
  onEvent:
    - launch
    - relaunch
    - delete
    - approve
    - reject


Copyright © 2023-2026 AnsibleForms. All rights reserved.