This is a guest post by George Fakorellis.
The first thing most people do when they set up an AI marketing agent is export the customer list. One CSV, every column, dropped in "so the agent has full context." It feels thorough. It feels responsible, even.
It's also the one decision that turns a small mistake into a much bigger one.
The first question I ask about any new agent workflow is what the agent actually needs to see. An agent that writes subject lines, replies to reviews or triages support tickets needs a task and a slice of data. It does not need your customers. Below is how I tell the difference, why it matters for security as much as for compliance, and how I'd wire it.
Data minimization means the agent gets a task, not a database
Data minimization means an agent receives only the personal data its specific job requires. GDPR Article 5(1)(c)↗ says personal data must be adequate, relevant and limited to what is necessary for the purposes it is processed for. For an agent, the purpose is the task you gave it, not "marketing" in general.
Two neighbors of that rule in the same article matter just as much. Purpose limitation (Article 5(1)(b)) says data collected for one purpose shouldn't be processed in a way that is incompatible with it. Storage limitation (Article 5(1)(e)) says you keep identifiable data no longer than necessary. An agent that gets the full export "just in case" strains all three at once. PieEye's guide to balancing AI and data minimization↗ makes the same point about collecting data in case it becomes useful later, and it suggests auditing each AI use case separately and mapping which data feeds which model.
Here's the habit I'd start with. Before you connect any data, write the purpose in one sentence. "Write three subject lines for the abandoned-cart flow" is a purpose. "Improve our marketing" is a mood.
If you can't write the sentence, the agent isn't ready for any customer data at all. (Fine, that is also a useful finding.)
Most e-commerce agent jobs need a segment, not a person
Copy, reporting, review and support agents need aggregates, product data and the text of the task, not names or addresses. Only the step that actually sends a message needs an identity, and that step can be a plain tool with no model in it.
This is my own breakdown, not a regulator's list, so treat it as a starting point and adjust it for your stack:
| Agent job | What it needs | What it doesn't need |
|---|---|---|
| Abandoned-cart copy | Cart value band, product category, hours since abandonment | Name, email, address |
| Ad copy | The offer, product data, a description of the audience segment | Any customer-level rows |
| Review replies | The review text, the product, the star rating | The reviewer's name, email and order history |
| Support triage | Ticket text with names, emails and order numbers swapped for tokens, the issue category | The full customer record, payment details |
| Weekly performance report | Order counts, revenue, campaign IDs | Any customer-level rows |
| Subject line testing | Segment label, the segment's past open rate | Individual open history |
| Segment building | Rules and counts, run inside your email or CRM tool | A copy of the customer table |
| Sending | One recipient's email and first name, at send time | Order history, support notes, everything else |
The pattern is the same in every row. The model does the thinking on descriptions of groups, or on text with the identities taken out. A boring, deterministic tool turns a group into recipients. Your email platform already works this way when it merges a first name into a template, so none of this is exotic.
Two rows deserve a second look. Review replies and support triage are the jobs where the agent reads text a stranger wrote. A review or a ticket can carry instructions as easily as complaints, which is exactly the opening the next section is about.

The agent works on descriptions of groups. A tool with no model in it holds the identities. Simplified illustration.
Most checkout and CRM setups collect and sync more than any one job needs. PieEye's data collection guide↗ lists the usual culprits: optional fields with no purpose, data left over from retired tools, and event logs over-synced to the CRM. Clean those up first. An agent connected to a messy CRM inherits the mess, and then some.
A bigger context is a bigger blast radius
Whatever an agent can read, an attacker can try to make it repeat. Prompt injection hides instructions inside content the agent processes, and OWASP lists it first in its Top 10 for LLM applications as LLM01: Prompt Injection↗. The more customer data within the agent's reach, the more one poisoned input can take.
The cleanest example I know is ForcedLeak↗, which Noma Security reported to Salesforce on July 28, 2025. An attacker filled in a public Web-to-Lead form and hid instructions in the Description field. Later, an employee asked Salesforce's Agentforce agent to process that lead. The agent followed the hidden instructions and put CRM data into an image request to a server the attacker controlled. Noma rated it critical, CVSS 9.4. Salesforce began enforcing Trusted URLs for Agentforce on September 8, 2025, and the finding went public on September 25.
Read that again from a marketer's seat. The lead form is something you built to get leads. It is also a text box any stranger can type into, which an agent will later read. Every review field, support ticket and contact form is the same kind of door.
Simon Willison has a tidy way to think about this, which he called the lethal trifecta↗ in June 2025. An agent becomes dangerous when it combines three things: access to your private data, exposure to untrusted content, and the ability to communicate externally. His advice is to avoid that combination entirely, and he says plainly that "we still don't know how to 100% reliably prevent this from happening."

