Member-only story

Automating Google Drive: How to Copy a Google Doc into Multiple Folders with Google Apps Script

Tarun Telang
2 min readDec 11, 2023

Google Drive is a popular online document management platform; with Google Apps Script, you can take your productivity to the next level. In this article, we’ll explore how to automate copying a document into numerous folders in Google Drive. It can be handy for educators, project managers, or anyone who needs to distribute documents across various directories.

Getting the Google Doc and Folder IDs

Before diving into the script, we need to understand how to find the document ID of our document and the folder IDs of the folders in which we would be copying the document.

Finding Your Google Doc ID

Every document in Google Drive has a unique ID, which is necessary for scripting purposes. Here’s how to find it:

  1. Open your Google Doc: Navigate to the document in your Google Drive.
    2. Examine the URL: The URL in the address bar will look something like this: https://docs.google.com/document/d/1A2b3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T/edit.
    3. Identify the Document ID: The string between /d/ and the next / is your Document ID. In this example, it’s 1A2b3C4D5E6F7G8H9I0J1K2L3M4N5O6P7Q8R9S0T.

Finding Your Google Drive…

--

--

Tarun Telang
Tarun Telang

Written by Tarun Telang

Prolific Author, Engineering Leader, Software Architect

No responses yet