• Written by Rob Kleiman

Swipe Right to Keep: Turning 3,000 Contacts into a Tinder-Style App with Google Apps Script

TL;DR

  • I had 3,000 contacts to review in a spreadsheet, so I used Claude Code to build a swipe-left, swipe-right app on top of the sheet with Google Apps Script: no server, works on a phone.
  • The trick that makes it feel instant: load every contact in one call and save decisions in batches, because every call to Apps Script is a round trip to Google.
  • The lesson: borrow a gesture people already know, and AI gets you a working draft fast when you understand the platform it’s writing for.

Prefer to watch? Here’s my code demo: the two files, the deploy, and a quick swipe through 30 sample contacts.

Code demo: a Tinder-style contacts swiper in Google Apps Script

The problem: 3,000 contacts, one spreadsheet

You’ve been there. You export a list of contacts (leads from a Luma event, follow-ups from a conference, a move from one CRM to another) and you’re staring at a spreadsheet with thousands of rows. Some names you recognize. Some you met once at a conference three years ago. Some you’ve never heard of.

I had about 3,000 email contacts to review. Going through them one row at a time, typing “KEEP” or “REMOVE” into each, was slow and just a strange way to make decisions about people. I wanted it to feel like something people already do without thinking, the same muscle memory as a dating app, a social feed or Duolingo: one card, one decision, next.

And it matters who stays on the list: it decides who hears from you next, whether that’s a newsletter, an event invite or a sales follow-up. A list you never get around to cleaning is a list you can’t use.

So I built a swipe-left, swipe-right reviewer that runs straight from Google Sheets. No server, it works on a phone, and you can triage contacts from your couch.

How I built it: Claude Code

I didn’t start by writing JavaScript. I opened Claude Code in my terminal and asked for roughly this:

Make me an app. What’s the easiest way to do this? I want to swipe left and swipe right through contacts from a Google Sheet.

It suggested Google Apps Script, wrote both files and helped me think through the JavaScript. What made it quick to finish was knowing how Apps Script works: where the files go, how a web app gets deployed, and why every call to the sheet costs time. The AI wrote the first draft; understanding the platform got it running. The steps below walk through what it built.

The demo: 30 sample contacts

For the video I used a sheet of 30 made-up contacts. Open the app’s URL and it loads them all, then shows the first: Sarah Martinez, senior product manager at TechCorp, from row 2 of the sheet. Keep Sarah. John? Haven’t talked in a while: swipe left. Emma, the UX designer: keep. Alex Johnson might have moved on, so swipe up and come back to it later. The counter keeps score as you go.

What is Google Apps Script?

Google Apps Script is JavaScript that runs on Google’s servers and is built into Google Sheets, Docs, Gmail and the rest of Google Workspace. For a tool like this, it removes almost everything that usually gets in the way:

  • No hosting. One click deploys a script as a web app with its own URL.
  • No sign-in code. It runs under your Google account, so it can already read and write your sheet.
  • The data stays where it is. The app reads from and writes back to the same spreadsheet you exported to. Nothing to sync.

The whole app is two files inside the Apps Script editor:

  1. Code.gs, the backend: reads contacts from the sheet, saves decisions and tracks progress.
  2. Index.html, the frontend: a card UI that works on a phone, with touch gestures, keyboard shortcuts and a live progress bar.

The sheet needs a header row, then one contact per row: email, first name, last name, organization, title and domain in the first six columns (the order a Google Contacts CSV export uses). The app adds its own Status column.

Step 1: Serve the page

Every Apps Script web app starts with doGet(), which runs when someone opens the app’s URL and returns the page to show:

function doGet() {
  initializeSheet(); // Adds a "Status" column if the sheet doesn't have one
  return HtmlService.createHtmlOutputFromFile('Index')
    .setTitle('Contact Review')
    .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}

initializeSheet() checks whether the last column is called “Status” and adds it if not, so nobody has to prepare their spreadsheet first. setXFrameOptionsMode(ALLOWALL) lets the app be embedded in another page if you need it to.

