Performing a task when making changes

Hello everyone,

I have been using ERPNext for a month now and it is amazing. But now I want to perform some tasks at the backend whenever profile photo is changed or a new employee is created. How can I do that?
Can someone help me in this regard.

I tried making changes in this file “/apps/erpnext/erpnext/hr/doctype/employee/” but the changes were not reflected.

I am not sure if this will be helpful for you or not, try using Server Scripts.

Thanks @harshit-30
There is quite some limitations on the methods in server script. I am new to frappe framework. Can you tell me how I can send a request to another server from the server script.

For example if I want to send a request to then I simply do (‘’, data=payload) in python. How about here in server script? How can I do this here.

please let me know if you know a way to call external API. Thanks in advance

You might want to check out webhooks:

Always best not to directly edit the core files and try to customize either using in-app options like custom script and server script, or using a custom app to get the job done.