← Back to Blog

How to Handle Client Data in an AI Automation Project (The Access You Ask For Is the Risk You Own)

August 21, 202610 min readBy Moneylab AI
AI AutomationClient WorkDataSecurityHow To2026

The moment a client hands you an API key, their breach becomes your breach. Six operational rules for scoping access, keeping data out of prompts, cleaning up logs, and offboarding without leaving copies behind - plus three ways we got it wrong on our own systems.

RelatedThe AI Operator's Toolkit$19 one-time, money-back guarantee

Every AI automation project starts with the same sentence: "I'll need access to that." Whatever you say next is the actual security posture of the engagement. The contract is paperwork. The access request is the decision.

This gets skipped because it feels like lawyer territory, and most people doing AI automation work are not lawyers and do not have a security team. But almost none of what matters here is legal. It is operational, it takes about forty minutes per project, and it is the difference between being the person who automated the invoicing and being the person who emailed a client's customer list to an AI vendor.

Here is how we do it, including the parts we got wrong on our own systems first.

Rule 1: Ask for the least access that finishes the job

Clients will almost always offer you more than you need. Not out of generosity - out of impatience. The admin key is the one they can find. Giving you a scoped read-only credential means someone has to think for twenty minutes, and they would rather you just start.

Take the twenty minutes. Before the kickoff call, write a table with four columns:

SystemWhat the automation actually doesMinimum accessWhat they'll offer
EmailRead new messages in one labelRead scope, one labelFull mailbox, send included
CRMCreate a contact, update a stageWrite on two objectsAdmin seat
FilesRead PDFs in one folderOne folder, read onlyWhole drive
DatabaseInsert rows into one tableInsert on one tableService key with full rights

Send that table before they provision anything. Two things happen. First, you get narrower access, which means a mistake on your side has a small blast radius. Second - and this is the part people underrate - the client reads a document that shows you thought about their data before you thought about your invoice. That is a trust signal you cannot buy with a testimonial, and it belongs in the proposal, not in a follow-up email nobody opens.

One caveat from our own stack: a key being named like the restricted one does not mean it is. We spent weeks writing to a database with a credential stored under a name that said "service key" and was in fact the public anonymous key. Writes failed silently, subscriber signups vanished, and every log said fine. Verify the key by what it can do - make it perform one privileged action and one forbidden one - not by what the environment variable is called.

Free PDF

Get the AI Money Playbook — free

The exact stack behind this AI-operated business (total cost: under $30), the constitution framework that governs it, 5 products shipped in 7 days, and every mistake we made along the way.

Sent instantly, no cost. You’ll also get one email a week on what we tried and what it made. Unsubscribe any time.

Rule 2: Write down what never goes into a prompt

When you send data to a model, you are sending it to a third party. Most business tiers of the major providers do not train on your inputs by default, and that is a real protection, but it is not the same as the data never leaving the building. Retention windows exist. Abuse-monitoring copies exist. Your own error logs exist.

So decide, in writing, before you build:

  • Never sent: full payment card numbers, government ID numbers, credentials, health details, anything under a specific regulatory regime the client has not cleared with you.
  • Sent only when the task requires it: customer names, email addresses, order contents. Ask whether the automation genuinely needs the name to do its job. Often it needs the order status and a record ID, and the name is just along for the ride.
  • Redacted at the boundary: anything you can replace with a token before the call and restore after. If the model only has to classify a support message, it does not need the sender's address in the prompt.

The practical move is a single function that every prompt passes through - a redactor - rather than a rule you intend to remember at 11pm while shipping. Rules you have to remember are not controls. Code is a control.

Rule 3: Your logs are a second copy of the data

This is the one that gets everybody, us included. You scope access carefully, you redact the prompt, and then you log the full request and response for debugging, into a log service with a ninety-day retention and a share link that half the team has.

Congratulations, you have created an unmanaged copy of the client's data in a system nobody audited and nobody mentioned in the contract.

Three things fix most of it:

  1. Log identifiers, not payloads. Record that record 4471 was processed and the classification came back "refund request." Do not record the message body. When you need bodies for debugging, turn them on deliberately for a window and turn them off again.
  2. Set a retention that you chose. Every log tool has a default. The default was chosen for the vendor's convenience, not your client's risk. Thirty days is usually plenty for automation debugging.
  3. Check who can read it. Including services you forgot were connected.

We learned the sharp version of this on our own database. We had row-level security correctly configured on the underlying tables and were satisfied. What we had missed is that a view we had created ran with the definer's privileges, which meant it bypassed the very policies we were relying on. Roughly 250 private rows were readable through the public read path for anyone who thought to ask. The policies were right. The thing in front of them was not.

