Quick Overview
This workflow receives inbound leads via a webhook, normalizes and validates the payload, tags the lead’s acquisition channel using UTM/referrer/gclid signals, creates a contact in Salesmate, logs the lead to a Google Sheets ROI dashboard, optionally sends a compliant acknowledgment email, and always notifies your firm by email.
How it works
- Receives a POST request on a webhook endpoint from Fluent Forms, CallRail, or any webhook-enabled form.
- Normalizes the incoming payload into consistent lead fields and filters out test submissions or entries without usable contact information.
- Classifies the lead source channel (for example Google Ads, social, referral, legal directories, inbound calls, or organic) based on UTM parameters, gclid, referrer, and other source signals.
- Creates a new contact in Salesmate with tags for the detected channel (and optionally the matter type) and captures the returned contact ID when available.
- Appends the lead details and Salesmate contact ID to a “Lead Log” tab in Google Sheets for ROI tracking.
- If an email address is present, runs an acknowledgment message through a Bar-Compliance Guardrail workflow and sends the approved email via SMTP, otherwise skips the acknowledgment.
- Sends your firm an intake alert email via SMTP with the full lead summary, source attribution, Salesmate link, and acknowledgment status.
Setup
- Create and configure credentials for Salesmate (HTTP Header Auth with your accessToken), Google Sheets (OAuth2), and an SMTP email account.
- Create a Google Sheet with a “Lead Log” worksheet and set the spreadsheet ID in the ROI_SHEET_ID n8n variable.
- Set required n8n variables including FIRM_NAME, FIRM_EMAIL, SALESMATE_BASE_URL, SALESMATE_LINK_NAME, ROI_SHEET_ID, and (optionally) FIRM_BOOKING_URL.
- Deploy the Bar-Compliance Guardrail workflow, set its workflow ID in GUARDRAIL_WORKFLOW_ID, and ensure any guardrail dependencies (such as OPS1_SHEET_ID) are configured.
- Copy the webhook Production URL after activation and paste it into Fluent Forms and/or CallRail webhook settings (or any external form that can POST JSON or form-encoded data).