0

I'm working on an apps script for my domain's internal Google Site that needs to do the following:

  1. Accept a user-input name
  2. Create a folder in Drive with that name
  3. Create a child page (from a template) with that name
  4. 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.

2 Answers 2

1

Its not possible to modify a site widget configuration with apps script (or any existing api)

Sign up to request clarification or add additional context in comments.

Comments

0

If you need to Create Page on Google sites, you have this : https://developers.google.com/apps-script/reference/sites/page

If you need a template for your Google Sites , you must use this : https://developers.google.com/apps-script/guides/html/templates

you create page and you load this template HTML

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.