Google-apps-script – Securing and sharing a non-web file (ie. PDF) on Google Sites site

google-apps-scriptgoogle-sites

I'm creating a really simple Google Site where I would like to share a free but valuable document with people. But I don't simply want to share it. I would like this to follow this process:

  1. user enters their email
  2. email is sent to them with a link
  3. they click a link with file download

This link should of course be dynamically generated if at all possible, otherwise one could share their email with others and others would be able to freely download this file. But I don't want to do that, because I would like to collect a list of potential clients when I publish new files. I'd like to inform them of new content via email so they can get it right away. Whether new files would be free or not depends on file content size…

Anyway.

I wonder whether this can be done? I suspect this is likely impossible directly just by using Google SItes, but can it be done using Google Apps Script that can also be used on them?

Best Answer

You may want to consider using the service DropBox instead.

You are really set on Google Sites you create a sub-site with your files set to non public (requires login). yYou have to manually enter who has permissions to view the page however. You can also do page level permissions and select which emails can either view or edit certain pages. You would then upload the Docs you want then link to the doc on the relevant pages

The 3rd option would be to upload them to Google Docs and then enter the email address you want to share the doc with.

Overall, just get a DropBox account.