A collection of Gmail automation scripts using Google Apps Script. Currently includes:
- Invoice Forwarder: Automatically forwards unread emails labeled "Invoices" to a specified email address and marks them as read
- VS Code with Dev Containers extension
- Docker Desktop
- Open this project in VS Code
- When prompted, click "Reopen in Container" or use Command Palette:
Dev Containers: Reopen in Container - Wait for the container to build and dependencies to install
- Copy
.env.exampleto.envand update the configuration:cp .env.example .env # Edit .env with your target email and label name for invoice forwarding
# Generate config from .env (automatically run before push)
npm run build-config
# Push code changes to Google Apps Script (includes all automations)
npm run push
# Deploy new version
npm run deploy
# View execution logs
npm run logs
# Open in Google Apps Script web editor
npm run open- Create the label in Gmail (e.g., "Invoices")
- Test the setup by running
testSetup()function in Apps Script - Set up automation by running
setupTrigger()function to enable automatic forwarding - Configure the target email and label name in
.env
src/- Source code filesinvoice-forwarder.js- Main Gmail invoice forwarding scriptconfig.js- Generated configuration (from .env)
.devcontainer/- Development container configurationdocs/- Documentation.env- Configuration file (not committed to git).env.example- Configuration template
- Forwards emails with configured label to specified email address
- Marks processed emails as read
- Runs automatically every 30 minutes
- Configurable via .env file
- Receipt organizer
- Newsletter filters
- Meeting scheduler helpers
Built with Alpine Linux for lightweight development environment