Evidence Collection Agent — unit tests. This agent is responsible for creating the evidence checklist in Notion, sending assignment emails via Gmail, creating the Drive submission folder, monitoring submission status, and dispatching overdue reminders via Slack and Gmail.
ID
Scenario
Input
Expected output
Pass criteria
T01
Happy path: audit record triggers workflow
New Notion audit record with confirmed engagement date, audit type, scope, and compliance owner populated
Workflow trigger fires within 60 seconds; audit metadata extracted correctly into workflow variables
All expected fields (audit name, date, type, owner) present in the workflow execution payload with no null values
T02
Happy path: evidence checklist generated in Notion
Valid audit type value from T01 payload
Structured evidence checklist page created in sandbox Notion database with correct line items, assigned owners, and internal due dates
Checklist page exists in Notion; line item count matches the expected template for the audit type; due dates fall before the audit engagement date
T03
Happy path: stakeholder assignment emails sent via Gmail
Populated checklist with three or more distinct stakeholder email addresses
Each stakeholder receives a personalised Gmail message listing only their assigned items, the required format, and the internal deadline
Number of emails sent equals number of distinct assignees; each email body contains the correct item list for that recipient; no cross-contamination of items between recipients
T04
Happy path: Drive submission folder created
Audit name and category list from workflow payload
Top-level audit folder created in sandbox Drive with correctly named sub-folders per document category; stakeholder permissions applied
Folder structure matches the agreed Drive schema; all expected sub-folders present; designated stakeholder emails have editor access; compliance manager email has owner access
T05
Happy path: Notion status updated after daily monitoring poll
One item present in sandbox Drive sub-folder matching an expected checklist entry
Corresponding Notion checklist row status updated from Pending to Received
Status field in Notion row reflects Received within one scheduled polling cycle; timestamp updated; no other rows affected
T06
Happy path: overdue Slack alert fires for a single item
Notion checklist row with status Pending and an internal due date in the past
Slack direct message sent to the assigned stakeholder; Gmail follow-up sent to the same address
Slack message delivered to correct sandbox Slack user ID; Gmail message delivered to correct sandbox address; message body references the specific overdue item name and deadline
T07
Failure: Notion trigger fires with missing engagement date
New Notion audit record with engagement date field left blank
Workflow halts at trigger validation step; error logged with field name and record ID; no downstream actions fire
No checklist created; no emails sent; error entry present in the automation platform execution log citing missing engagement date
T08
Failure: Gmail send fails due to invalid stakeholder email address
Checklist row containing a malformed email address (missing domain)
Email send step logs a delivery failure for that address; remaining valid addresses continue to receive their emails; error flagged in execution log
Valid-address emails confirmed delivered; malformed-address row flagged with error status in execution log; workflow does not halt entirely
T09
Failure: Drive folder creation fails due to insufficient permissions
Sandbox OAuth token with read-only Drive scope (simulating misconfiguration)
Folder creation step returns a 403 error; workflow halts and logs the permission error; no partial folder created
Execution log records a 403 from Drive API; no folder exists in sandbox Drive; error notification surfaced in platform monitoring
Document Review and Organisation Agent — unit tests. This agent monitors the Drive submission folder for new uploads, validates files against the expected evidence list, organises verified documents, routes signature requests via DocuSign, and posts the completion alert to Slack.
ID
Scenario
Input
Expected output
Pass criteria
T10
Happy path: correctly named file uploaded and verified
PDF file uploaded to the correct Drive sub-folder with a name matching the expected evidence list entry exactly
File validated as matching; Notion checklist row status updated to Verified; file moved or confirmed in the final evidence pack sub-folder
Notion row status is Verified; file present in the evidence pack folder; no escalation triggered
T11
Happy path: declaration document routed to DocuSign
Verified file of a type flagged as requiring a signature in the document type mapping table
DocuSign test envelope created and sent to the nominated sandbox signatory; Notion row updated to Awaiting Signature
DocuSign sandbox API confirms envelope sent; Notion row status is Awaiting Signature; signatory email address matches the mapping table entry for that document type
T12
Happy path: DocuSign completion webhook updates Notion
DocuSign sandbox webhook payload with status Completed and envelope ID matching a Notion row
Notion checklist row status updated to Signed; no further DocuSign action triggered
Notion row status is Signed within 30 seconds of webhook receipt; envelope ID in Notion matches the payload
T13
Happy path: all items verified, completion Slack alert posted
All Notion checklist rows in Verified or Signed status
Slack message posted to the compliance manager and leadership channel confirming the evidence pack is complete
Slack message delivered to both configured channel IDs; message body references the correct audit name; no duplicate messages sent
T14
Failure: file uploaded with incorrect name, escalated to compliance manager
PDF uploaded to Drive with a filename that does not match any expected evidence list entry
File flagged as unrecognised; Notion row for that evidence item updated to Flagged for Review; no automatic verification or folder move occurs; compliance manager notified
Notion row status is Flagged for Review; file remains in the intake sub-folder; compliance manager Slack notification delivered with file name and upload timestamp; no DocuSign envelope triggered