***Disclaimer: This blog article covers functionality from a paid app that was published on Salesforce’s AppExchange by Adviceforce, LLC.
Salesforce’s Lightning Process Builder currently does not support Content Document objects (ContentDocument, ContentDocumentLink, etc.) if you wanted to execute some workflow actions once a file has been uploaded. I created an idea on the Idea Exchange for this a while back, however, there has not been much progress. Upvote the idea if you think this is a much needed feature.
If you can’t wait for this feature to get noticed by the Salesforce product team, my AppExchange app Enhanced Attachment might be a solution for your needs. The app supports both Salesforce Files and Notes & Attachments as the underlying storage object so you have the option of using the object you want. Check out my previous post about that feature. Unlike both objects, the Enhanced Attachment object can be used with workflow rules or process builder.
Since Enhanced Attachment records has assigned categories, you can create a process builder flow to execute when records of a specific category is created. For instance if you wanted to notify certain users that a Sales Contract has been uploaded to an opportunity you can create an email template, email alert, and process builder flow to accomplish this task. No code needed!
Here is a text email template we will use that will include the opportunity name, name of file, and who uploaded the document.
We will be using the email template with the following email alert.
To facilitate the detection of a sales contract being uploaded and sending out the notification a process builder flow will be used. Any Enhanced Attachment record with a category assigned as “Sales Contract” will trigger an immediate email alert to be sent out.
Using three simple steps we were able to send out an email alert using declarative options without any custom code with Enhanced Attachment. Email alerts for documents are not the only thing you can do with the app. Stay tuned as a cover more ideas soon by clicking on the follow button at the bottom and on twitter here or here!