You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR; what you've created is 80% of what I'm looking for, very cool!
As you described, I'd like to create a "project template" directory with a handful of files and folders that I can copy and use for future projects. The one challenge I have is that I'd very much like to include and maintain links between documents.
For example, in my template folder, the project plan Google Doc might link to the project status Google Sheet. If I were to copy the entire folder, my understanding is that the copied project plan would have a link pointing to the oldproject status.
Google Drive objects (slides, docs, etc.) seem to use a unique ID that stays persistent regardless of the document name, and I haven't found an out-of-the-box way of using relative links the way we would do on linux shell or HTML.
I haven't worked with AppScript or Drive APIs, but if Google doesn't have a native API to find a document by path (sort of how S3 or GCS would work), then I think this would be a pretty tedious exercise (esp. since I'd want support for Sheets, Docs, and probably Slides).
But doesn't hurt to share the idea, I suppose :)
The text was updated successfully, but these errors were encountered:
Yeah -- so this would be an added layer of complexity, because effectively what you need to do is insert the link to the dynamically created document/sheet, into each dynamically created doc/sheet. It's not impossible of course, but just will take a little more complexity and would need to be a separate solution than this (as it's a slightly different use case).
The loop would need to look something like this (i think, off the top of my head):
The main control google sheet will need a couple more columns, to store the template Sheet AND the template Document
Find the template doc and sheet, copy them, and place into the new target folder
Store the ID of the document and sheet created in step 2
Using the Docs API, open the newly created document (from step 2) and insert a link to the newly created Sheet from step 2 (using the ID that was stored/noted in step 3).
Finish the loop and clear the memory/references, and continue onto the next entry
So....definitely possible, but not what i would put inside this particular appscript project. Mainly because the premise is somewhat that the newly created folder will be shared with the necessary people, and it's super easy for them to just look for the google sheet/doc in that same folder.
Background
TLDR; what you've created is 80% of what I'm looking for, very cool!
As you described, I'd like to create a "project template" directory with a handful of files and folders that I can copy and use for future projects. The one challenge I have is that I'd very much like to include and maintain links between documents.
For example, in my template folder, the
project plan
Google Doc might link to theproject status
Google Sheet. If I were to copy the entire folder, my understanding is that the copiedproject plan
would have a link pointing to the oldproject status
.Google Drive objects (slides, docs, etc.) seem to use a unique ID that stays persistent regardless of the document name, and I haven't found an out-of-the-box way of using relative links the way we would do on linux shell or HTML.
I haven't worked with AppScript or Drive APIs, but if Google doesn't have a native API to find a document by path (sort of how S3 or GCS would work), then I think this would be a pretty tedious exercise (esp. since I'd want support for Sheets, Docs, and probably Slides).
But doesn't hurt to share the idea, I suppose :)
The text was updated successfully, but these errors were encountered: