I've been using the Office 365 Alerts from the Security and Protection to keep tabs on mass downloading and deletion of files throughout Sharepoint. However, I was wondering if it's possible to limit the scope of an alert to just a single document library. For example, I might want to keep track of external sharing in a higher security document library housed on a Sharepoint site with other document libraries that have files that are safe for sharing. I know it's possible to limit alerts to a single site by adding in "tenant.sharepoint.com/site/sitename*" as a condition, but "tenant.sharepoint.com/site/sitename/documentlibrary*" doesn't seem to work. Is what I'm asking possible at all, or is there some alternative I'm not thinking of?
Per my knowledge, it will be a bit hard to create a sharing notification sending email in a library.
Here is a thread you can have look at :Run SharePoint Workflow when document is shared
As a workaround, you can search the audit log for sharing activities in certain library and export the report for all concerning user activities. Please have a check on this doc for sharing auditing in the Office 365 audit log.