Skip to content

About

Automated email management system using n8n, Claude AI, Gmail API, and Google Sheets for categorization, tracking, and CAN-SPAM compliance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

email-automation-system

Automated email management system using n8n, Claude AI, Gmail API, and Google Sheets for categorization, tracking, and CAN-SPAM compliance.

Email Automation System

This started as a test project but solved a real problem I kept hearing about - inboxes full of clutter where important emails get buried. Manually sorting, categorizing and unsubscribing from emails is one of those repetitive tasks that eats up time for no good reason. Automating it felt like the obvious solution.

The system handles everything automatically - categorizing incoming emails with AI, trashing spam, sending formal opt-out requests to violators, and logging everything for potential CAN-SPAM legal action. It's not going to make anyone rich, but it puts the law to good use and takes a genuinely tedious problem off your plate completely.

Built this to learn automation and AI integration. Ended up being more capable than expected.

Features

  • AI-Powered Categorization - Uses Claude AI to classify emails into SPAM, PROMOTIONAL, NEWSLETTER, RECEIPT, and IMPORTANT
  • Automatic Sorting - Labels and archives emails based on category
  • Spam Management - Automatically trashes spam and sends legally compliant opt-out emails
  • CAN-SPAM Compliance - Sends formal opt-out requests and tracks 10-business-day response window
  • Legal Documentation - Logs all sender activity with timestamps for potential legal action
  • Sender Tracking - Monitors repeat offenders and tracks emails received after opt-out
  • Bounce Detection - Automatically handles invalid address bounce-backs
  • Daily Summary - Sends a daily email digest of all activity
  • Bulk Cleaner - Separate workflow to process existing inbox backlog

Tech Stack

  • n8n - Workflow automation platform
  • Anthropic Claude API - AI email categorization and unsubscribe extraction
  • Gmail API - Email reading, sorting, and sending
  • Google Sheets API - Data logging and tracking
  • Google Cloud Console - OAuth2 authentication

Workflows

1. Live Email Sorter

Runs every hour, processes incoming emails in real time.

2. Bulk Inbox Cleaner

Manual trigger, processes existing inbox in batches of 50.

3. Daily Summary

Runs at 12PM daily, sends email digest of all activity.

Data Tracking

Email Log

Tracks every email processed with date, sender, subject, category and action taken.

Sender Tracker

Monitors all senders with:

  • Total emails received
  • First and last contact dates
  • Opt-out request date
  • Emails received after opt-out
  • Legal action status

Legal

This system is designed to enforce CAN-SPAM Act rights. Opt-out emails sent by this system constitute formal legal opt-out requests under 15 U.S.C. § 7704.

Author

Jakoby Tuckta

About

Automated email management system using n8n, Claude AI, Gmail API, and Google Sheets for categorization, tracking, and CAN-SPAM compliance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors