I'm working on an apps script for my domain's internal Google Site that needs to do the following:
- Accept a user-input name
- Create a folder in Drive with that name
- Create a child page (from a template) with that name
- Embed the newly-created folder in the newly-created page
So far I'm up through step 3. My script creates both the page and the Drive folder just like I want it to. Now, I want to include the Drive folder widget in the page template to solve Step 4, but I can't figure out how to dynamically assign the FolderID to it.
I've searched the online documentation for Apps Script and can't find any means of hooking into the Drive embed widget. I've seen a couple of scripting solutions that pre-date the Folder Widget, but my understanding is that these either require a "File Cabinet" page template, and/or don't update in real-time as the Drive files are edited. Not acceptable.
https://developers.google.com/apps-script/articles/embedding_docslist_in_sites
Thanks in advance for any suggestions.