Inbox Overload? Here’s How We Fixed It with a Simple Email Ticketing System (No Fancy Tools Needed)

Running a small business is incredibly rewarding—but let’s be honest, the backend chaos is real. At Saaragya, one of our biggest pain points was managing customer emails.

Order questions. Size exchanges. The classic “Where’s my order?” panic mails.

Our inbox was a mess.

Instead of paying for a full-fledged ticketing platform, we built a lightweight, DIY email ticketing system using just Google Apps Script + Google Sheets—and it’s been a total game-changer.


Why We Built It

  • We were wasting time manually tracking customer messages.
  • Emails were slipping through the cracks.
  • Expensive tools didn’t fit our lean setup.

So we made a tool that:

  • Logs every incoming customer email to a Google Sheet
  • Generates a unique Ticket ID for easy tracking
  • Auto-sends an acknowledgment to reassure the customer
  • Keeps our team sane and organized

How to Build This in 5 Minutes

1. Create a Google Sheet

  • Name it: Customer Support Tracker
  • Add these columns:
    Ticket ID, Timestamp, Customer Email, Subject, Status

2. Create a Timestamp Tracker Sheet

  • Add a second sheet called Last Checked
  • In cell A1: Last Checked Timestamp
  • In cell A2: 01/01/2000 (just a placeholder)

3. Use This Apps Script

Go to Extensions → Apps Script, delete any existing code, and paste this:

function trackCustomerEmails() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Customer Support Tracker");
  var lastCheckedSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Last Checked");
  
  var lastCheckedTime = new Date(lastCheckedSheet.getRange(2, 1).getValue());
  var threads = GmailApp.search("to:email@email.com is:unread after:" + Math.floor(lastCheckedTime.getTime() / 1000));
  var messages = GmailApp.getMessagesForThreads(threads);
  
  messages.forEach(thread => {
    thread.forEach(message => {
      var email = message.getFrom();
      var subject = message.getSubject();
      var timestamp = message.getDate();
      
      if (timestamp > lastCheckedTime) {
        var ticketID = "TICKET-" + new Date().getTime();
        sheet.appendRow([ticketID, timestamp, email, subject, "Open"]);
        sendAcknowledgmentEmail(email, ticketID);
      }
    });
  });
  
  lastCheckedSheet.getRange(2, 1).setValue(new Date());
}

function sendAcknowledgmentEmail(email, ticketID) {
  var subject = "Support – Ticket Received: " + ticketID;
  var body = "Hi there,\n\nWe've received your message and assigned Ticket ID: " + ticketID + ". Our team will respond within 24 hours (excluding holidays).\n\nThanks for reaching out!\n\n– Saaragya Support Team";
  MailApp.sendEmail(email, subject, body);
}

function setEmailTrigger() {
  ScriptApp.newTrigger("trackCustomerEmails")
    .timeBased()
    .everyMinutes(5)
    .create();
}

4. Set Up the Automation

  • Click Run → setEmailTrigger
  • Grant permissions when prompted
  • Done!

What It Does

  • Runs every 5 minutes
  • Checks for new unread emails
  • Logs details in a Google Sheet
  • Sends a reply with a Ticket ID

No more lost emails. No more chaos.


What’s Next?

We’re thinking of adding:

  • WhatsApp alerts for new tickets
  • Auto-closing resolved queries
  • A visual dashboard for tracking

If you’re a solo founder, small team, or just love no-code/low-code hacks—try this out. If it helps, share it with someone else who’s drowning in email too.


Do share your views. Or in case you’ve enhanced this code, do share with us.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

The Playbook

We build clean, powerful WordPress plugins and Shopify apps to help businesses automate, convert, and scale — faster.

A venture by Saaragya Lifestyle Pvt Ltd

Quick Links

Contact

Email: hello@the-playbook.in

Mon–Fri, 10 AM – 6 PM IST

© The Playbook · All rights reserved.
×

Contact Us