Step 2: Load every contact in one call

This is the one Apps Script idea worth learning from this project. The page runs in your browser, and Code.gs runs on Google’s servers. The bridge between them is google.script.run: from the page, you call any function in Code.gs by name, and the answer comes back to a success handler (or a failure handler).

Every one of those calls is a round trip to Google, and that lag between cards is what makes a web app feel like a web app. So the page makes the call once, when it opens:

// Index.html: ask Code.gs for every unreviewed contact, once
google.script.run
  .withSuccessHandler(function(contacts) {
    contactQueue = contacts;
    currentIndex = 0;
    showNextContact();
  })
  .withFailureHandler(function(error) {
    alert('Error loading contacts: ' + error.message);
  })
  .getAllUnreviewedContacts();

On the server, getAllUnreviewedContacts() reads the whole sheet in one go with getValues(), rather than cell by cell, and returns only the rows with no status yet:

// Code.gs: one read for the whole sheet
var allData = sheet.getRange(2, 1, lastRow - 1, lastCol).getValues();

for (var i = 0; i < allData.length; i++) {
  var row = allData[i];
  if (!row[lastCol - 1]) { // Status (the last column) is empty
    contacts.push({
      rowIndex: i + 2, // +2 for the header row and 0-based index
      email: String(row[0] || ''),
      firstName: String(row[1] || ''),
      lastName: String(row[2] || ''),
      organization: String(row[3] || ''),
      title: String(row[4] || '')
    });
  }
}
return contacts;

From then on, the page flips through cards from memory, with no waiting. And because it skips rows that already have a status, you can close the app halfway through and pick up where you left off.

Step 3: Save decisions in batches

The same idea works on the way back. Each swipe goes into a queue in the page, and the queue is sent to the sheet every 10 decisions, when you tap Save Now, or when you reach the end of the list:

function saveDecision(decision) {
  pendingDecisions.push({ rowIndex: currentContact.rowIndex, decision: decision });
  currentIndex++;

  if (pendingDecisions.length >= 10) {
    savePendingDecisions();
  }
  showNextContact(); // The next card appears instantly; saving happens in the background
}

function savePendingDecisions() {
  const decisionsToSave = [...pendingDecisions];
  pendingDecisions = [];

  google.script.run
    .withFailureHandler(function() {
      // Nothing is lost: put them back in the queue and try again next time
      pendingDecisions = decisionsToSave.concat(pendingDecisions);
    })
    .saveBatchDecisions(decisionsToSave);
}

That failure handler matters on a phone, where the connection drops: a failed save puts the decisions back in the queue instead of losing them.

Each decision lands in the Status column, right next to the contact it belongs to, so the spreadsheet is always the record of what you’ve done:

The Google Sheet's Status column filled in with KEEP, REMOVE and SKIP for each contact

The counter at the top is kept in the page too, so it updates on every swipe without asking the server. Undo steps back one card and takes the last decision out of the queue. If that batch was already saved, swipe the card again and the new decision replaces the old one in the sheet.

Step 4: Make the card feel physical

This is the part that makes people want to use it. The card follows your finger (or mouse) and tilts as you drag, and a ✗ or ✓ fades in the further you go:

function handleMove(e) {
  if (!isDragging) return;

  const touch = e.type === 'touchmove' ? e.touches[0] : e; // Same code for finger and mouse
  currentX = touch.clientX - startX;
  currentY = touch.clientY - startY;

  // Follow the finger, and tilt like a real card
  const rotation = currentX / 20;
  card.style.transform = `translate(calc(-50% + ${currentX}px), calc(-50% + ${currentY}px)) rotate(${rotation}deg)`;

  // Fade in the ✗ or ✓: fully visible at 150px
  leftIndicator.style.opacity = currentX < -50 ? Math.min(-currentX / 150, 1) : 0;
  rightIndicator.style.opacity = currentX > 50 ? Math.min(currentX / 150, 1) : 0;
}

