What they did
Osmani's site sent its contact form to a self-hosted n8n webhook that, by Osmani's own commit note, failed about once a week and dropped leads without anyone noticing. Osmani exported the n8n workflow as JSON and had Claude Code first write an inventory of it (trigger, nodes, credentials) instead of code. The canvas also scored leads, posted to Slack, logged to Google Sheets and skipped duplicates. Osmani chose to rebuild only the capture and email half: a route in the site's Next.js codebase that validates and rate-limits the submission, sends an internal notification through Resend, and then a confirmation to the customer. Real payloads from n8n's execution history served as test data.
How it went
The new route replaced the flaky webhook. Two problems got past the code and the success responses. The inbox setting held two addresses joined by a comma, which Resend read as one bad address, so the second recipient got nothing until a later PR split it into a list. The customer confirmation landed in Gmail spam because the domain was new, even with DKIM and SPF set up; Osmani switched to a real reply-capable sender and added DMARC reporting. Scoring, Slack, Sheets and dedupe were deliberately left out and no longer run.
Worth knowing
Claude Code builds only what the spec lists, so any n8n step left out of the spec silently disappears. The route also returns success without sending when the Resend key is missing, which Osmani kept for offline work; make production refuse to start without it. The author sells this kind of migration as a consultant.