I work in a small team at my office and every day we have to send out 5-10 emails to clients with a small formatted table of data. Currently we do this manually but I would like to write a script that generates the templates as drafts for us and we can simply verify and send out. It would be embedded in a spreadsheet stored on a Team Drive of which we are all owners.
There is a slightly manually step involved so I believe it's best to keep the script as "runable" from an individual's alias, however afterwards we sort of split the responsibility of sending the emails in half in the team based on which clients are involved. Therefore, ideally the drafts should be created in an inbox of which we are all delegated members by some administrator in our company.
Thus, my question is: can I get my GAS to createDraft() into the delegated inbox instead of the personal draft folder of the individual who runs the script? The individual running it will change each week. And, the time of day we will need to run it will vary ~20 minutes each day so I can't set it on a trigger.
Currently my script is a container-bound script on the spreadshet, which this line of code for the draft:
GmailApp.createDraft(recip, subject, null,{cc: cc, htmlBody: fullBody});
It creates a draft in the personal inbox of the "clicker" of the script. The Gmail API is enabled by all users of the spreadsheet/script.
Thanks!