# Email Notification for audit log

**URL:** <https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018>\
**Category:** Ignition\
**Created:** [December 12, 2023, 8:14am UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018 "2023-12-12T08:14:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [December 12, 2023, 8:14am UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/1 "2023-12-12T08:14:33Z")

</div>

Hello Team,  
We have requirement for audit log with email alert.  
Could please help to let us know feasibility of send email notification to admin user once log created in audit log?

Thanks,  
Dhiraj Pawar

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 12, 2023, 12:02pm UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/2 "2023-12-12T12:02:08Z")

</div>

You would like to send an e-mail every time a record is added to the audit log table? I don't believe that there is a first-party way to do that. You would need to run a gateway timer script at a frequency that is acceptable to your usage and query the audit log for all the records that have happened since the last time the script ran, compile them into a dataset, convert them to Excel, and then email to the appropriate users.

There will be a TON of records in a busy system.

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [December 12, 2023, 12:29pm UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/3 "2023-12-12T12:29:26Z")

</div>

Hello bschroeder,  
Thanks for responding. But due to continuous execution of timer script it can affect the performance of server.  
I there is any another way to identify the new audit log added ?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 12, 2023, 1:13pm UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/4 "2023-12-12T13:13:26Z")

</div>

A 1000mS gateway script checking the last top 1 result compared to not equal to the last cached top 1 result is not going to bog down your server.

What it is going to do is seriously annoy your user base and potentially flood your ITs mailserver.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 12, 2023, 1:16pm UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/5 "2023-12-12T13:16:42Z")

</div>

This exactly. It's not getting the data, but the amount of emails that users will get.

---

<div class="post-metadata">

**Author:** ![DNice](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@DNice](https://forum.inductiveautomation.com/u/DNice)\
**Post date:** [December 12, 2023, 1:21pm UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/6 "2023-12-12T13:21:37Z")

</div>

My modest system is 1.5 years old and I have \>350k audit events recorded - I would NOT recommend sending an email everytime a record is added. Instead as Matrix\_Engineering suggested have a GW script that checks (even once a min would probably be fine I'd guess) for a very specific audit event that brings value to your team - like a specific role login or a specific tag write event. If one of those types of events is present then shoot an email out. I'd recommend starting with the least number of emails as possible to avoid "crying wolf" and then no one looks at the emails anymore (been there).

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 12, 2023, 2:42pm UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/7 "2023-12-12T14:42:03Z")

</div>

For what it's worth, this dubious requirement will be possible with the new event streams feature coming in 8.3, though all the required pieces may not be available in 8.3.0.

---

<div class="post-metadata">

**Author:** ![dhiraj.pawar](https://avatars.discourse-cdn.com/v4/letter/d/3ec8ea/32.png) [@dhiraj.pawar](https://forum.inductiveautomation.com/u/dhiraj.pawar)\
**Post date:** [December 14, 2023, 5:17am UTC](https://forum.inductiveautomation.com/t/email-notification-for-audit-log/83018/8 "2023-12-14T05:17:08Z")

</div>

Hello,  
Thanks all for the suggestion. We are not sending email for every new log created. We will identify specific log & send those only.

Thanks
