diff --git a/awx/api/serializers.py b/awx/api/serializers.py index 8842f7b98d..0493fbb1f6 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -4478,7 +4478,10 @@ class NotificationTemplateSerializer(BaseSerializer): body = messages[event].get('body', {}) if body: try: - potential_body = json.loads(body) + rendered_body = ( + sandbox.ImmutableSandboxedEnvironment(undefined=DescriptiveUndefined).from_string(body).render(JobNotificationMixin.context_stub()) + ) + potential_body = json.loads(rendered_body) if not isinstance(potential_body, dict): error_list.append( _("Webhook body for '{}' should be a json dictionary. Found type '{}'.".format(event, type(potential_body).__name__))