insonl
← journal

Automate the Missing-Document List for Client Onboarding

date
22 November 2026
by
insonl
read
8 min read

Illustrative example. An advisory or accounting team requests an engagement letter, certificate of incorporation, tax registration, and director ID for a new client. Files arrive over weeks across email threads. Staff update spreadsheets by hand, forward PDFs to reviewers, and write manual reminders, leaving stale trackers and sensitive files scattered across mailboxes and chats.

Fixing that drift is a client onboarding document checklist automation problem. Attachment capture is the transport layer, covered in building a Gmail API intake queue for operational attachments. Downstream, teams need a deterministic checklist in their CRM or matter system that tracks received items, computes the missing-document list without guesswork, and assigns follow-ups without forwarding raw files.

Using public Gmail API, NIST Privacy Framework, and Microsoft Power Automate approvals documentation, this guide specifies an illustrative, made-up onboarding workflow—not a real firm or Insonl client. It covers operational design only, not legal, privacy, or regulatory advice; NIST’s Privacy Framework is voluntary and law-agnostic and does not guarantee compliance. Consult qualified counsel.

Separate checklist state from email threads

An email thread does not encode checklist state or automatically mark earlier files as superseded. When a client resends a cleaner scan two days later, nothing in the thread retires the old file or recalculates open items.

Store two tables in the CRM or matter database:

  1. Checklist template per engagement type: Lists each item_code, accepted document class, required versus conditional status, freshness rules, and reviewer role.
  2. Matter checklist item table: Stores one row per (matter_id, item_code) with explicit status (missing, received_unverified, needs_reissue, verified, or waived), current opaque doc_id, superseding history, and next-action owner.

The missing-document list is a deterministic query—every required item in missing or needs_reissue—not a summary guessed from email threads.

Keep AI bounded: OCR or a classifier can inspect a quarantined copy to propose item_code, entity name, or issue date, or draft reminders from the missing list. Deterministic code must own the checklist diff, freshness check, and status transitions.

Detect inbound files with Gmail API push notifications

For Pub/Sub setup, MIME parsing, RFC 5322 deduplication, and quarantine storage, see our Gmail API intake queue guide. Four rules from Google’s push guide, REST references, and scopes policy shape onboarding intake:

  • Watch one intake label, not partner mailboxes: Call users.watch on a dedicated intake mailbox with labelIds, labelFilterBehavior: "include", and topicName set to a pre-existing Cloud Pub/Sub topic in the same developer project where [email protected] holds publish rights. Domain-restricted sharing may require an organization policy exception for that service account.
  • Treat notifications as pointers, not payloads: Cloud Pub/Sub delivers message.data as Base64URL-encoded JSON with only emailAddress and historyId—never bodies or attachments. The worker calls users.history.list with startHistoryId to list mailbox changes, users.messages.get to fetch messages, and users.messages.attachments.get for separately stored attachment bytes.
  • Renew watches and recover stale cursors: Renew users.watch at least every 7 days (Google recommends daily). Gmail caps push events at one per second per watched user and drops excess events; notifications can also be delayed or dropped. Pair push delivery with scheduled users.history.list catch-up, run a full resync if a stale startHistoryId returns HTTP 404, and avoid modifying watched labels inside the handler in ways that trigger loops.
  • Contain restricted OAuth scopes: Under Google’s Gmail API scopes policy, gmail.readonly and gmail.modify are restricted scopes (unlike non-sensitive gmail.labels or sensitive gmail.send). Outside Google’s internal-only app verification exception, applicable server-side storage or transmission of restricted-scope data requires OAuth verification and a security assessment; one dedicated intake address keeps those scopes off partner mailboxes.

Stop forwarding attachments with NIST Privacy Framework controls

Forwarding attachments multiplies unmanaged copies across mail, chats, and downloads. Using the NIST Privacy Framework (V1.0, NIST.CSWP.01162020; V1.1 Initial Public Draft NIST.CSWP.40.ipd, April 2025, aligning with CSF 2.0), the table maps four onboarding risks to selected V1.0 Core subcategories:

Onboarding risk NIST PF V1.0 Core subcategory Operational control
Unmanaged copies across mail and chat ID.IM-P8 (Inventory and Mapping): map systems, owners, data actions, and data elements Keep one data-flow map across intake mailbox, vault, CRM, approvals, and any extraction service.
Raw IDs or tax filings forwarded in emails or cards CT.DP-P4 & CT.DP-P5 (Disassociated Processing): selective disclosure; substitute attribute references for values Store each file once in an access-controlled vault; pass only doc_id, status, and viewer URL to CRM and approvals.
Follow-up staff can also view raw ID files PR.AC-P4 (Identity Management, Authentication, and Access Control): least privilege and separation of duties Grant ingestion write-only quarantine access, reviewers viewer access, and follow-up owners status access without raw downloads.
Logs or reminders expose personal fields CT.DM-P8 (Data Processing Management) & PR.DS-P5 (Data Security): audit/log records determined, documented, implemented, and reviewed under policy with data minimization; data-leak protections Log matter_id, item_code, doc_id, outcome, and UTC timestamp—never raw ID text—review logs under policy, and block attachment forwarding.

