How I Built a Full SaaS Product Using AI Automation
If you want AI inside your product, the hard question is not “can AI do this”. It is which jobs AI should do, who checks its work, and what happens when it gets something wrong.
This is how I answered that on a real product. What worked, what broke, and what a person still had to decide.
The product
O Sequencer, an outreach app I built, helps people do relationship-based outreach on a professional network. Not mass email. The kind where you read someone’s profile, write something that fits them, and follow up like a person.
What it does for its user:
- Campaigns: a sequence of steps, from viewing a profile to a warm intro, a follow-up and a close. Seven step types in all.
- A daily list: each morning, who to contact today and which step they are on.
- A browser extension: on a profile page, one click saves the person to a campaign.
- AI message drafts: a first draft for each step, written from what the app knows about the person.
- Billing: a 30-day trial, then a subscription through Stripe.
- Tests and results: A/B tests between message versions, and an analytics page.
It is a full product: sign-in, payments, a database, an extension and AI. I built it with Claude Code, the AI coding tool I use every day.
Four jobs I gave the AI
Most products bolt AI on: a “generate” button here, a chatbot there. This one was built around four AI jobs. Each one does work a person would otherwise do by hand.
1. Read: turn a messy profile into clear facts
A profile page is a wall of text: headline, jobs, posts, skills, endorsements. When the user clicks the extension button, the AI reads up to 8,000 characters of it and returns clear facts: industry, years of experience, company size, notable clients, certifications, the problems they solve, recent activity, and more. It also writes a short opener of 75 to 100 words that mentions something real from the profile and ends with a question.
Without this step the app has a name and a link. With it, every later step knows who the person is.
2. Refresh: keep those facts current
People change jobs and start new projects. A profile read six months ago is stale. One click reads the profile again.
Before anything is replaced, the app saves the old version with a date, so the user can see how the person changed. Name, title and company are not touched. Industry is only filled in if it was empty. Each contact can be refreshed up to 5 times in 90 days.
3. Draft: write the message
The draft combines three things: instructions on tone (“write as a curious peer, not a salesperson”), a message template for the step, and the facts from job 1. The user reads the draft, edits it, and sends it on the network by hand. The AI never sends anything.
The app ships with 15 starter templates in five groups: cold, warm, follow-up, meeting and objection. Each campaign step can link its own template, so the right one shows up at the right step.
4. Sort: put the warmest people first
This job uses no AI model. It uses what the other three produce.
Anyone who has replied, or had a video call, phone call or in-person meeting, goes to the top of the daily list. The user starts the day with the people most likely to answer, while they are still warm. Cold outreach fills the rest.
Each job needs the others. Reading creates the facts. Refreshing keeps them true. Drafting turns them into a message. Sorting makes sure the best message goes out first.
What broke, and what changed
Three real problems from the build:
- Profiles showed up one character at a time. The saved facts were being turned into text twice before they reached the database, so the app stored a string instead of a set of facts. The fix was one line. Finding it meant following the data from the extension to the database. The old broken records were repaired too.
- Reading failed on the live site. The AI key was missing from the hosting settings, so every profile read returned an error. Adding the key fixed it.
- The daily list worked out “warm” from scratch on every load. That was slow. The app now saves a “warm” flag on each contact when a reply or call is logged, and the list reads the flag.
AI wrote each fix in seconds. A person still had to find the cause.
Who did what
AI handled the breadth. One feature often meant a database change, a server route, types, queries and screens. Claude Code wrote all of those in one pass, and I reviewed the whole change before it went in.
People handled the decisions:
- What to build. AI will build whatever you describe, even the wrong thing.
- The limits. Saving the old version before a refresh, the 5-in-90-days cap, and the lock that stops two refreshes at once were my calls about keeping data safe.
- The ranking. “Replies count more than dates” is a product decision. AI wrote the query. It did not have the idea.
- Security. Limits on the AI routes, checks on Stripe’s messages, and making sure each user only sees their own contacts were deliberate choices, not AI suggestions.
AI made me faster at writing code. It did not make the decisions.
Before you add AI to your product
Ask these, whether you build it yourself or hire someone:
- Which job is it: read, refresh, draft or sort? Name it. “Add AI” is not a job.
- What does a person check before it reaches a customer? Here, every message is read and sent by the user.
- What is the limit? How often can it run per customer, and what does that cost?
- What happens to the old data? Save it before you replace it.
- What happens when the AI returns junk? The app should show an error, not save garbage.
You don’t need to know how the AI works inside. I pick which jobs it does, set the limits, and check its work. You decide what the product should do for your customers.
More on keeping an app like this healthy after launch: Troubleshooting a Live App. On reviewing what AI writes: How I Review AI-Written Code.
The short version
I built O Sequencer around four AI jobs: read a profile, keep it fresh, draft the message, sort the day’s list. AI wrote most of the code and does the reading and drafting. People chose the jobs, set the limits, found the causes of bugs, and still send every message.
Tell me one task in your business that eats hours each week, and I’ll tell you which of the four AI jobs fits it and what a person should still check.
Which task in your business would you automate first?
- Stack: Next.js, Clerk auth, Neon Postgres, Stripe, a Chrome Manifest V3 extension, OpenAI GPT-4.1 models.
- Read (extraction):
gpt-4.1-nano,temperature: 0,response_format: { type: "json_object" }so the model returns plain JSON with no markdown fence. Input capped at 8,000 characters. One shared prompt body for new contacts and re-extraction, so the two schemas can’t drift apart. - Refresh (enrichment): before the update,
description,warm_introandprofile_intelare pushed as a dated snapshot onto aprofile_intel_historyJSONB array. The update setsindustry = COALESCE(NULLIF(industry, ''), new), so it only backfills. The 5-per-90-days cap is checked inside the same transaction, underFOR UPDATE, so two clicks can’t both pass. - The double-encoding bug:
JSON.stringify()on a JSONB value made Postgres store a JSON string, not an object. Fixed by passing the object throughsql.json(), plus a one-off repair of the stored rows. - Draft (generation): the system message holds the prompt, the user message holds the template plus a plain-text context block built from the profile facts. The user picks nano, mini or full GPT-4.1 per draft.
- Sort (queue): one SQL query joins enrollments, contacts, steps and campaigns, works out each due date from the last touch plus the step’s day offset, and orders warm contacts first. The first version detected “warm” with a correlated subquery over the touch log. A later migration replaced it with a stored
is_warmcolumn, set when a touch is logged with a warm outcome (reply,video_call,telephone,in_person). - Hardening: CHECK constraints (step types are limited to seven values), audit columns, performance indexes, user roles, and a subscription check on the API routes, each in its own migration.
- Workflow: each feature started as a plan agreed with Claude Code, then one change across migration, query, route, types and UI, reviewed as a whole diff before merge. Example: the conversation history feature added a
conversationstable, GET/POST/PATCH routes, a collapsible section with outcome dropdowns, and a “Save Conversation” button in the extension.
More Posts
All posts
November 25, 2026
Why Your App Went Offline on Vercel's Free Plan (and How to Stay Under the Limits)
Vercel's free plan pauses every site on the account when one monthly limit runs out. What the limits mean in plain words, what uses them up, and the fixes, from a real case.
November 24, 2026
Why Your Project Starts With a Small Paid Step: Requirements and an Estimate Before the Build
A price given before the work is measured is a guess, and someone pays for it later. What a small paid first step gets you: written decisions, a cost range and a time range, and the choice to stop there.