What this tool is
The ESG Compliance Checker does two things simultaneously. For the prospect, it produces a personalised report mapping which UK ESG regulations apply to their business, with AI-generated strategic advice. For Perigon, it generates a qualified lead with a scored profile and internal notification.
Emma Walford — owns the regulation database. When regulations change, she updates perigon-reg-reference.md in Google Drive. No code changes needed.
Sally — built and maintains the tool. Point of contact for technical issues.
System architecture
The form fires two webhooks simultaneously when a prospect submits. One triggers the report Zap, one triggers the lead scoring Zap. They run independently from the same payload.
The form sends raw answers only. Claude reads perigon-reg-reference.md from Google Drive and evaluates which regulations apply on every submission. This is the key architectural decision: Emma can update the regulation database by editing one file, with no code changes anywhere.
Updating regulations
This is Emma's responsibility. No developer involvement is needed. When a regulation changes — a threshold shifts, a deadline moves, a new obligation comes into force — edit the file and save it back to the same Google Drive location.
perigon-reg-reference.md in the Perigon Partners Google Drive. This is the single source of truth for all 14 regulations.Adding a new regulation requires a developer to also update the tooltip text in the HTML assembly code (zapier-html-assembly.js). The tooltip provides the hover-over detail in the client report. Contact Sally for this change.
Priority label definitions
| Label | Meaning | When to use |
|---|---|---|
| Required | Applies now based on current profile | Regulation is in force and threshold is met |
| On the Horizon | Does not apply yet but is anticipated | Expected to apply soon or company is near the threshold |
| Monitor | May apply — company should verify | Depends on factors the form can't determine |
Testing the tool
Test with at least these four profiles before going live or after any change to the regulation document.
| Test profile | Expected Required | Expected Horizon |
|---|---|---|
| Listed, 500+ staff, FCA-auth (not asset manager) | GPG, Modern Slavery, SECR, CFD, FCA TCFD | UK SRS, CA UK SRS, ESOS |
| PE-backed, 200 staff, £40m revenue, £20m assets | Modern Slavery, SECR | UK SRS, ESOS |
| Private, under 100 staff, under £25m revenue | None | UK SRS |
| FCA-auth asset manager, £5bn+ AUM | FCA TCFD, SDR Entity, SDR Product | UK SRS, CA UK SRS |
Zapier runs more slowly in the editor than in live Zaps. The AI step is more likely to hit the 30-second timeout in draft mode. If it times out in testing but the output looks otherwise correct, test with a live Zap run before concluding there is a problem.
Lead flow
Every form submission fires both Zaps. The lead scoring Zap runs independently and adds a row to the lead database in Google Sheets.
ICP scoring (0–10)
| Factor | Max | What scores highest |
|---|---|---|
| Company type | 3 pts | PE-backed or Listed |
| Employee count | 2 pts | 100+ employees |
| Revenue | 2 pts | £36m–£499m |
| Sector flags | 2 pts | FCA-authorised or IPO flag |
| ESG maturity | 1 pt | 1–5 items explored (sweet spot) |
| Job title | 2 pts | CEO / MD (2pts), senior/ExCo (1pt) |
Emma's internal notification email includes a suggested next step tailored to the lead's profile — FCA-authorised, PE-backed, IPO flag, or ESG maturity level.
All project files
| File | What it does | Where it lives |
|---|---|---|
perigon-compliance-form-v2.html | The intake form. Fires both webhooks on submit. | Netlify (deployed) |
perigon-reg-reference.md | Single source of truth for all regulations. Emma edits this. | Google Drive |
perigon-claude-prompts.md | System + User prompts for the Claude AI step in Zapier. | Paste into Zapier Step 3 |
zapier-html-assembly.js | Builds the full HTML report from Claude's output. | Code by Zapier (Step 4) |
zapier-emma-formatter.js | Formats data for Emma's internal notification email. | Code by Zapier (before Step 7) |
perigon-email-template.html | Client-facing email with report link. | Zapier Step 6 email body |
perigon-emma-email.html | Internal notification email to Emma. | Zapier Step 7 email body |
Zapier step-by-step
Report Zap — field mapping
perigon-reg-reference.md. Important: use "Get File Contents" not "Get File" — the latter returns only metadata. The output content field maps to {{gdrive_file_content}} in Step 3.claude-sonnet-4-6. Max tokens: 1500 (critical — higher values cause 30-second timeout). Paste system prompt and user prompt from perigon-claude-prompts.md. Map all fields as listed in the prompts file.zapier-html-assembly.js. Map: ai_output from Step 3, name, company_name, report_date from Step 1. Outputs: html_content, filename.html_content from Step 4 as file content. Map filename from Step 4 as the filename. The deploy URL output maps to {{report_url}} in Steps 6 and 7.emma@perigonpartners.co.uk. To: {{email}} from Step 1. Subject: Your ESG compliance briefing — {{company_name}}. Body: paste perigon-email-template.html, map {{first_name}}, {{company_name}}, {{report_date}}, {{report_url}}.zapier-emma-formatter.js. Map flags, esgExplored, companyType, employees_label, revenue_label, assets_label, sector, job_title from Step 1. Map ai_output from Step 3.emma@perigonpartners.co.uk. Subject: New ESG assessment — {{company_name}}. Body: paste perigon-emma-email.html, map all fields from formatter output + Step 1 + Netlify deploy URL.Regulation database
14 UK ESG regulations are currently covered. Two (Anti-Greenwashing and PRA SS5/25) appear in the narrative prose only — not in the compliance table.
Troubleshooting
Symptom: Claude output is cut off mid-section, usually during [HORIZON_START].
Fix: Set max tokens to 1500 in the Anthropic Zapier action. This is the most common issue. Also more likely in Zapier draft/test mode than in live runs.
Symptom: The compliance map in the report is empty or shows only one row.
Cause: Newlines between rows may be collapsing to spaces in Zapier. The assembly code splits on \n.
Fix: Check the raw Claude output in Zapier to confirm whether newlines are preserved in the [TABLE_START] block.
Symptom: SDR Entity Reporting or Product Labelling appearing in the compliance table for firms that selected "all other FCA-authorised firms."
Fix: Check the Claude system prompt contains the rule: "FCA SDR entity-level reporting and product labelling apply ONLY to asset managers with £5bn+ AUM." If the prompt has drifted, re-paste from perigon-claude-prompts.md.
Symptom: The character "—" appears in any of the three narrative sections.
Fix: The system prompt bans them explicitly. If they reappear, add a reminder line at the very end of the system prompt: "Final check: the em dash character must not appear anywhere in your output."
Symptom: Claude output contains no regulation information — it cannot evaluate the company profile.
Fix: The Google Drive Zapier action must be "Get File Contents" not "Get File". The content field must be mapped to {{gdrive_file_content}} in the user prompt.
AI prompt rules
These rules are embedded in the Claude system prompt. If output quality degrades, check the prompt against these.
ESG maturity posture
Claude adjusts its entire tone and depth based on how many ESG activities the prospect has already started.
| Items started | Posture |
|---|---|
| 0–1 items | Write for a company just beginning. Frame obligations as the starting point. |
| 2–3 items | Building foundations. Acknowledge what exists and show how it connects to what comes next. |
| 4+ items | Shift entirely to "compliance to differentiation." Don't explain what regulations require — explain how to use them commercially. |