Can we update a field in CRM based on the name of document that is uploaded.

Can we update a field in CRM based on the name of document that is uploaded.
You can trigger a workflow or a Flow which can do that for you.
Refer here : https://vjcity.blogspot.com/2019/11/moving-attachments-of-dynamic-365-crm.html
The blog outlines a different operation, but you can customize it in your own way.