Quick Overview
This workflow monitors an IMAP intake mailbox, matches inbound email attachments to a Clio contact and open matter, and files the documents into the correct Google Drive matter folder while logging outcomes to a compliance audit sub-workflow and alerting staff when no confident match is found.
How it works
- Receives a new email via IMAP, extracts the sender, subject, received date, and any attachments.
- If there are no attachments, it stops processing with no further action.
- Searches Clio for a contact matching the sender’s email and only accepts an exact email match.
- Retrieves the contact’s open Clio matters and selects a matter only when there is exactly one open matter or the matter number appears in the email subject.
- Searches Google Drive for a folder for the matched matter under the configured parent folder, creating the folder if it does not exist.
- Uploads each attachment to the matter folder in Google Drive with the received date prefixed in the filename.
- Aggregates the upload results and calls a separate compliance audit workflow to log the successful auto-filing event.
- If the contact or matter cannot be confidently identified, it logs the exception via the compliance audit workflow and emails staff a manual-filing alert with the original attachments.
Setup
- Add IMAP credentials for your intake mailbox and confirm the trigger reads from the correct folder (for example, INBOX).
- Create a Clio OAuth2 credential and set the CLIO_BASE_URL variable used by the HTTP requests.
- Add a Google Drive OAuth2 credential and set the GENERATED_DOCS_FOLDER_ID variable for the parent folder where matter folders are searched/created.
- Set GUARDRAIL_WORKFLOW_ID to the ID of your compliance audit sub-workflow and ensure it accepts the provided inputs (channel, message, matter_id, recipient, template_id).
- Add SMTP (or email) sending credentials and set FIRM_FROM_EMAIL to the address that receives manual filing alerts.