The Problem: Are These Links Actually Alive?
Every week when dozens of orders arrive, we send customized shipping information emails to buyers, complete with tracking links. The problem was straightforward: someone copied a link incorrectly, or a system glitch expired a tracking URL without anyone knowing.
"Wouldn't it be incredibly inefficient to manually click through and verify every single link?"
Building a "Link Validation Bot" with Claude Code
From a non-developer's perspective, here's what we did.
Step 1: Organize Data in Google Sheets on Windows Device
We listed all shipping information (order number, carrier, tracking link) in a Google Sheet.
Order ID | Carrier | Tracking URL | Validation
---------+---------+--------------+------------
ORD001 | DHL | https://... | ?
ORD002 | FedEx | https://... | ?
Step 2: Ask Claude Code for Validation Logic
Our request was straightforward.
「Can you check if the tracking links in my sheet are actually accessible, and flag the ones that aren't?」
Claude Code proposed this script.
import requests
from google.colab import auth
from googleapiclient.discovery import build
auth.authenticate_user()
sheets = build('sheets', 'v4')
# Read links from sheet
result = sheets.spreadsheets().values().get(
spreadsheetId='YOUR_SHEET_ID',
range='A2:C100'
).execute()
links = result.get('values', [])
# Validate each link
for idx, row in enumerate(links, start=2):
try:
response = requests.head(row[2], timeout=5)
status = 'OK' if response.status_code < 400 else 'FAIL'
except:
status = 'ERROR'
# Write validation result back to sheet
sheets.spreadsheets().values().update(
spreadsheetId='YOUR_SHEET_ID',
range=f'D{idx}',
valueInputOption='USER_ENTERED',
body={'values': [[status]]}
).execute()
Step 3: What We Discovered After Running It
The results from running the bot were somewhat shocking.
• Out of 156 total links, 12 had already expired
• 3 had corrupt domain names due to copy errors
• 5 were temporarily unreachable due to carrier server maintenance
If we'd checked manually, we probably would have caught maybe 2 or 3.
The Unexpected Side Effect
What happened next was even more interesting. As the bot validated links and automatically logged "link failure patterns by time of day," we discovered that one carrier's tracking server experiences response delays every Wednesday at 9 AM (GMT).
So we started timing our link sends to avoid that window.
What a Non-Developer Gained
The core insight from this automation was simple: "Give repetitive work to a machine, and patterns emerge."
• Manual validation: Catches errors
• Automated validation: Catches errors + identifies patterns + enables prevention
Claude Code wasn't just a validation tool. It became a detector of hidden signals in our operational data.
What's next? We're thinking about mining email subject lines for "high-response-rate word patterns."