Quick Overview
This workflow runs hourly to detect newly opened matters in Clio, create and organize a corresponding Google Drive folder structure, copy and merge Google Docs templates, create matter tasks and calendar deadlines in Clio, log the setup via an n8n sub-workflow, and notify staff by email.
How it works
- Runs every hour on a schedule and fetches all open matters from the Clio API.
- Deduplicates matters using n8n workflow static data so only newly seen matter IDs are processed.
- For each new matter, searches Google Drive for an existing matter folder under a configured parent folder and creates the root folder if it does not exist.
- Creates a standard set of subfolders in the matter’s Google Drive folder and stores the folder link for reporting.
- Looks up practice-area-specific configuration, copies the configured Google Docs templates into the matter folder, and replaces merge tags using the Google Docs API.
- Creates a practice-area-specific task checklist in Clio with due dates calculated from the matter open date.
- Calculates intake deadlines (calendar-day or business-day offsets) and creates all-day Clio calendar entries for each configured deadline rule.
- Builds a setup summary, logs it by executing a separate “guardrail” workflow, and sends a styled HTML email to staff with links to the Drive folder and generated documents.
Setup
- Add a Clio OAuth2 credential and set the CLIO_BASE_URL variable to your Clio domain so the workflow can read matters and create tasks and calendar entries.
- Add a Google Drive OAuth2 credential with Drive and Google Docs API access, and set GENERATED_DOCS_FOLDER_ID to the parent Google Drive folder where matter folders should be created.
- Configure practice-area mappings for document templates, task lists, and deadline rules, and set the required template document ID variables (for example TEMPLATE_MATTER_CHECKLIST_DOC_ID and TEMPLATE_CASE_PLAN_DOC_ID).
- Create an SMTP email credential and set FIRM_FROM_EMAIL plus FIRM_STAFF_EMAIL (or FIRM_EMAIL) so staff receive the completion summary.
- Set GUARDRAIL_WORKFLOW_ID to the ID of the logging/compliance sub-workflow that records the summary to your audit destination.
- Review the schedule trigger cron expression and adjust the polling frequency to match how quickly you want new matters to be set up.