IntimateBadger
IntimateBadger

Reputation: 29

Can a script automatically share Google Drive files to another email address?

Does anyone know if it would be possible to set up a script on my Google account that triggers when a new item is shared to the email and then automatically shares it with another email address?

I use a personal Gmail account, but whenever I do school work documents are always shared with my school email and it is a pain to have to share everything manually or keep switching accounts.

When I looked a few weeks back I was unable to find a way to have a script trigger on new shared items, but I am new to these scripts so if anyone has a suggestion I would appreciate it. Thanks!

Upvotes: 1

Views: 2018

Answers (1)

Henrique G. Abreu
Henrique G. Abreu

Reputation: 17752

I don't think you can actually triggers on new items. But you can write a script to read the Drive feed to easily check if there's new files.

Such script would still have to be triggered on a time-driven basis, so you wouldn't have "instant" access on your second account. Also, if I'd write such script, I would just create a folder, share it with the desired accounts, then use the script just to move the files to this folder. This approach has the benefit of easily allowing you to check which files are shared (with your specific account) and which aren't. And since folders are actually just labels in Drive, it is not any problem if you like or need to have your files organized in another folder structure.

By the way, have you seen Chrome users feature? It helps a lot when working with multiple accounts.

Upvotes: 3

Related Questions