https://github.com/examosa/gmail-scripts
Google Apps Scripts for Gmail automation
https://github.com/examosa/gmail-scripts
apps-script gmail
Last synced: 11 months ago
JSON representation
Google Apps Scripts for Gmail automation
- Host: GitHub
- URL: https://github.com/examosa/gmail-scripts
- Owner: examosa
- Created: 2021-01-30T01:25:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-08-03T16:58:32.000Z (over 3 years ago)
- Last Synced: 2025-01-28T11:45:58.187Z (about 1 year ago)
- Topics: apps-script, gmail
- Language: JavaScript
- Homepage:
- Size: 208 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gmail Scripts
[](https://github.com/google/clasp)
These are just some basic automated tasks created using [Google Apps Script (GAS)](https://www.google.com/script/start/). They are described below.
## Functions
### Delete Old Labels
I use labels to hang on to emails that I could need again in the immediate future. After months, however, I usually don't still need them. This function deletes emails by label older than a certain threshold (for my use case: 90 days).
### Mark Deleted As Read
Sometimes I delete emails without opening them (you know the type). I run this function periodically to mark all unread deleted emails as read.
## Building
Run `npm run build`. 'Course, all this does right now is copy `main.js` and `appsscript.json` into the `dist/` folder. Haven't yet figured out a satisfactory way to bundle the source code for GAS, but am open to suggestions.
## Testing
Run `npm test`. Note that you will need to uncomment the export at the end of `main.js` for the tests to run properly.