The following Google Apps Script and HTML code is used to create a simple
Google Picker that will let a user navigate their Google Drive and select a folder from which we can then extract its ID and create a clickable Url link.
 |
Screenshot of Google Picker in Drive |
The reason for making use of the Google Picker is typically a user of a script (not usually a Coder themselves) needs to occasionally enter the ID of a folder/file in order for a script to perform its tasks. It can be cumbersome and error-prone to request they extract this from the Url in Google Drive and then enter into a specific cell in a Google Sheet for instance.
With the Google Picker we can create a simple button that they click instead which lets them browse for the necessary item (a folder in this example) and select it. A small piece of Apps Script code can then get the necessary ID/Url we require and automatically put them in the correct area of the spreadsheet.
Google Drive Picker for Folder ID
thanks!
ReplyDelete