I have a Google Site based on this template https://sites.google.com/site/theintranetsitetemplate/. It exists in the company's Google Apps domain account. I would like to know if there is a way to sync the documents page with Google Docs and the directory page with Google Contacts directory. If so, does this require Google Apps Script?
You can insert a Google Drive folder gadget that points to the shared folder.
In editing mode on a page, click Insert > Drive > Folder.
Browse to the folder to share (or paste the folder's URL in the box). Be sure that the folder is shared with the public, or this will not work.
Sharing out a domain's full directory is not easy (even suggesting it would make many IT depts queasy), but defintely can be done with an Apps Script (see the dev page).
Related
I am collecting Friends photos through a Google Form. The Form has only two fields Name (text) and Photo (upload).
The uploaded photo is stored in a folder in Google Drive and a hyperlink appears in the Google sheet to the name.
The issue I am facing is that the photo stored in Google Drive usually has a name generated while taking the photo and is not the name of the person whose photo it is. I want the photo file name to be the same as the person's name.
I don't know much of Google Scripts and would like help in using a script to rename the files in the Google Drive with the name of the uploader which is in the Google Sheet.
To rename uploaded files in Google Drive that have been collected through Google Forms you can
create your own apps script that will process all files received via Google Form, as described here or here, or
use my Google Forms add-on Form Uploads Manager that renames the uploaded files, move them to the Google Drive folders you specified and can add a description for each uploaded file, which makes it easy to find files using the built-in Google Drive search. A detailed description of the add-on settings is available on the app home page.
Disclaimer: This is my Google Forms add-on, which I created for my own purposes, and after successful use I posted it on the Google Workspace Marketplace. After a 1 week trial (which might be enough to reach your goals), a paid add-on subscription is required.
I've made a Google Apps Script project in one sheet that I want to easily access from multiple other Google Sheets, in Google Drive as well as Team Drive.
It would make no sense to publish this script to the Google Web Store since the functionality is based on our own files.
Can I publish it as an addon that's only accessible for users of my domain?
This should be possible by listing it as 'private' in the Developer Dashboard. In the script editor, go to Publish > Deploy as add-on. You have to follow the steps necessary to access the Developer Dashboard and create your listing.
Fill in all the details of your app (name, description, icon etc.) and set its visibility options at the bottom.
Is there a way to view & manage the scripts I have deployed as a web app through the Google Apps Script Editor?
I stored a script on my google drive, opened it with Google Apps Script, and deployed via 'Publish -> Deploy as Web App'. After testing the script/webapp works correctly, I deleted the script project from my google drive and found that the web app is still functioning.
I can't find a way to view a list of, or manage the scripts after they have been published. Is there a console or dashboard that will show all my published scripts?
The file may still be available in the Trash or Archives folder. Searching for type:script will give you a list of all stand alone script files. Also type:script is:trashed will find any in the trash folder.
Finding files with bound scripts associated (the script is embedded in the file) as well as any with specific permissions can be done by looking at your account's permissions. This will list every file that has had some sort of permission request. If a bound script does not require any permissions granted, I know of no way to finding the file. To see the files you have granted permission to, use this link: https://myaccount.google.com/permissions
If I open the shareable link I have got for a file from Google Drive in the browser, I always get either to the Drive's internal preview program or to a download page (See below).
I would like to know whether there is a programmatic way to launch a specific drive-connected application (with confirmed access permissions) to open a file for which I have the link (and thus, the ID as well).
I don't want to do this through the drive's interface, but rather within my program. Let's say I want to let the users browse their files and open them in the browser with their default app as they have defined it on their drive (and let's say I already know that app).
To make it clear, I just want to achieve what Google Drive's interface does in the browser: You click a file, and it opens in a new tab in your default app.
In my opinion, this is possible with the use of Advanced Drive Service and Drive Service.
Advanced Drive Service
The advanced Drive service allows you to use the Google Drive web API in Apps Script. Much like Apps Script's built-in Drive service, this API allows scripts to create, find, and modify files and folders in Google Drive. In most cases, the built-in service is easier to use, but this advanced service provides a few extra features, including access to custom file properties as well as revisions for files and folders.
and for the Drive Service, you can use getUrl() method to get the URL that can be used to open the File in a Google App like Drive or Docs.
This service allows scripts to create, find, and modify files and folders in Google Drive.
Detailed information and sample codes regarding these services can be found in the documentations.
So I've used a little Google Apps script to make a public folder (type: anyone, role: reader) and then I've requested and received the WebViewLink. But when I go to that link, it says there are no files. I've placed (via Google Drive web interface, not via the app script) an index.html file (document) in that folder.
Do I have to MAKE all the files in the folder via the app script?
I seem to have heard on one of the announcements about this that once the folder is created, you can just drop files into it.
Found the answer myself. The documents in the folder must be of the correct type or they just don't show up. E.g. a google docs document called index.html is NOT an html document. You have to create a standard html page locally and then upload it, but never open or edit it with google docs (drive, whatever) in order for it to be seen. I put detailed instructions on a web page hosted by Google Drive here:
https://googledrive.com/host/0B0ap0WDOII5mbjdwajNBMlRoZUU/