Replacing raw files with a doc_id and viewer URL (CT.DP-P5) is the structural fix. The CRM tracks status and references; the vault enforces access control (PR.AC-P4), retention schedules, and policy-driven destruction (CT.DM-P5).

Assign verification and follow-ups with Power Automate approvals

Once vaulted and linked, files need verification and missing-item follow-up. Microsoft’s Power Automate approvals (stored in Dataverse; standard licensing covers the Standard approvals connector) fits both within documented limits:

  • Link to the viewer instead of attaching files: Populate Item Link and Item Link Description, and put non-sensitive metadata in Markdown Details. Leaving attachments empty avoids creating file copies through the approval—and avoids the connector rule where approvals with multiple attachments sharing the same filename cannot be created.
  • Use custom responses for structured transitions: Binary Approve/Reject hides failure reasons. Configure custom responses waiting on one responder (Verify Item, Request Reissue, Escalate, Waive with Note) so each choice updates the CRM cleanly. Per approvals known issues, custom responses sent to many users with Everyone must approve can fail on results field size limits.
  • Plan group and guest routing: Assigning to a mail-enabled Microsoft 365 group or security group lets one member respond for the team (group approvals), but Teams notifications are not sent for group approvals and the group must allow external senders to receive email notifications. Assign named users when Teams cards are needed. Accepted B2B guest approvers need a valid Power Automate license and must act in the Power Automate portal because Outlook actionable emails are unsupported for guests (guest users guide); pending guests are removed from assignees, and creation fails if all assignees are pending.
  • Split long-running approvals across two flows: Distinguish the 28-day approval wait (known issues)—after which a waiting flow fails, leaving an abandoned approval in the action center for manual deletion—from the 30-day cloud-flow run limit (flow limits). When reviews may exceed the shorter 28-day wait, use Microsoft’s two-flow Dataverse pattern on Create an approval (v2): Flow 1 creates the request and exits, while Flow 2 reacts to Dataverse responses (using the Microsoft Dataverse connector directly requires the applicable Premium entitlement). If keeping Create an approval and Wait for an approval in one flow, place them close together or update Dataverse status before waiting to avoid stalling on fast responses, and use Condition or Switch instead of do until.
  • Keep the CRM authoritative: If a reviewer responds via email or the action center, Teams adaptive cards do not auto-update. Disabling the default email removes one source of stale card state, while action-center responses can still leave a Teams card out of date—so write every outcome back to the CRM.

Illustrative walkthrough: one advisory onboarding packet

(Illustrative, made-up example—not a real advisory firm, client, or Insonl engagement.)

An advisory firm opens matter MAT-2026-0194 from a corporate_advisory_standard template; below is illustrative application data stored by the onboarding service:

{
  "matter_id": "MAT-2026-0194",
  "checklist": [
    {"item_code": "engagement_letter", "status": "verified", "doc_id": "doc_7f21a"},
    {"item_code": "cert_of_incorporation", "status": "received_unverified", "doc_id": "doc_8c09e"},
    {"item_code": "tax_registration", "status": "needs_reissue", "doc_id": "doc_8b44c", "reason": "cropped_page"},
    {"item_code": "director_id", "status": "missing", "doc_id": null}
  ],
  "missing_document_items": ["tax_registration", "director_id"],
  "verification_request": {
    "approval_id": "appr_0194_02",
    "assigned_to": "[email protected]",
    "custom_responses": ["Verify Item", "Request Reissue", "Escalate"],
    "item_link": "https://vault.example-advisory.test/matters/MAT-2026-0194/docs/doc_8c09e"
  }
}
  1. Vault-first capture: The client emails a certificate of incorporation to the intake address. Gmail push triggers users.history.list, users.messages.get, and users.messages.attachments.get; the worker writes the PDF once to the vault as doc_8c09e, and a classifier proposes cert_of_incorporation. The CRM sets received_unverified with doc_8c09e only.
  2. Reference-only verification: Flow 1 calls Create an approval (v2) for the compliance group with Item Link, non-sensitive metadata in Details, and Attachments left empty. A reviewer opens doc_8c09e in the vault and picks Verify Item; Flow 2 checks that the approval ID and doc_id still match the active row, then sets verified.
  3. Deterministic follow-up: A scheduled check reads missing_document_items (tax_registration flagged cropped_page, director_id still missing) and assigns one coordinator follow-up for those two items. If a clearer tax file arrives mid-review, the CRM marks the old request superseded, the sender cancels it from Approvals → Sent, and the workflow opens a replacement request for the new doc_id; Flow 2 applies a response only if its approval ID and doc_id still match the current item.

Next step

Before adding AI extraction or automated reminders, map the checklist state machine, vault boundaries, and CRM schema—the scope behind Insonl’s CRM solutions. Start with Insonl’s free AI workflow audit for a written workflow map, recommendations, and a fixed-scope estimate. The audit is free. Follow-on work is optional.

Sources