Templates / Log and thank legal referrals with webhooks, Google Sheets, and email digests

Log and thank legal referrals with webhooks, Google Sheets, and email digests

Ready for 3.0

by Dele Tosh @ Protomated ✓ · 1 views · created 2026-09-01 · Lead Nurturing

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (10)

Google Sheets

What it does

Quick Overview This workflow captures referral form submissions via a webhook, logs them to Google Sheets, sends compliant thank-you emails to referrers via a guardrail sub-workflow, and notifies your firm by email, then runs monthly to analyze the ledger and email a reciprocal-referral reminder digest. How it works 1. Receives referral form submissions via a webhook endpoint. 2. Normalizes the incoming payload, validates that referrer details exist, and appends valid referrals to a Google Sheets “Referrals” ledger. 3. If a referrer email is present, generates a plain-text thank-you message and sends it through a compliance/opt-out guardrail workflow before sending via SMTP. 4. Emails the firm a referral summary via SMTP regardless of whether a thank-you was sent, skipped, or suppressed. 5. On the 1st of each month, reads the full Google Sheets referral ledger and calculates per-referrer referral counts for the last 90 days. 6. Filters referrers who meet the repeat-referral threshold, builds a digest reminder email, logs it via the guardrail workflow, and sends the reminder to the firm via SMTP. Setup 1. Create a Google Sheets spreadsheet with a “Referrals” tab and headers (date, leadname, leademail, referrername, referreremail, referrertype, mattertype, status), add a Google Sheets OAuth2 credential, and set the REFERRALLEDGERSHEETID variable. 2. Add an SMTP credential for sending emails and set the FIRMFROMEMAIL and FIRMEMAIL variables. 3. Set the FIRMNAME variable and provide a GUARDRAILWORKFLOWID variable that points to your compliance/opt-out guardrail sub-workflow. 4. Copy the production webhook URL from the webhook trigger after activation and paste it into your referral form tool’s webhook/notification settings. 5. Review the monthly schedule (cron set to 8:00 on the 1st) and adjust it to match your timezone and preferred send time.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.