When you let go, a drag of more than 100 pixels counts as a decision. Anything less and the card snaps back:

function handleEnd() {
  isDragging = false;
  const threshold = 100;

  if (currentY < -threshold && Math.abs(currentY) > Math.abs(currentX)) {
    animateSwipe('up', 'SKIP');
  } else if (currentX < -threshold) {
    animateSwipe('left', 'REMOVE');
  } else if (currentX > threshold) {
    animateSwipe('right', 'KEEP');
  } else {
    card.style.transform = 'translate(-50%, -50%)'; // Snap back
  }
}

Three gestures, three outcomes:

  • Swipe right: KEEP
  • Swipe left: REMOVE
  • Swipe up: SKIP (come back to this one later)

At a laptop, the arrow keys and the three buttons under the card do the same thing.

Step 5: Deploy it

Getting it live takes a few minutes:

  1. Open the Google Sheet with your contacts.
  2. Go to Extensions → Apps Script.
  3. Create two files, Code.gs and Index.html, and paste in the code from the repo.
  4. Click Deploy → New deployment and choose Web app.
  5. Give it a description (I used “contacts example”) and set Execute as to Me.
  6. Set Who has access to yourself (or anyone, if you’re sharing it).
  7. Click Deploy.

You’ll get a URL like https://script.google.com/macros/s/ABC123.../exec. Paste it into your browser, or open it on your phone, and start swiping. When you’re done, filter the sheet by Status and export the clean list: an email list to build on, or a set of prospects worth a follow-up.

Want to try it before using your own contacts? The repo includes sample_contacts.csv, the 30 made-up contacts from the video. Import it into a new sheet and follow the same steps.

What I learned

  • Borrow a gesture people already know. Swipe right to keep, left to remove. Nobody needs instructions, and that’s most of why the tool gets used instead of abandoned.
  • Round trips are the enemy. Apps Script has quotas, and every call to it takes time. One read up front and batched writes are the difference between laggy and instant.
  • AI writes the draft; knowing the platform ships it. Claude Code turned a one-line idea into two working files. Knowing how Apps Script deploys and where it’s slow is what got it live quickly.
  • Build on the platform people are already in. The contacts were already in Sheets, so the app lives there too: no new account, no export and re-import.
  • Feedback builds trust. The tilt, the fading ✗ and ✓ and the progress bar tell you what’s about to happen before it does, so fast swiping doesn’t feel risky.

What I’d improve

  • True batch writes. saveBatchDecisions still writes one cell at a time on the server. Writing the whole Status column with one setValues() call would be faster on big lists.
  • Find columns by name. The app expects email, name and company in fixed columns. Reading the header row would let it work with any CRM’s export as-is.
  • Fix the Refresh Stats count. The Refresh Stats button counts contacts you haven’t reviewed yet as “removed”. The live counter is right; the refresh math needs a fix.
  • Beyond contacts. The same pattern works for any list that needs a human’s yes or no: lead qualification, content review, applicant screening.

The code

Technologies used

  • Claude Code (wrote the first draft of both files from a plain-English prompt)
  • Google Apps Script (doGet(), HtmlService, SpreadsheetApp)
  • Google Sheets (the contacts, and the record of every decision)
  • google.script.run (calling Code.gs from the page)
  • JavaScript (touch and mouse events, keyboard shortcuts, a decision queue)
  • CSS (transforms and transitions for the card)

The takeaway

The hard part of this project wasn’t the code. Claude Code wrote most of it from one sentence. The hard part was the two decisions around it: pick an interaction people already know, so the tool gets used, and respect the platform’s limits, so it feels instant. Get those right and a chore you’ve been avoiding for months becomes something you do on the couch.

Keep exploring

Have a list that needs a human’s yes or no, or a developer tool that deserves a demo like this? Get in touch. I’m happy to compare notes, build something together, or talk about it at your event.

Keep reading

More from Things I've Built

All Things I've Built posts →