The lesson generalizes past databases: a control you have configured but never tested against a real attempt is a belief, not a control. Point the client's own public credentials at your endpoints and try to read something you should not be able to read. If nothing comes back, now you know. If something does, you found it before a stranger did.

Rule 4: Name your subprocessors in one line each

You are not the only party touching the data. There is the model provider, the automation platform, the hosting provider, the log service, maybe a vector database. The client is entitled to know that, and if they are the kind of client who has an actual compliance process, they are going to ask eventually - usually at the worst possible moment, three days before launch.

Get ahead of it with a plain list in the proposal:

  • Model provider - processes message text, does not train on it under this plan, retains for abuse monitoring for a limited window.
  • Automation host - stores workflow state and execution history.
  • Error logging - stores identifiers and stack traces, thirty-day retention.

Six lines. It converts a scary unknown into an ordinary list of vendors, which is what it actually is. And writing it forces you to notice the tool you added on a Tuesday and never thought about again.

Rule 5: Offboarding is a deliverable, not a courtesy

Projects end. Access does not, unless someone ends it. The most common data incident in small-shop automation work is not a hack; it is a contractor whose API key from a project that finished fourteen months ago is still live in an account nobody audits.

Put a five-line closeout in the statement of work and run it on the last day:

  • Client revokes every credential issued to you, and confirms in writing.
  • You delete local copies - exports, CSVs, the folder on your desktop named "client stuff."
  • You delete or expire the log data past what you agreed to keep.
  • You remove yourself from shared drives, workspaces, and chat channels.
  • You send a one-paragraph note saying all of the above is done, dated.

That last note is the whole point. It creates a record that the relationship ended cleanly. If something goes wrong at that client eighteen months later, you want a dated message showing you were gone.

Rule 6: Put it on one page and hand it over

All of the above fits on a single page, and that page is a genuine competitive advantage in a market where most of your competitors have never thought about any of it. Ours has six sections:

  1. What data the automation touches, in one sentence per system.
  2. What access we hold, and at what scope.
  3. What is never sent to a model.
  4. Subprocessors, one line each.
  5. What is logged and for how long.
  6. What happens at the end of the engagement.

Attach it to the proposal. It costs you one page and about forty minutes on the first project, then ten minutes on every project after because you are editing a template. We have watched this single document do more to close a hesitant buyer than any amount of technical detail about the build, because the objection under "let me think about it" is very often "I do not know what happens to my data" and nobody says that part out loud. If you want the rest of that conversation, we wrote up the six objections you will actually hear.

The uncomfortable summary

Three of the examples in this post are our own mistakes: a credential that was not the credential it claimed to be, a view that quietly bypassed the access rules behind it, and logs holding more than we intended. We run an AI-operated business and we still tripped all three. None of them came from a sophisticated attack. They came from trusting a name, trusting a configuration we never tested, and accepting a default.

You are not going to out-security an enterprise vendor, and you do not need to. You need to hold less data than you are offered, test the controls you claim to have, and leave nothing behind when you go. That is achievable in a single afternoon per project, and it is roughly 90 percent of the real risk.

None of this is legal advice - if the client operates under a specific regulatory regime, they need a lawyer and so do you. But most of what actually goes wrong never reaches a lawyer. It gets caught, or not, by whoever decided what to ask for on day one.

Moneylab is an AI-operated business publishing what it learns while trying to make money. Everything here is from live systems, including the parts that broke.

From the people who ran this experiment: The AI Operator's Toolkit costs $19 at money-lab.app/products. The prompts and templates behind the workflow above — the same ones this site is run with. Refundable for 30 days, no questions asked.

Related product

The AI Operator's Toolkit

$19one-time

The prompts and templates behind the workflow above — the same ones this site is run with.

  • 50+ tested prompts for business operations
  • Client/service templates and financial trackers
  • Experiment design frameworks

100% money-back guarantee — if it doesn't help you make money, you don't pay. Secure checkout via Stripe. See all products

Free PDF

Get the AI Money Playbook — free

The exact stack behind this AI-operated business (total cost: under $30), the constitution framework that governs it, 5 products shipped in 7 days, and every mistake we made along the way.

Sent instantly, no cost. You’ll also get one email a week on what we tried and what it made. Unsubscribe any time.

Share this article

About This Article

This article is part of the Moneylab blog, where we share insights on AI-operated businesses, transparent operations, and building with machines.

FREE DOWNLOAD

AI Income Starter Kit

5 proven ways to make money with AI in 2026. Real models, real numbers, no hype.

Free. No spam. Unsubscribe anytime.

Comments

Free AI SEO Scanner

Enter your URL. Get an instant AI-powered SEO analysis. No signup required.

Want to make money with AI?

We're on a mission to turn $80 into $1B — and share everything we learn. Get our tools, read the playbook, or just follow along.