-1

Problem: I need to keep a comms log for emails sent by my teams to other teams. We are running a multiyear project that has over 150 customers. We often escalate and get responses from directors asking when we have sent past messages, often requiring us to dig back in our emails and figure out who sent 'what' to 'who' and 'when'.

Solution: I created a google form that my team can fill out every time they send a 'comms' email as part of this project. This allows us to track when emails were sent, to whom they were sent to, and when they were sent.

Question: Can I automate this? I would like to avoid having my team fill out this form manually every time. We are on GSuite, so I am wondering if there is potential to use the Gmail API or Google Apps Script to enable the automation of this step. Essentially I would want to capture the From, To, Cc, Subject, and Date Time Stamp of each email. I am also open to some form of group inbox that can be Cc'd that has a listener in it that will fill out the form or even better yet put the data straight into the Google Sheet.

What I have Tried: I have looked over the Google Apps Script API and have not found something that directly helps me. I have looked over the Gmail API but I did not find it very helpful to my query. I have googled a lot, but almost everything is focused on send emails from Google Sheets, not capturing information about sent emails.

Limitations: I am not a GSuite admin. I have limited technology stack to support this so I am stuck with GSuite.

4
  • Welcome to Web Applications. Please show what you tried and add a brief description of your search efforts as is suggested in How to Ask. – Rubén Apr 9 at 18:47
  • I have updated it. Can you now please open it? – Brilstern Apr 10 at 18:56
  • The "what you tried" is very vague. Gmail API questions are off-topic on this site, if you decide to go by using Google Apps Script, show a script (preferably a "minimal complete and verifiable example") that read data from Gmail. – Rubén Apr 10 at 19:00
  • Related: webapps.stackexchange.com/q/9813/88163 – Rubén Apr 10 at 19:04
0

Yes, this can be automated and there are multiple ways to do it.

One way is by using time-driven trigger from Google Apps Script to periodically scan the user sent emails. In order to don't have to involve the organization admin you should ask that each teammate create the time-driven trigger.

It's very likely that this can be done by using Google Apps Script Workspace Services

  • Gmail: Class GmailApp for reading the data from the user mailbox.
  • Forms: Class FormsApp for writing the data as a form response.

If you are able to involve you organization admin you could ask their help to access the mailboxes of your teammates by setting un domain-wide delegation of authority for your script.

Resources

Related

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.