Quick Overview
This workflow listens for Clio matter status change webhooks, fetches the latest matter and firm user details from the Clio API, and sends a compliance-checked status update email to the client via SMTP only when the status truly changes and a message is configured, while also renewing the Clio webhook subscription daily.
How it works
- Receives a Clio matter status webhook and either completes the one-time X-Hook-Secret verification handshake or immediately acknowledges the event.
- Validates the payload contains a matter ID and skips processing if the event is unrelated or malformed.
- Fetches the current matter details and the firm user directory from the Clio API to get the authoritative status, client email, and responsible attorney.
- Compares the current matter status to the last recorded status in workflow static data and skips if it is the first time seen or a duplicate delivery.
- Looks up a firm-written status message for the new status, builds a personalized email, and runs a separate compliance/opt-out guardrail workflow.
- Sends the approved plain-text and HTML email to the client via SMTP, or skips sending if the client has opted out.
- Runs daily on a schedule to list existing Clio webhook subscriptions and creates or renews the subscription when it is missing, unconfirmed, or nearing expiration.
Setup
- Add Clio OAuth2 credentials with Webhooks (read/write), Matters (read), and Users (read) access, and set the CLIO_BASE_URL variable.
- Activate the workflow, copy the Webhook node Production URL, and save it as the FIRM_MATTER_WEBHOOK_URL variable so the daily renewal branch can register/renew the Clio webhook.
- Set the FIRM_NAME, FIRM_EMAIL, and FIRM_FROM_EMAIL variables used to build the email content and sender address.
- Configure the status-to-message map in the code step that defines client-facing updates (for example, Pending and Closed).
- Set the GUARDRAIL_WORKFLOW_ID variable to an existing compliance/opt-out sub-workflow, and add SMTP credentials for sending the emails.