Automation · Legal and compliance
How to build data subject request automation
A request arrives with a thirty day clock and the first week goes on working out which systems hold anything. What follows is the model behind handling it, the prompts that build it, and what changes in production.
Built with Tray Headless
- System Request form
- Step Verify identity
- Step Search every system
- Step Assemble package
- System Requester
The inventory drives the search rather than somebody remembering, and identity is verified before anything is disclosed.
The short answer
What is data subject request automation?
Data subject request automation is four parts: a system inventory that drives the search rather than somebody remembering, identity verification before anything is disclosed, a statutory clock started at receipt rather than at triage, and a record of what was searched including the systems that held nothing. Where this usually goes wrong is the inventory. Searching from memory guarantees a system gets missed, and a response that omits data you hold is a breach of the response, not a gap in it.
What matters here
- Search from an inventory, not from memory. The system somebody forgets is the one that makes the response wrong.
- Verify identity before disclosing anything. Handing a data export to an impersonator is a worse breach than a late response.
- Start the clock at receipt. Statutory deadlines do not wait for somebody to notice the request.
- Record the systems that held nothing. A negative result is evidence and it is the half people never keep.
- Deletion needs a legal-hold and retention check first. Some records cannot be deleted and saying so is the correct answer.
Who this is for
You run privacy operations, legal or data protection. Requests arrive by several routes, the search is manual, and the evidence that it was done properly is an email thread.
How it works in practice
The sequence, from a request arriving to a defensible response going out.
- 1
Requests are taken from every route they arrive on
A form, the privacy inbox, support, and sometimes a letter. All of them start the clock.
- 2
Identity is verified before anything is searched
Proportionate to what is being asked for, and always before disclosure.
- 3
The inventory drives the search
Every system on the register is searched, including the ones that will hold nothing.
- 4
Results are assembled with their source
What was found, where, and what was excluded under an exemption with the reason.
- 5
Legal reviews before anything is disclosed
Third-party data, privileged material and exemptions are judgements rather than rules.
- 6
The response is delivered and the whole thing recorded
Including the systems that held nothing, because a negative result is evidence.
What DSR automation is made of
Four parts. The first is what makes the response defensible.
An inventory-driven search
The register of systems holding personal data drives the search. Anything not on it is invisible, which makes maintaining it the real control.
Identity verification
Proportionate and before disclosure. Disclosing to an impersonator is a considerably worse outcome than a late response.
A statutory clock
Started at receipt, tracked against the deadline, with an extension recorded and justified when one is taken.
A complete record
What was searched, what was found, what was excluded and why, and which systems held nothing.
The Tray Headless prompts
Paste these into Claude Code or Codex with the Tray Headless plugin installed. Each stage runs on its own. The systems named in them are the worked example rather than a requirement, and every prompt says so.
Once per project, run
/tray-workflows:set-workspace
to pick the workspace these build in. Point it at a sandbox first.
- 1
Set up, then build the system inventory first
The inventory is the control. Everything else is mechanism.
Headless skills
build-workflowUse build-workflow. The systems in play are Salesforce, Zendesk, Marketo, Snowflake, Google Drive, Gmail and Jira, or whatever we run in those seats. Before you plan anything, tell me which of them are already authenticated in the workspace, because I do not want a connector stubbed that I have not authenticated. Then build the personal data inventory as a table: system, what personal data it holds, how to search it by email and by name, whether search is automated or manual, an owner, and a retention rule. This table is the control. Anything not on it will not be searched, and a response that omits data we hold is a failure of the response, not a gap in it. Flag any system with no automated search route. Those become tracked manual tasks with a deadline, not something somebody remembers.
The inventory needs re-reviewing on a schedule. A new system adopted six months ago and never added is exactly how a response ends up incomplete.
- 2
Take requests from everywhere, start the clock at receipt
The deadline does not wait for somebody to notice.
Headless skills
build-workflowUse build-workflow. Accept requests from every route: the privacy form, the privacy inbox, a support ticket flagged as a rights request, and a manual entry for anything arriving by post. Start the statutory clock at receipt, not at triage. A request sitting unread in an inbox for four days has consumed four days of the deadline. Classify the type: access, deletion, rectification, portability, restriction or objection. Each has a different path and a different answer. Record the jurisdiction, because the deadline and the exemptions differ, and a workflow that assumes one regime will be wrong for the other.
- 3
Verify identity before disclosing anything
Disclosing to an impersonator is worse than being late.
Verify before any search result is disclosed, proportionate to the request: A logged-in account holder confirming from the account is often sufficient An email-only requester needs a verification step Anything high risk, such as bulk export or deletion, needs stronger verification A request made on somebody else's behalf needs evidence of authority Verify before disclosure, and record how it was verified. Never disclose personal data to somebody who has only asserted an identity. A late response is a compliance problem; a disclosure to an impersonator is a breach, and one of those is considerably worse than the other.
- 4
Search everything on the inventory, including the empties
A negative result is evidence, and it is the half nobody keeps.
Headless skills
tray-gotchastray-patternsUse tray-gotchas, then search every system on the inventory, not the ones somebody remembers. Search on email, then on name, then on any other identifier we hold, such as a customer id or a phone number. People appear under a personal address in one system and a work address in another. Record a result for every system including the ones that found nothing. Searched and found nothing is evidence. Not searched is a gap, and after the fact the two are indistinguishable unless you wrote it down. Handle: a system that is down, which retries and then escalates rather than being silently skipped; a match that is a different person with the same name, which needs a human; and free text fields such as support notes, where personal data hides in a paragraph instead of a field.
- 5
Handle deletion carefully, and track the clock
Some records cannot be deleted, and saying so is the right answer.
For a deletion request, check before deleting anything: A legal hold, which overrides the request entirely A retention obligation, such as financial records that must be kept A contract still in force A legitimate interest that has been assessed and documented Where data cannot be deleted, respond saying so with the reason. That is a correct response, not a failure, and the reason is what makes it defensible. Where it can, delete and verify, including in backups per the documented policy, and record what was deleted and when. Then track the clock: days remaining on every open request, anything inside a week of its deadline, and an extension only where the regime allows one with the justification recorded.
- 6
Validate it, then hand the inventory to privacy
Because the inventory is never finished.
Run the per-step schema checks and the whole-workflow audit before this touches production. Test with a request for somebody who exists in several systems under different addresses, which is the case that finds the gaps. Then open the same workflow in Tray Build so the privacy team can maintain the system inventory, the retention rules and the verification thresholds in the visual canvas. New systems are adopted constantly and an unmaintained inventory is the failure mode.
What it connects to
Personal data is everywhere, which is why the inventory instead of the integrations is the control.
Salesforce
Search contacts, leads and every free text field, usually the largest single store of personal data.
Reads and writes
Zendesk
Search tickets and their conversations, where the most sensitive free text tends to sit.
Reads and writes
Marketo
Search the marketing database and honour deletion and suppression together.
Reads and writes
Snowflake
Search the warehouse, including derived tables, which are frequently forgotten and frequently in scope.
Reads and writes
Google Drive
Search documents where personal data has been exported into a spreadsheet somebody made.
Reads
Gmail
Acknowledge the request and deliver the response, both timestamped against the statutory clock.
Reads and writes
Jira
Raise tracked manual tasks for systems with no automated search, with a deadline rather than a reminder.
Writes
Same build, other stacks
The design does not change if you run something else in one of these seats. The same prompts build it against Microsoft Dynamics 365, Google BigQuery, ServiceNow, SharePoint, Microsoft Outlook or HubSpot.
Named systems are the ones most teams run, not the only ones that work. Each is an authentication in your Tray workspace, referenced by name, so the workflow never holds a credential. Where we have a connector page, the name links to it.
Running it in production
This has statutory deadlines and produces disclosures. The record matters as much as the response.
It runs on the platform, not on somebody's machine
Searches across a dozen systems, retries and clock tracking run on the same engine, with a complete history per request.
The record is the deliverable
What was searched, what was found, what was excluded and why, and which systems held nothing. A regulator asks for the process as much as the outcome.
Credentials are managed, never in code
Search access across every system holding personal data is the broadest read permission in the company. Each is an authentication in your workspace, scoped and separately revocable.
Privacy owns the inventory
Systems, retention rules and verification thresholds open in Tray Build, maintained by the team accountable for the response.
Nothing is disclosed before verification
Late is a compliance problem. Disclosure to an impersonator is a breach, and the workflow should make the second one impossible.
Questions people ask
Why search from an inventory rather than from knowledge?
Because the system somebody forgets is the one that makes the response incomplete, and an incomplete response is a failure of the response, not an oversight. The inventory is the actual control.
Why record systems that held nothing?
Because a negative result is evidence. After the fact, searched and found nothing is indistinguishable from never searched unless somebody wrote it down at the time.
When should identity be verified?
Before anything is disclosed, and proportionately to what is being asked. A late response is a compliance problem; disclosing personal data to an impersonator is a breach.
What if data cannot be deleted?
Respond saying so with the reason. A legal hold, a retention obligation or a live contract are all valid grounds, and stating them is a correct response instead of a failure.
When does the statutory clock start?
At receipt, not at triage. A request sitting unread in an inbox for four days has already consumed four days of the deadline, and no workflow can recover them.
Vibe-coding app guides
Vibe-code an entire app with Helix
This moves the data between systems. It does not give anybody a screen to work in. Build that app in Claude Code, Codex or Cursor, then deploy and run it governed on Tray Helix. Same kind of guide, same kind of prompts.
How to build a data subject request tracker (opens helix.tray.ai in a new tab)
Related guides
Legal and compliance
How to build a consent and preference sync
Give consent one owner, propagate a withdrawal in seconds, keep the evidence, and never let a sync re-subscribe anybody. The Headless prompts that build it.
Data operations
How to build a customer 360 and master data sync
Pick a survivorship order per attribute, resolve identity on more than email, and publish a golden record every system can point at. The prompts.
Legal and compliance
How to build a contract lifecycle sync
Extract the obligations rather than storing a PDF, put renewal and notice dates where somebody will see them, and never let the signed version drift. The prompts.
Last reviewed September 2026.