Auto-response of an Action

I would like to set up a system where the site automatically sends a notification email to all site members whenever a new PDF is uploaded to the site. Is this possible with Wix Code (or any other way) and if so how would I do this?

Yes David, I can´t see any reason why it would not possible. You would need to set an “uploadedpdfs” collection, where one of the field should be of type ‘document’. On adding a row to the collection, you would send an email. Now, this might take a while before you can give any kind of feedback to the user who just uploaded (“Document saved”), unless you take it outside the .when. But that could have its own problems.
Maybe it is not a bad idea to contemplate a cron-job on a hidden page that queries the database for a “emailsent” flag and does the email sending for you in the background every hour or so. It´s all documented, just look at the articles for sending emails and uploading docs. For cron, search this forum.

I would setup a collection hook on after_save and handle that there. Create a collection like a queue where you store emails that needs to get the email and what document triggered that row. Then in a collection after save hook work through the queue and send emails through sendgrid and when response gets back from sendgrid delete or mark the row in queue as sent.