How do you keep personal data out of an AI automation prompt?
Send the AI step only the fields it needs to do its job, and remove or mask names, emails, phone numbers, and free text that might hold personal details before the prompt is built. Then check where prompts and outputs get logged, and confirm in writing what your AI vendor does with the data you send.
AI steps have slipped into a lot of go-to-market automations. A form submission gets summarized for sales. A lead gets classified by intent. A reply gets drafted from a CRM record. Each of those steps sends data out of your systems to a model provider, often without anyone deciding what should go.
The default in most automation tools is to pass the whole record, because that is easiest. That is how a prospect's phone number, a support complaint, or a note about a health condition ends up in a prompt it never needed to be in. This article is about closing that gap.
What counts as personal data in a GTM automation?
Personal data is anything that identifies a person or can be tied back to them: names, email addresses, phone numbers, job titles combined with company names, IP addresses, and free-text fields where people describe their situation. In GTM automations, the free-text fields are the biggest risk, because nobody knows exactly what is in them.
A form field labeled "Tell us about your project" can contain anything. Some people write two lines about their budget. Others paste in customer names, internal details, or personal circumstances. When that field flows into an AI step, all of it goes along.
The exact legal definition depends on where you and your customers are, and which rules apply to you. I am not giving legal advice here. Check your own privacy policy and, for anything sensitive, with whoever handles legal and compliance for your company.
Why does personal data end up in prompts in the first place?
It ends up there because builders map whole records for convenience. In Zapier, Make, or n8n, it is quicker to drop the entire form submission or CRM record into a prompt than to pick fields one by one. The automation works, the output looks good, and nobody revisits the input once it ships.
Prompt templates make this worse. A template that says "Here is the lead record" followed by every field invites the model to use all of it. That increases the data you send and can make outputs less focused.
The fix is to treat every field in a prompt as a decision. If you cannot explain why the AI step needs a field, it should not be there. I applied the same thinking to sales summaries in whether an AI step should summarize form submissions for sales.
Which fields does an AI step actually need?
Usually far fewer than you think. A step that classifies lead intent needs the message text and company size, not the person's name or email. A step that drafts a reply may need a first name for the greeting, which you can add after the model writes the body. Start from the task and work back.
Write the task in one sentence, then list only the inputs that sentence requires. "Classify this inquiry as sales, support, or partnership" needs the inquiry text. It does not need the phone number. "Summarize the company's likely use case" needs company details, not the contact's personal information.
Keep identifiers outside the AI step and rejoin them afterward. Pass a record ID through the automation, send only the needed fields to the model, and then attach the model's output back to the record using that ID. The model never needs to know who the person is.
How do you strip or mask personal data before the AI step?
Add a cleaning step before the prompt. Remove fields you do not need, replace names and emails with placeholders, and scan free text for patterns like email addresses and phone numbers, replacing them with tokens such as [EMAIL] or [PHONE]. Then build the prompt from the cleaned values only.
In most automation tools, this can be a formatter step or a short code step that runs simple pattern replacements. It will not catch everything. A name written in a sentence is hard to detect reliably with simple rules. That is why field selection matters more than masking: the safest data is the data you never send.
Tell the model what the placeholders mean, so it does not get confused. A line like "Personal details have been replaced with placeholders such as [EMAIL]" keeps the output sensible and stops the model from guessing at the missing information.
What about logs and run history?
Logs are where personal data quietly piles up. Automation tools usually keep run history with inputs and outputs, and many teams also log prompts and responses for debugging. If the prompt contains personal data, so do the logs, often for much longer than anyone intended. Clean the prompt and you clean the logs.
Check how long your automation platform keeps run history and who can see it. Check the same for any logging table you built yourself in Airtable, a sheet, or a database. If you log prompts for debugging, log the cleaned version, not the raw record.
Logging still matters. You need a record of what each run did to debug problems and prove the automation behaves. I covered how to set that up in how to log every run of an AI agent workflow. The goal is useful logs without personal data, not no logs.
How do you check what your AI vendor does with the data?
Read the vendor's own documentation and terms for the exact product and plan you use, whether that is OpenAI, Anthropic, or another provider. Look for whether inputs are used for training, how long they are retained, and what options exist to reduce retention. Get the answer in writing, and recheck it when your plan or product changes.
Do not rely on a blog post or a forum answer for this, including this one. Vendor policies differ by product, by plan, and over time. The only answer that counts is the one in your vendor's current documentation and your contract.
If a client's data is involved, the client may have rules of their own. Ask before you build. It is much easier to design around a restriction at the start than to retrofit it after go-live.
How do you test that the protection works?
Send test records with fake personal data through the automation and inspect exactly what reached the AI step. Use obvious fake values, like a test email address and a made-up phone number, so you can search for them in run history and logs. If any of them appear in the prompt, the cleaning step has a gap.
Test free text deliberately. Write a test submission that buries an email address and a phone number in the middle of a paragraph, and confirm both are masked. Then test a record with an unusual format, such as a phone number with spaces or an international prefix.
Repeat the test whenever the form, the CRM fields, or the prompt changes. A new form field can bypass your cleaning step without anyone noticing. I described a broader approach to this in how to test an AI automation before it touches real customer data.
What should you do next?
List every automation in your stack that has an AI step. For each one, write down which fields go into the prompt and why. Remove anything you cannot justify, add a masking step for free text, check your logs, and confirm your vendor's data terms in writing. Start with the automation that handles the most leads.
This is not a one-time cleanup. Make "which fields go into the prompt" a question you answer before any new AI step goes live.
I build websites and the automations behind them for lead generation, and AI steps are now part of most of those builds. If you want help reviewing what your automations send to AI models, reach out and let's chat.
Get found, cited and the back office automated
Let's make your site the source AI engines quote and wire up the systems behind it.
Read more blogs
Let's get your website found and cited by AI
Tell me what you're working on, whether AI search is skipping your product, your back office is buried in manual work, or you need a build that does both.