I Used AI to Automate One of My Most Repetitive Data Tasks
There's a small piece of friction that shows up in almost every data project I work on.
I have a spreadsheet with a column of IDs. I need to query those records in SQL. So I write WHERE id IN (...) and then spend a few minutes doing the same tedious thing: copying the IDs, formatting them into a comma-separated list, adding quotes if they're strings, removing quotes if they're numbers.
It's not hard. It's just something I've done by hand hundreds of times. And it always feels like the kind of thing a computer should do for me.
So I built something to fix it. Then I used it as an experiment in AI-assisted development. This post covers both.
The Three Things I Built
A web tool for anyone who wants to solve this problem right now without any setup. Paste your IDs, click a button, copy the result. It lives at id-formatter-webapp.vercel.app.
A GitHub repo with Python scripts for analysts who want the same functionality built into their terminal or launcher app. Full setup instructions included for terminal, Raycast, and Alfred users. Repo at github.com/summerzahara/sql-id-formatter.
This write-up on how the whole thing came together, including how I used AI throughout the process.
The Problem in Detail
When you're working with data, you regularly end up writing queries like this:
SELECT *
FROM orders
WHERE customer_id IN (1042, 1087, 1203, 1341)
Or this, when the IDs are strings:
SELECT *
FROM events
WHERE session_id IN ('a3f9', 'b2c1', 'd7e8', 'f1a4')
Getting from a spreadsheet column to that formatted list requires either manual work or some throwaway formula you'll forget next time. Neither is a good use of time when you're doing it constantly.
The solution is simple: a small script that reads your clipboard, detects whether the IDs are numeric or strings, formats them correctly, and replaces your clipboard with the result. Copy from the spreadsheet, trigger the script, paste into SQL.
How I Built It With AI
I want to be specific here, because "I used AI to build it" is not a particularly useful thing to say on its own.
I described the problem to Claude in plain terms. Not "write me a Python script that does X," but a description of the actual workflow: here's what I'm doing manually, here's exactly what I want the output to look like, here are the two cases I need to handle.
The first version it produced worked. I tested it against real data from my actual workflow, found a couple of edge cases (blank lines between IDs, IDs that look numeric but need to be treated as strings), and described those back. We iterated.
Then I asked about alternatives. Can this be triggered without opening a terminal? That conversation led to the Raycast version, which runs the script invisibly and shows a notification when it's done.
The total time from problem to working, tested tool was under 30 minutes. More importantly, the process taught me something:
The skill isn't coding. It's problem specification.
If you can describe your workflow friction precisely — what the input is, what the output should be, what edge cases exist — you can usually build a solution with AI even if you've never written a script before. The barrier is articulation, not technical knowledge.
The Web Tool
If you want to try it without any setup: id-formatter-webapp.vercel.app
Paste your IDs (one per line), select your format type or let it auto-detect, click Format. Your results appear immediately, ready to copy.
The Scripts (for Power Users)
If you'd rather have this built into your workflow permanently, the GitHub repo has everything you need: github.com/summerzahara/sql-id-formatter
Two scripts: one for the terminal (with a shell alias so it's a single command), one for Raycast. Setup instructions in the README cover all three approaches — terminal, Raycast, and Alfred.
I keep the repo partly so I have a clean, documented way to get set up again when I get a new computer. The README doubles as my own setup guide.
The Broader Point
This is a small problem. The solution is a small script. But the pattern matters.
Most analysts and data professionals have a handful of these: small, repetitive tasks that feel too minor to justify asking engineering for a tool, but add up to real time and mental overhead over months. The combination of AI for development and low-cost hosting has made these worth solving.
If you have a workflow problem like this, the best way to start is to write down exactly what you're doing manually and what you wish you could do instead. That description is 90% of the work.
What repetitive data task would you most want to automate? I'm curious what shows up most often for other analysts.