Automation · Legal and compliance
How to build audit evidence collection
Six weeks before the audit, the compliance team sends forty requests to twelve teams for screenshots of settings, exports of users and copies of tickets. Half come back dated the week they were taken, which proves nothing about the other fifty weeks. The model behind evidence collected as the year goes, the prompts that build it, and what it takes to keep it current.
Built with Tray Headless
- System Control list
- Step Collect on schedule
- Step Check it is complete
- Step Attach to the control
- System Drata
Evidence is collected on each control's own schedule, with its date and source, and a missing piece is chased the week it goes missing.
The short answer
What is audit evidence collection?
Audit evidence collection has four parts: a map from each control to the systems and records that prove it, collection on each control's own schedule with the date and the source attached, a completeness check that chases the owner the week a piece goes missing, and one place where the auditor finds every piece for the whole period. The usual failure is collecting at the end. Evidence gathered in the weeks before an audit shows the controls on those weeks, and a gap found then cannot be fixed for the months already gone.
Stage 7 of 7: Audit evidence. Part of Compliance automation, end to end : every stage, the systems it runs on and the guide that builds it.
What matters here
- Map every control to the record that proves it. A control nobody can point to a record for is a gap already.
- Collect on the control's own schedule. A quarterly control needs four pieces of evidence, not one taken in the last quarter.
- Attach the date and the source to every piece. Evidence without a date proves nothing about the period.
- Chase gaps the week they open. A missed quarter can be explained in that quarter, not fixed a year later.
- Keep the evidence where the auditor already looks. A second place to search is a second place to miss.
Who this is for
You run compliance or GRC. Your audits cover SOC 2, ISO 27001 or SOX controls, the evidence lives in a dozen systems, and every audit starts with weeks of requests to other teams.
How it works in practice
What happens through the year, so the audit starts with the evidence already there.
- 1
Each control is mapped to its evidence
The control, how often it runs, the system that holds the proof, what the proof is, and who owns it.
- 2
Evidence is collected on each control's schedule
Daily, monthly, quarterly or yearly, pulled from the source system, never asked for by email.
- 3
Each piece is checked as it arrives
Is it there, is it from the right period, and does it show what the control says, such as every leaver removed within a day.
- 4
Gaps go to the owner that week
A missing or failing piece goes to the control owner in Slack, with what is missing and a ticket to fix or explain it.
- 5
Evidence is attached to the control
In the compliance tool, with its date and a link to the source, and kept in the warehouse for the whole period.
- 6
The auditor gets one place to look
Every control, every period, every piece, with exceptions and their explanations alongside.
What audit evidence collection is made of
Four parts. The first is what the rest depends on.
A control-to-evidence map
Each control linked to the system, the record and the owner that prove it, with how often it should run.
Scheduled collection from the source
Evidence pulled from the system that holds it, on the control's own schedule, with its date and source attached.
A completeness check
Every expected piece checked for presence, period and content, with gaps sent to the owner the week they open.
One place for the period
Evidence attached to its control in the compliance tool and kept in the warehouse, so a sample is a lookup.
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 map each control to its evidence
Collection can only find what the map points at.
Headless skills
build-workflowUse build-workflow. The systems in play are Drata, Okta, Workday, GitHub, Jira, AWS, Google Drive, Slack and Snowflake, 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 a table from our control list: control, how often it runs, the system that holds the proof, what the proof is (a report, a list, a setting, a ticket), what a pass looks like, and the owner. Flag every control where the proof is a screenshot or an email today. Those are the ones to move to a system read first.
- 2
Collect on each control's own schedule
Evidence for the whole period, collected during the period.
Headless skills
build-workflowtray-patternsUse build-workflow and tray-patterns. For each control on the map, collect its evidence on its own schedule: Settings, such as multi-factor sign-in required in Okta or encryption on AWS storage, read and saved each month Lists, such as leavers from Workday matched to accounts removed in Okta, each week Records, such as access review results, policy acceptances and change approvals, as each cycle closes Save each piece with the date it was collected, the period it covers, the system it came from and a link back to the source. Never ask a person for something a system can be read for.
- 3
Check each piece as it arrives
A piece that is there but shows a failure is still a gap.
For every piece collected, check three things: It arrived for the period it should cover It comes from the system the map names It shows a pass, for example every leaver removed within the agreed time, or every change with an independent approval Mark each piece as pass, fail or missing. Do not fill a missing piece from a later period. A gap recorded as a gap can be explained; a gap filled with the wrong date cannot.
- 4
Chase gaps the week they open
A missed quarter can only be explained in that quarter.
Headless skills
build-workflowUse build-workflow. For any piece marked fail or missing, message the control owner in Slack with the control, what is missing or failing, and a button to open a Jira ticket to fix or explain it. Remind once after five working days. If the ticket is still open after ten, tell the head of compliance. Keep the ticket and its explanation with the evidence. An auditor reading a failure with a dated explanation and a fix sees a control that works.
- 5
Attach to the control and keep the period
The auditor should have one place to look.
Attach each piece to its control in Drata with its date, period and source link. Write the same record to Snowflake with the pass, fail or missing result and any ticket. Report monthly: controls with all evidence present, controls with gaps, gaps open longer than ten days, and controls whose proof is still a screenshot. When the auditor sends a sample, answer from Snowflake: the pieces for those controls and periods, with links back to each source.
- 6
Check it end to end, then hand the map to compliance
Because the control list changes every year.
Run the per-step checks and the whole-workflow audit before this touches production. Test with one control whose evidence is missing and one whose evidence shows a failure, and confirm both reach the owner. Then open the same workflow in Tray Build so compliance can add controls, change owners and schedules, and point a control at a new system in the visual canvas.
What it connects to
The proof lives in the systems that run each control. The compliance tool is where it is gathered, and the warehouse is where it is kept.
Drata
Read the control list and attach each piece of evidence to its control with its date and source.
Reads and writes
Okta
Read sign-in settings, multi-factor rules and removal dates, which back most access controls.
Reads
Workday
Read joiners and leavers, so removals and policy acceptances can be checked against real dates.
Reads
AWS Generic Connector
Read storage encryption, logging and access settings for the infrastructure controls.
Reads
Google Drive
Store documents a system cannot produce, such as signed reviews, with their date.
Reads and writes
Snowflake
Keep every piece with its result for the whole period, so an audit sample is a query.
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 Google BigQuery, Microsoft Teams, Azure Active Directory, SAP SuccessFactors, ServiceNow or SharePoint.
Connections in this build
Field mapping, templates and common problems for each pairing: Drata + Okta, Okta + Workday REST, Drata + GitHub and Drata + AWS Generic Connector.
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 is what your auditor reads. It has to be complete, dated and traceable back to the source.
It runs on the platform, not on your laptop
Collection runs on each control's schedule all year, with a full history of every run.
Every piece has a date and a source
Each one carries when it was collected, the period it covers and a link back to the system it came from.
Credentials are managed, never written into the build
Read access across the identity provider, cloud accounts and code host is broad. Each is a separate authentication in your workspace, scoped to read.
Compliance owns the map
Controls, owners and schedules open in Tray Build, changed by the team that runs the audit.
Gaps are recorded, never filled
A missing piece stays missing with its ticket and explanation. Filling it from another period is the one thing that turns a gap into a problem.
Questions people ask
Why not collect evidence just before the audit?
Because evidence taken then shows the controls in those weeks only. An audit period is usually a year, and a gap found at the end cannot be fixed for the months already gone.
We already have a compliance tool. Why build this?
Compliance tools read many settings on their own. The evidence they cannot read, such as leavers matched to removals, change approvals or policy acceptances, comes from your other systems, and this is how it gets there on schedule.
What happens when evidence shows a failure?
It goes to the control owner that week with a ticket to fix or explain it. The failure, the explanation and the fix are kept together with the evidence.
Can compliance change the controls without engineering?
Yes. The control map, owners and schedules open in Tray Build, so a new control or a new system is a change to the map.
Does this make us compliant?
No workflow does that. It collects the evidence on time and shows the gaps early. Your auditor still decides whether each control works.
Related guides
Legal and compliance
How to build a user access review
List who can reach each in-scope app from the app itself, send each reviewer only their own people, remove what nobody confirms, and keep the record an auditor samples. The prompts.
Legal and compliance
How to build change approval evidence
Tie every production change to a ticket, a reviewer who did not write it and a passing test run, catch the ones that skipped a step, and keep the record. The prompts.
Legal and compliance
How to build policy attestation tracking
Assign from the HRIS continuously, version what was accepted, chase without nagging everybody, and keep evidence a person can point at. The prompts.
People operations
How to build employee offboarding deprovisioning
Revoke on the leave date, cover every system instead of the ones you remember, transfer what they owned, and prove it. The Headless prompts that build it.
Last reviewed October 2026.