# Subscribe for e-mails on certain application logs

**URL:** <https://community.novulo.com/t/subscribe-for-e-mails-on-certain-application-logs/736>\
**Category:** \[Q&A\] General\
**Created:** [June 3, 2025, 3:41pm UTC](https://community.novulo.com/t/subscribe-for-e-mails-on-certain-application-logs/736 "2025-06-03T15:41:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hans\_van\_uden](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@hans\_van\_uden](https://community.novulo.com/u/hans_van_uden)\
**Post date:** [June 3, 2025, 3:41pm UTC](https://community.novulo.com/t/subscribe-for-e-mails-on-certain-application-logs/736/1 "2025-06-03T15:41:21Z")

</div>

To configure sending of emails from the application log you need component 6704 in your composition.

First of all you define your mail subscription via General Settings - Mail subscriptions

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/d/d8b74029b8b2221531d7cea60038d48267338f01.png)  
In my example I want to be informed about PrintNode errors  
 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/a/a9640da2335fba3aa93d477b60987a9babf02ec9.png)

It is important that for you as a subscriber there is an email address defined in your connection information

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/1/1419e91b41e697cb1f838a5c3b6a61b952412de1.png)  
Next step is to define one or more mail subscription data sources  
Fill in the correct data source (that is used in the application log entries)  
The from level and higher  
The activity template  
And the aggregate for number of hours  
 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/5/547e59ea4fa59f07a1e51d470e4156db3afd2f04.png)  
An example of the activity template to use  
 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/8/862a4a18e7f994abc6365a63026e936717c8e0d0.png)  
An example of the export definition  
 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/f/fdc0fc5a6ee9ea8e2408fadc72d31e5614099054.png)  
Another important setting is General settings - Mail subscription settings  
 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/7/7e07fca8e8adbd7591122ca676ea6b93136a55ea.png)

In the mail subscription you can force sending of the e-mail by using the button ‘send mail now’  
In the list of activities (Overviews - Activities) you can find your e-mail

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/3/3ca02e72d6207f2f5dac352c60a42caac380cb9b.png)  
And view the details sent by e-mail  
 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/d/dfbad21e7d20f97d0d473e7c18bc638164b39ca7.png)

**Some extra information not mentioned yet**  
For the data source (AX Import in this example) it is important that it is ‘Active’ and that ‘Application log subscritions’ is set to Yes (only visible in change mode)

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/e/e57372f9cc2ad89acba5f01524af8b46fbc6e13a.png)

You need to have an ‘Activity template’ configured.  
This activity template should have the setting Application - Mail subscription=yes)  
It is important that Activity content is correct

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/f/f0469538633530642bfb50ce44c4d82f4a9f8715.png)

This is the source code

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/4/4ffd33e2dd04d3db4414300404d08186fa5d47f5.png)

Applicatielogs van %datetime% o.b.v. mailabonnementen

| %applicationlogs% **Log id** | **Data source** | **Created at** | **Scheduled task** | **Log message** |
| %rows%[%logid%](https://vds93.novulo.com/development/default.aspx?log=%logid%) | %data\_source% | %logdate% | %scheduled\_task% | %message% |

&nbsp;

The fields between %% in the Activity content should be defined in the Export definition (Activiteit applicationlogs)

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/0/0726d391c6f8456c80f6fbdffc9a0d4b1831fc49.png)

It consists of 2 export datasets  
1st: Activities

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/1/1c7dcdca19bd9c2958ebcb619bf4554ecb1bc5eb.png)

2nd Application logs  
With the correct filter expression

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/9/9d1678b74d419fe9e34f6c1a5a78643ab9298e74.png)

boolean:and([  
this.id.isgreater(int:max({applicationlogs,this.id}).sub(10000)),  
this.data\_source.in({  
applicationlogsubscriptiondatasources,  
this.data\_source,  
boolean:and([  
this.mail\_subscription.equals(parent.parent.application\_log\_subscription),  
this.is\_active.equals(yesno:load(1)),  
this.is\_for\_apllication\_log.equals(yesno:load(1)),  
this.has\_application\_logs().equals(yesno:load(1))  
])  
}),  
this.createdat.isgreaterequal(  
datetime:first({  
applicationlogsubscriptiondatasources,  
this.last\_activity\_date\_time(),  
boolean:and([  
this.data\_source.equals(parent.data\_source),  
this.mail\_subscription.equals(parent.parent.application\_log\_subscription)  
])  
}).expressiontoolsifnull(datetime:now())  
),  
this.log\_type.id.islowerequal(  
int:first({  
applicationlogsubscriptiondatasources,  
this.from\_level\_and\_higher.id,  
this.mail\_subscription.equals(parent.parent.application\_log\_subscription)  
})  
)  
])

Explanation  
Only the last 10000 lines of the applicationlogs  
With the datasource (AX import) Defined in the applicationlogsubscriptiondatasource (mail subscription source) from the applicationlogsubscription (mailsubscription)  
For which the createdat is greater than last\_activity\_date\_time  
And with the desired severity level

It needs the following export data fields

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/3/3175711bc8c1ce3a6673db820221b4c0f94c03a2.png)

In order to let this proces be called from the schedular add the following proces to the schedular  
’Application log - send to subscribers’. This proces has one input parameter, the id of the mail subscrition

---

<div class="post-metadata">

**Author:** ![heppener\_anker](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@heppener\_anker](https://community.novulo.com/u/heppener_anker)\
**Post date:** [September 15, 2025, 12:13pm UTC](https://community.novulo.com/t/subscribe-for-e-mails-on-certain-application-logs/736/3 "2025-09-15T12:13:13Z")

</div>

Hi Hans,

What is best-practice for having multiple mail subscriptions for different contacts and data sources? Say I want to send the printNode data source errors to person A and the financial data source errors to person B do I then make multiple mail subscriptions and multiple activity templates?

I tried this but I can only find one created activity template in this dropdown:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/7/7d4dbf8ff2705679c41f29c7f1ab979efb708c8e.png)

even though I have multiple templates with check set on ‘is for mail subscription’.

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/8/8be3337214abc2d23f82b8375583a6095a927a8e.png)

I have also tried to make multiple mail subscriptions attached to the same template but then it will only trigger on one data source. I am probably missing something, but don’t know what.

Kind regards,

Timothy

---

<div class="post-metadata">

**Author:** ![hans\_van\_uden](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@hans\_van\_uden](https://community.novulo.com/u/hans_van_uden)\
**Post date:** [September 15, 2025, 3:29pm UTC](https://community.novulo.com/t/subscribe-for-e-mails-on-certain-application-logs/736/4 "2025-09-15T15:29:06Z")

</div>

There is a problem in definiing multiple templates. I didn’t succeed myself either in selecting a copy of the activity template..  
I asked the developer of this component for a solution.

So the only possibility by now seems to define another subscription with a different subscriber  
And to define the financial application logs as the mail subscription data source.  
By using the same activity template for e-mailing the results

---

<div class="post-metadata">

**Author:** ![heppener\_anker](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@heppener\_anker](https://community.novulo.com/u/heppener_anker)\
**Post date:** [September 16, 2025, 9:37am UTC](https://community.novulo.com/t/subscribe-for-e-mails-on-certain-application-logs/736/5 "2025-09-16T09:37:20Z")

</div>

Thanks! For now I will try it that way then!
