Skip to content

A Google Apps Script that retrieves today's emails and saves them in spreadsheets for each email address/group provided.

Notifications You must be signed in to change notification settings

karts13/EmailTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Automated Email tracker and Organizer

Description

This is a Google Apps Script that retrieves today's emails and saves them in spreadsheets for each email address/group provided. It creates two spreadsheets, one with all the emails sent to the email address/group and another with only the emails received on the current day. It also sends an email with PDF attachments of both spreadsheets to the user who executed the script.

How to Use this Code

  1. Create a new Google Apps Script project by going to script.google.com , clicking on "New project" and giving it a name.
  2. Copy the code from EmailTracker.gs repository and paste it into the Script editor.
  3. Do the necessary customizations.
  4. Save the script and authorize it to access your Gmail and Drive services.
  5. In the getMails function, add the email addresses/groups that you want to check.
  6. Run the script by clicking on the "Run" button or by setting a time-driven trigger to run it automatically.
  7. Check your email inbox for the PDF attachments with the spreadsheets.

Customization

This code can be easily customized to meet your specific needs. Here are some things you may want to modify:

  • Email Addresses: Update the emailAddresses array in the getMails() function to specify the email addresses or groups you want to receive emails for.
  • Folder ID: Add the folder ID of the Google Drive folder which you created to store the attachments.
  • Date Format: Update the date variable in the getMails() function to specify the date format you want to use in the email subject line and spreadsheet.
  • Spreadsheet Formatting: Modify the formatting of the spreadsheets created by the code to meet your needs. You can update the main and sub headings, adjust column widths, and change cell styles.
  • Email Content: Modify the email subject and body in the GmailApp.sendEmail() function to meet your needs.

Sample Outputs

Google script
Google script Page
Google sheets files created
Google sheets files created
Today mails spreadsheet
Today mails spreadsheet
All mails spreadsheet
All mails spreadsheet
Email with Today mails pdf
Email with Today mails pdf
Pdf of Todays mails
Pdf of Todays mails

Contributions

If you find any issues or have suggestions for improvement, please open an issue or create a pull request.

About

A Google Apps Script that retrieves today's emails and saves them in spreadsheets for each email address/group provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published