Skip to main content
AWX can send notifications about job status to various channels including email, Slack, webhooks, and more. Notifications help teams stay informed about automation activities and respond quickly to issues.

Understanding Notifications

The notification system consists of:
  • Notification Templates: Configured notification channels
  • Notification Triggers: When to send (start, success, error)
  • Notification Messages: Customizable content with job details
  • Notification Hierarchy: Inherited from organizations and projects

Notification Triggers

Started

Sent when job starts execution

Success

Sent when job completes successfully

Error/Failure

Sent when job fails or errors

Supported Notification Types

AWX supports these notification channels:
  • Email - SMTP email notifications
  • Slack - Slack channel messages
  • Mattermost - Mattermost webhooks
  • Rocket.Chat - Rocket.Chat webhooks
  • Pagerduty - Pagerduty incident creation
  • Twilio - SMS via Twilio
  • IRC - IRC channel messages
  • Webhook - Custom HTTP webhooks
  • Grafana - Grafana annotations

Creating Email Notifications

1

Create Email Notification Template

  1. Navigate to Notification Templates
  2. Click Add
  3. Enter details:
    • Name: Descriptive name
    • Organization: Optional organization
    • Type: Email
  4. Configure email settings:
    • Host: SMTP server hostname
    • Port: SMTP port (25, 465, 587)
    • Username: SMTP username
    • Password: SMTP password
    • Sender Email: From address
    • Recipients: Comma-separated email list
    • Use TLS: Enable for encrypted connection
  5. Click Save
2

Test the Notification

Send a test notification:
Or with Ansible:
3

Attach to Job Template

Slack Notifications

Integrate with Slack using bot tokens:

Setting up Slack

1

Create Slack App

  1. Go to https://api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Name your app (e.g., “AWX Notifications”)
2

Configure Bot Token

  1. Go to OAuth & Permissions
  2. Add Bot Token Scopes:
    • chat:write
    • chat:write.public
  3. Install app to workspace
  4. Copy Bot User OAuth Token
3

Configure AWX

Use the bot token in your notification template:

Webhook Notifications

Send custom HTTP webhooks:

Webhook Payload

AWX sends job details in JSON format:

Mattermost Notifications

Use incoming webhooks:

Mattermost Setup

  1. Go to Main Menu → Integrations → Incoming Webhooks
  2. Click Add Incoming Webhook
  3. Configure:
    • Display Name
    • Description
    • Channel (can be overridden in AWX)
  4. Copy the webhook URL

Pagerduty Integration

Create incidents in Pagerduty:

Pagerduty Setup

  1. In Pagerduty, create a new service
  2. Select Events API V2 integration
  3. Copy the Integration Key (use as service_key)
  4. Get API token from User Settings → API Access Keys

Custom Notification Messages

Customize notification content with Jinja2 templates:

Available Template Variables

Common variables for templates:

Notification Hierarchy

Notifications inherit from parent resources:

Job Template Notifications

Workflow Notifications

Example Hierarchy

Attaching Notifications

To Job Templates

To Projects

To Organizations

To Workflows

Notification Status

View notification history:
Notification statuses:
  • pending: Queued for sending
  • successful: Sent successfully
  • failed: Failed to send

Advanced Configurations

Multiple Recipients

Conditional Notifications

Use different notifications for different job templates:

Rate Limiting

AWX does not have built-in rate limiting for notifications. Consider:
  • External notification aggregation
  • Webhook endpoints that handle deduplication
  • Scheduled summary reports instead of per-job notifications

Troubleshooting

Check:
  • SMTP credentials are correct
  • SMTP port is accessible from AWX (telnet test)
  • TLS/SSL settings match server requirements
  • Firewall allows outbound SMTP
Test notification:
Verify:
  • Bot token is correct and starts with xoxb-
  • Bot has chat:write permission
  • Channel name includes # (e.g., #devops)
  • Bot is invited to private channels
Test with curl:
Debug:
  • Check webhook URL is accessible
  • Verify authentication headers
  • Review webhook endpoint logs
  • Test with curl:
Verify:
  • Notification template is attached to the resource
  • Correct trigger type (started/success/error)
  • Notification template is enabled
List attached notifications:

Best Practices

Use Hierarchy

Set organization-level notifications for common alerts, job-level for specific needs

Test First

Always test notification templates before attaching to production jobs

Customize Messages

Use custom messages to provide relevant context and actionable information

Monitor Delivery

Regularly check notification history to ensure delivery success

Job Templates

Create jobs that trigger notifications

Workflows

Configure notifications for workflows

Scheduling

Combine schedules with notifications for automated monitoring

Notification API

Complete API reference for notifications