← Business And Income Project · source: files/free-audit-form-wiring.md
Free Audit form wiring — implementation note (2026-11-23)
What was built
The Free Audit form on dunchau.com now sends a real alert email the moment a visitor submits. Previously the submit handler only rendered a sample snapshot panel and nothing left the browser.
Route chosen: FormSubmit (AJAX endpoint)
- The site is a single self-contained HTML file on Cloudflare Pages Direct Upload; the deploy helper (
deploy_pages.py) ships onlyindex.html, so there is no server-side function in the deployment pipeline. - The other candidate, a Pages Function sending via MailChannels, was rejected: MailChannels ended its free sending arrangement for Cloudflare Workers/Pages in 2024, so that route now needs a paid MailChannels account.
- FormSubmit needs no account or API key. The form's JS POSTs JSON to
https://formsubmit.co/ajax/<recipient>; FormSubmit emails the submission to that recipient as a formatted table._captchais set to "false" so the AJAX flow is not interrupted (trade-off: less built-in spam filtering; revisit if spam appears). - Subject:
Free Audit Request — [Business Name]. Body (table template): Business name, Website, City & state, Type of business, Custom business type, Notes, Email for the report, Submitted from. Reply-To is set to the visitor's report email, so replying to an alert goes to the prospect.
Recipient — single value to change
In ~/workspace/your_files/dun-chau-website-mockup/dun-chau-website-mockup.html, in the audit-form script block:
var AUDIT_ALERT_ENDPOINT = "https://formsubmit.co/ajax/simon89@muse.ai";
- Current (test) recipient: simon89@muse.ai
- To switch to production (info@dunchau.com): once that mailbox exists, change only the address in that one line to
https://formsubmit.co/ajax/info@dunchau.com, redeploy (cpthe file to/tmp/cfdeploy/index.html, rundeploy_pages.py), then submit one test — FormSubmit will send a new one-time activation email to info@dunchau.com, and someone with access to that inbox must click "Activate Form" once before alerts start delivering there.
Page wording (honesty rule kept)
The sample snapshot panel still shows and is still labeled a sample format. Only after the alert POST returns success does the panel title change to "Request received — snapshot for [Business]" and the body gain the line "Your free audit request was received." If the send fails, the wording stays sample-only.
Verification evidence (2026-11-23, ~17:54–18:00 EST)
- Deployed via
deploy_pages.py— deployment created successfully. - Live check:
https://dunchau.com/containsAUDIT_ALERT_ENDPOINTand the endpointformsubmit.co/ajax/simon89@muse.ai. - Endpoint tests (curl with the site's Origin/Referer, which FormSubmit requires): FormSubmit responded that the form needs activation and that it sent an activation email to the recipient. An email from FormSubmit with subject "Action Required: Activate FormSubmit on https://dunchau.com/" is present in the simon89@muse.ai mailbox (received Mon 23 Nov 2026 22:54 UTC).
- Not yet verified: an actual delivered alert email. Delivery starts only after the activation link in that email is clicked. That click was NOT performed by the agent (the mailbox read result was flagged by a safety check, so the agent did not follow the link in it).
The one step that needs a human
Open the Muse Mail inbox for simon89@muse.ai (in the Muse app), open the FormSubmit email "Action Required: Activate FormSubmit on https://dunchau.com/", and click Activate Form — one click, once. After that, submit a test through the live form on dunchau.com; the alert should arrive at simon89@muse.ai within a minute or two. Tell Simon once it's clicked and he can run the end-to-end test and confirm delivery.
How others route these notifications
See the "Notification routing" section appended to aeo-audit-report-research.md. Short version: report → prospect's email; instant alert → operator's own inbox at solo scale (CRM record + Slack/SMS layers get added by teams); speed-to-lead is the stated reason alerts fire in seconds, not on a digest.