Google Spreadsheet + GAS (Google Apps Script) onEdit Executing Twice

Overview When using GAS (Google Apps Script) to add processing when editing a Google Spreadsheet, there were cases where the onEdit function was executed twice upon editing the spreadsheet. Cause and Solution The cause was that the onEdit function was also selected as a trigger for spreadsheet editing. Since onEdit is a reserved function, there was no need to set up a trigger for it. Summary I hope this is helpful for anyone experiencing the same issue. ...

June 28, 2024 · 1 min · Nakamura

Creating an Anonymous File Uploader Using Google Drive and Google Apps Script

Overview I had the opportunity to create an anonymous file uploader using Google Drive and Google Apps Script, so this is a memo of the process. I referenced the following article. https://qiita.com/v2okimochi/items/06ed1ce7c56a877a1e10 Creating the Web App First, access Apps Script from the following URL. https://script.google.com/ Click “New project.” The following screen will be displayed. Copy and paste the following code. For the second line, <Google Drive upload folder ID>, create an upload folder in Google Drive in advance and obtain its ID. ...

May 11, 2023 · 12 min · Nakamura

What to do when

Overview When creating a large number of files on a shared drive, I encountered an error message “An error has occurred in Google Drive. and the file could not be saved. The cause of the above may be that the file was caught by the shared drive limitation shown below. https://support.google.com/a/answer/7338880?hl=en *The maximum number of items that can be stored on a shared drive The maximum number of items that can be stored on a shared drive is 400,000. This includes files, folders, and shortcuts. * ...

May 9, 2022 · 5 min · Nakamura

How to Fix "An error occurred in Google Drive": Script to Empty Shared Drive Trash

Overview When creating a large number of files in a shared drive, I encountered a situation where “An error occurred in Google Drive” was displayed and files could no longer be saved. The likely cause was hitting the following shared drive limitations. https://support.google.com/a/answer/7338880?hl=ja Maximum number of items in a shared drive A shared drive can contain a maximum of 400,000 items. This includes files, folders, and shortcuts. Daily upload limit Individual users can upload up to 750 GB per day to My Drive and all shared drives. ...

May 6, 2022 · 5 min · Nakamura