Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

371
Views
Google Apps Script: Create Google Shared Drive Folder from a Google Form submission

I found this thread on creating a folder in Google Drive from a Google Form submission. Can any one help me on creating a folder but in Google Shared Drives instead from Google Form submission.

Thank you

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you want to create a new folder in the Shared Drive by modifying the following script,

function createFolder(form) {
  var items = form.response.getItemResponses()
  var name = items[0].getResponse();
  DriveApp.createFolder(name);
}

How about the following modification? In the current stage, fortunately, the folder ID is used, you can access the Shared Drive with Drive service.

Modified script:

function createFolder(form) {
  var folderId = "###"; // Please set the folder ID on the Shared Drive. If you want to create a new folder to the root folder of the Shared Drive, please set the Drive ID here.

  var items = form.response.getItemResponses()
  var name = items[0].getResponse();
  DriveApp.getFolderById(folderId).createFolder(name);
}
  • In this modification, folderId is the folder ID of the specific folder in the Shared Drive or the Drive ID of the Shared Drive. When the Drive ID is used, the folder is created to the root folder of the Shared Drive.

Note:

  • In this case, you are required to have permission for writing to the Shared Drive. Please be careful about this.

Reference:

  • getFolderById(id)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!