Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

Question : Is it possible to send LOG by email?

Hello,


 Sending LOG by email after process completion would be great, but how to do that please ?



Best Answer

Hello Vichid,


There are multiple ways to send the last exception by email, in case a process completed with an error.


First, we can set it up at the action level, if the action has an Error Handling tab. Here we can specify what the automation will do if an exception occurs when this specific action is executed. In our case, we can create a new function where we will use the action "Get Last Exception", use the action "Send Email" to send the last exception by email to our desired recipient and then specify to run this function in the action's Error Handling.


Second is the Exception Block. Using an exception block we can specify what the automation will do if an action, contained in the Exception Block, produces an exception. Same as before, we can specify to run a specific function if an action produces an exception within the Exception Block and in that function we can use the action "Get Last Exception" and send it by email.


Third is the Error Handling tab in the Process Properties option. Here we can choose to write the event to a text file and then we can choose to run another process which can simply grab that text file and send it by email.


Finally we can set the Error Handling behavior globally, by navigating to Options > Error Handling in the WinAutomation Console. Here the options are the same as in the third way, explained above.


If you wish to send an email even if the process completed successfully, then please note that there is no way to get the actual logs of the software and send them, so what we could do is create a new function which simply sends an email that the process completed successfully and have that function run in the end of the process.


I hope the above makes sense.


ADMIN
Answer

Hello Vichid,


There are multiple ways to send the last exception by email, in case a process completed with an error.


First, we can set it up at the action level, if the action has an Error Handling tab. Here we can specify what the automation will do if an exception occurs when this specific action is executed. In our case, we can create a new function where we will use the action "Get Last Exception", use the action "Send Email" to send the last exception by email to our desired recipient and then specify to run this function in the action's Error Handling.


Second is the Exception Block. Using an exception block we can specify what the automation will do if an action, contained in the Exception Block, produces an exception. Same as before, we can specify to run a specific function if an action produces an exception within the Exception Block and in that function we can use the action "Get Last Exception" and send it by email.


Third is the Error Handling tab in the Process Properties option. Here we can choose to write the event to a text file and then we can choose to run another process which can simply grab that text file and send it by email.


Finally we can set the Error Handling behavior globally, by navigating to Options > Error Handling in the WinAutomation Console. Here the options are the same as in the third way, explained above.


If you wish to send an email even if the process completed successfully, then please note that there is no way to get the actual logs of the software and send them, so what we could do is create a new function which simply sends an email that the process completed successfully and have that function run in the end of the process.


I hope the above makes sense.


1 person likes this

Hello George,


 Thx for your advices. These are exactly i am looking for.


Have a good day!

Login or Signup to post a comment