Remind HR for employees on leave today

How to send an email to hr list of employee on leave today
Something like this

Employees on leave today:

  1. Employee one
  2. Employee two
  3. Ect…

Like birthday list in picture below

Hi @aqilmujahidiin ,

You can write a Code like this,

Call a function of send_email_to_hr() in hook.py on schedulers like daily.

Hope this helps You.

Thank You!

1 Like

Wow :astonished::astonished:

I am not a developer :pensive:

Can you give some screenshots where do i put this code please

Btw thanks for your reply :smiling_face:

Hi @aqilmujahidiin ,

If you are not a developer then lt’s little bit difficult for you because You have Create a one custom app for that and You have create a one file and put this cod in to that file and you have to call this file on a scheduler basis.

Second way is If You want to do from UI then Please go to server script then select a document select script type to scheduler event and in event frequency select daily and put this code in a script field.

I hope this will helps you.
Thanks You!

i get this error

image

Hi @aqilmujahidiin,

Adding the @Dhruvin-Bhaliya answer, In the server script side,
Some import packages and methods does not work.

So please create a custom app and then check it.

Reference Post: How to import python packages? - #2 by NCP

I hope this helps.

Thank You!