Quick Overview
This workflow runs daily and pulls open matters and firm users from the Clio API, calculates which onboarding stage is due based on each matter’s open date, builds a personalized onboarding email, runs a compliance/opt-out check via a sub-workflow, and sends approved messages via SMTP.
How it works
- Runs every day at 9am on a schedule.
- Fetches the firm’s user directory and all open matters from the Clio API.
- Splits matters into individual records, skips entries without a client email or open date, and calculates days since the matter opened to assign a stage for day 0, 1, 3, or 7.
- Filters down to matters with a stage due today and stops cleanly when nothing is due.
- Builds the stage-specific email content and personalizes the contact details by matching the responsible attorney ID to the Clio user list.
- Calls a separate compliance/guardrail workflow to append the required footer and suppress sends for opted-out recipients.
- Sends the approved onboarding email to the client via SMTP, otherwise skips suppressed recipients.
Setup
- Add a Clio OAuth2 credential and set the CLIO_BASE_URL n8n variable to your Clio instance base URL.
- Create and configure the compliance/guardrail sub-workflow, then set its ID in the GUARDRAIL_WORKFLOW_ID n8n variable.
- Add an SMTP credential for sending email and set FIRM_FROM_EMAIL for the sender address.
- Set required firm variables such as FIRM_NAME and FIRM_EMAIL, and optionally configure FIRM_CLIENT_PORTAL_URL, FIRM_BILLING_EMAIL, FIRM_RESPONSE_TIME_DAYS, FIRM_PAYMENT_TERMS_DAYS, and FIRM_ONBOARDING_CHECKLIST.
- Adjust the schedule (cron expression) if you want the daily check to run at a different time.