Repurpose law firm field notes into compliant marketing content with Anthropic Claude
Go to WorkflowDescription
Quick Overview
This workflow receives law firm field notes or anonymized case wins via webhook, validates them for privileged language, uses Anthropic Claude to generate four marketing assets, runs a keyword safety scan, logs the event via a Bar-Compliance Guardrail workflow, and emails the final content package via SMTP.
How it works
Receives a POST webhook submission containing a field note or case win (direct JSON or Fluent Forms format).
Normalizes the payload and rejects submissions that are too short or contain privileged or legal-advice language.
Builds an Anthropic Claude prompt using n8n Variables (firm name and delivery emails) and the submitted practice area and content type.
Calls the Anthropic Messages API to generate a LinkedIn post, newsletter blurb, Google Business Profile post, and FAQ entry as JSON.
Parses Claude’s response, honors Claude’s self-reported safety flag, and runs a post-hoc keyword scan to flag legal-sounding language across all generated assets.
If the outputs are safe, calls the Bar-Compliance Guardrail workflow to log the generation event to a compliance audit sheet.
If the guardrail approves, sends the formatted content package to the firm’s marketing inbox via SMTP.
Setup
Create an Anthropic API key and add an n8n Header Auth credential that sends it as the x-api-key header for requests to api.anthropic.com.
Configure an SMTP credential for the sending mailbox used to deliver the content package email.
Set n8n Variables for FIRM_NAME, FIRM_EMAIL, FIRM_FROM_EMAIL, and GUARDRAIL_WORKFLOW_ID.
Deploy and activate the Bar-Compliance Guardrail workflow and copy its numeric workflow ID into GUARDRAIL_WORKFLOW_ID.
Copy the webhook Production URL from the workflow and configure it in your source form/app (or send POST JSON directly to that URL).