简体   繁体   中英

Google Apps Script Trigger

I'm just new to everything about this. I created an Apps Script Project just by inside a Google Drive folder, so I did not use a Spreadsheet to create the project.

I created a function that is, when the testfile.csv file is uploaded to Folder1, it will move to Folder2. Folder1 will become empty. This function is working fine.

However, I would like the function/script to automatically run when a new testfile.csv file is uploaded again to the Folder1. The test.csv file is uploaded once a day and it can be anytime of the day--no specific time or range.

I'm afraid the "Add Trigger" built-in to the Apps Script won't work in our situation as it will keep on running depends on the set time.

Hope someone can enlighten me. Thank you!

You'll need Drive API push notifications but sadly it can't trigger a google apps script. See a more detailed explanation here .

Your best solution is a time triggered script as what Yuri mentioned in the comments above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM