diff --git a/backend/open_webui/events.py b/backend/open_webui/events.py index 825e2a2304..b5373f386b 100644 --- a/backend/open_webui/events.py +++ b/backend/open_webui/events.py @@ -705,6 +705,7 @@ NOTIFICATION_EVENTS = ( EVENTS.CHANNEL_MESSAGE.name, EVENTS.CALENDAR_ALERT.name, EVENTS.RETRIEVAL_CONTENT_PROCESS_FAILED.name, + EVENTS.AUTOMATION_RUN_FAILED.name, ) diff --git a/backend/open_webui/utils/automations.py b/backend/open_webui/utils/automations.py index ce4c9af3ec..292e435083 100644 --- a/backend/open_webui/utils/automations.py +++ b/backend/open_webui/utils/automations.py @@ -384,7 +384,7 @@ async def execute_automation(app, automation: AutomationModel) -> None: EVENTS.AUTOMATION_RUN_FAILED, actor=user, subject_id=automation.id, - data={'name': automation.name, 'error': error}, + data={'name': automation.name, 'error': error, 'message': f'{automation.name}: {error}'}, ) return @@ -470,7 +470,7 @@ async def execute_automation(app, automation: AutomationModel) -> None: EVENTS.AUTOMATION_RUN_FAILED, actor=user, subject_id=automation.id, - data={'name': automation.name, 'error': error}, + data={'name': automation.name, 'error': error, 'message': f'{automation.name}: {error}'}, ) return @@ -559,7 +559,13 @@ async def execute_automation(app, automation: AutomationModel) -> None: app, EVENTS.AUTOMATION_RUN_FAILED, subject_id=automation.id, - data={'name': automation.name, 'error': error, **({'chat_id': chat.id} if chat else {})}, + data={ + 'name': automation.name, + 'error': error, + 'user_id': automation.user_id, + 'message': f'{automation.name}: {error}', + **({'chat_id': chat.id} if chat else {}), + }, ) if isinstance(e, asyncio.CancelledError): raise