Three ingredients of a data leak through an agent, after Simon Willison's "lethal trifecta". Minimization removes the first one.
You can't stop strangers typing into forms, and you probably want the agent to send emails. The leg you control is the first one. That's the whole security case for minimization in one line: data the agent never saw can't be leaked by the agent.
Filters are patches, a narrow scope is the control
An output filter can be bypassed, and it has been. Narrowing what the agent can read keeps working when the filter doesn't, because there is less to leak. If I had to pick one control, I'd pick scope over filtering every time.
Here is the case I mean. Salesforce's answer to ForcedLeak was Trusted URLs, a control meant to stop the agent's output from reaching untrusted addresses. In June 2026, Zenity Labs reported SalesBleed↗, which they describe as a 0-click attack on Agentforce. The entry point was again a public Web-to-Lead form with a hidden prompt injection. The victim only had to ask their own agent something ordinary, like checking the latest leads.
The bypass came from two edge cases in the URL redaction. It only recognized a fixed set of domain endings, and the .fun ending wasn't on the list. And adding characters such as curly braces or square brackets to the end of a URL meant the redactor left it alone, while the chat surface still treated it as a link. Zenity describes one attack chain with two exit routes: an image tag the chat surface rendered on its own, and Slack's automatic link previews for agents published to Slack. Either way the data sat in a subdomain, so it left through the DNS lookup before any page loaded. Salesforce fully confirmed its fixes on August 18, 2026, and Zenity confirmed the fix for the reported bypass on August 19.
Zenity's examples of what could leak were account data such as a company name and a deal size. That's fixed now. But look at what it shows: a filter was the defense in both rounds, and the second round found a hole in it.
OWASP's LLM01 page agrees with the spirit of this. Its mitigations include enforcing least privilege, requiring human approval for high-risk actions and segregating external content, and it says "it is unclear if there are fool-proof methods of prevention for prompt injection." Least privilege shrinks the damage. It doesn't stop the injection. That's why I want the damage to be small.
Two authors put it more bluntly. Brett Frischmann, a law professor, and Bruce Schneier, a security technologist, argue in Data Minimization is Imperative for the Age of AI Agents↗ (Tech Policy Press, November 18, 2026) for legally enforceable data minimization rules for AI agents, and put it this way: "There's no better way to prevent a bad actor from stealing data than to delete it."
Tokenize before the model, check the output after it
Some jobs can't run on segments alone. A support agent has to read the ticket, and the ticket has a name, an email and an order number in it. For those jobs I'd swap the identifiers for tokens before the AI step and put the real values back after it, in code.
In practice it works like this:
- A plain script scans the ticket or review and replaces each identifier with a placeholder, such as [CUSTOMER_1], [EMAIL_1] or [ORDER_1]. The mapping from placeholder to real value goes into a table the model can't reach.
- The model reads the tokenized text and drafts its reply using the same placeholders.
- After the model is done, the script restores the real values from the mapping table, at send time, inside your own system.
Then check what comes out before anything ships. A model can paste personal data where it shouldn't, and it can invent details that sound right. So the output passes a code check:
- No personal data where none should be. Scan the draft for email addresses, phone numbers and card-like numbers, and for any placeholder that wasn't in the input.
- No invented facts. Every order number, delivery date and price in the draft must match a value you passed in. A model that writes "your order #48213 arrives on Friday" when neither was in its input gets blocked.
- A person for the exceptions. Anything that fails a check goes to a human instead of the customer.
None of this makes the workflow risk-free. Pattern checks miss things, and a tokenized ticket is still personal data, which is where the legal side comes in.
Pseudonymized is not anonymous, and the contracts still matter
Swapping a name for a token, or hashing an email, is a good safeguard but it doesn't take the data out of the GDPR. GDPR Article 4(5)↗ defines pseudonymisation as processing data so it can no longer be attributed to a specific person without additional information, kept separately and protected. Recital 26↗ says data that could be attributed to a person by using that additional information should be considered information on an identifiable person. Only truly anonymous information falls outside the rules.
The European Data Protection Board's Guidelines 01/2025 on pseudonymisation↗, adopted in January 2025 as a version for public consultation, explain pseudonymisation as a safeguard that can reduce risks. Reduce, not remove. The mapping table from the tokenization step above is exactly the kind of additional information that keeps the data personal, so it needs its own protection.
This matters because hashing is the shortcut that's easiest to reach for. The thinking goes: if I hash the email before pasting the table into the agent, it's no longer personal data, so I can skip the rest of this article. It doesn't work that way. If you can map the hash back to a customer, or your vendor can, it is still personal data, and Article 5 still applies.
Two more parts of the law apply the moment customer data reaches an AI vendor.
- Processor contracts. When a model provider processes personal data on your behalf, it acts as your processor, and GDPR Article 28↗ requires a contract that sets out the subject matter, duration, nature and purpose of the processing and the type of data. Among other things, the processor may act only on your documented instructions, must keep the data secure, needs your authorization for sub-processors, and must delete or return the data when the service ends. Check the vendor's data processing agreement before the first real record goes in, including whether your inputs are used to train its models.
- Transfers outside the EEA. Chapter V of the GDPR↗ only allows a transfer to a country outside the European Economic Area on a legal basis. For the United States, the European Commission adopted its adequacy decision for the EU-US Data Privacy Framework↗ on July 10, 2023, and it covers US companies that participate in the framework. For other vendors, the usual tool is the Commission's standard contractual clauses↗, adopted on June 4, 2021. Ask where the vendor processes the data, not only where it is incorporated.
Hashing, tokens and ID swaps are still worth doing. Treat them as a layer of defense, not an exit. I'm a marketer, not a lawyer, so check your specific setup with your data protection officer or counsel before relying on any of this.
Six rules I'd wire into an agent before it touches customer data
Give each agent job a written purpose, split thinking from sending, allowlist fields in code, treat every input as hostile, check the output in code and delete on a schedule. None of it needs special tooling.
- Write the purpose sentence. One line per agent job, saved next to the workflow. If the job changes, the sentence changes first.
- Split think from send. The agent works on segments, IDs and tokens. A plain tool, with no model, looks up recipients, checks the consent flag and merges the name and address at send time.
- Allowlist fields in code, not in the prompt. If a column isn't on the list, it never reaches the model. A prompt that says "ignore the email column" is a polite request.
- Treat every input as hostile. Lead forms, reviews, tickets and survey answers are text a stranger wrote. Label or strip them before the agent reads them, and put a human approval in front of anything that sends or exports data.
- Check the output in code. Block personal data that shouldn't be there and any order number, date or price that wasn't in the input.
- Delete on a schedule. Abandoned-cart records, token mapping tables, exports from retired tools and old test lists all go. The cheapest data to protect is the data you no longer have.
These rules shrink what can go wrong. They don't make a workflow risk-free. Tokenized data is still personal data, filters can be bypassed, and the processor contract and transfer basis still have to be in place.
What less data costs you, and what it doesn't
Minimization costs you some build time and a mapping layer. I couldn't find solid numbers on how much agent output quality drops with less customer data, so I won't invent one. The jobs in the table run on segments, product data and tokenized text anyway.
The honest trade-off is one-to-one personalization. A message that says "you bought these shoes in March" needs an individual's history somewhere. My answer is to keep that inside the system that already holds the customer data, your email or CRM platform with its consent records, and let the agent write the template that platform fills in. The agent writes the shape of the message. The platform fills in the person.
You also don't have to take my word for any of this. Run the same job twice, once with the extra columns and once without, and compare the output side by side. If the version with the full export isn't clearly better, you have your answer. If it is, you've learned which field earns its place, and you can add that one field and write down why.
Back to the CSV
Go and find that customer export, the one with every column, and take it out of the agent's folder. Give the agent a segment table and a one-sentence purpose instead. If the output gets worse, you now know exactly which field to add back, and you can justify it in writing. If it doesn't, you've just shrunk what an attacker, a vendor mistake or your own future self could expose.
Smaller is not the same as safe. You still need the processor contract, a lawful basis for any transfer, the output checks and a person in front of anything that sends. But it's the cheapest risk reduction I know. The agent will not miss your customers' addresses. It never knew them in the first place.
About the Author
George Fakorellis writes growthvibes.ai↗, a playbook for running marketing and growth with AI agents and automations. He builds agent workflows for SEO and AEO, and before that worked at Moosend, Wealthyhood and Synthesia.
