#my-site-contact channel in your own Slack workspace — within two seconds, with the sender’s name, email, and message.
Slack App + webhook
Create a Slack App, activate Incoming Webhooks, get your webhook URL — the only manual step.
Form + server action
Validated input writes to Neon and POSTs to Slack in one server action. AI writes both.
Spam defences
Honeypot field, rate limit per IP hash, duplicate-content drop — friction for bots, not humans.
Learning objectives
By the end of this session, you should be able to:- Create a Slack App and obtain an incoming webhook URL — the minimum human work — then hand everything else to Cursor.
- Build a contact form that writes to Neon and fires a Slack webhook in one server action, through a single prompt describing the feature end-to-end.
- Think about notification-as-observability: why a tiny Slack ping on every real event is how senior engineers actually monitor small products in production.
Core topics
- Slack Apps, Incoming Webhooks, and why this is the cheapest real-time pipe in the world.
- Server actions as the right “trust boundary” for webhook calls — the webhook URL is a secret.
- Fan-out pattern: one event, two destinations (database + Slack). What happens when one of them fails and how to decide whether to retry, log, or drop.
- Spam defence: rate limiting, honeypot fields, content filtering — protecting your Slack from getting pinged 400 times by a bored bot.
Tools introduced this week
| Tool | Role this week |
|---|---|
| Slack | Where notifications land — your own workspace |
| Slack Incoming Webhooks | The simplest HTTP-POST-to-Slack mechanism |
| Next.js server actions | Where the form handler lives; server-only secrets |
| Drizzle + Neon | New contact_submissions table persists every form |
@upstash/ratelimit (optional) | Sliding-window rate limit for the form |
Prerequisites: Complete Week 6 — Add a Blog System first. You need an existing Neon database and signed-in users from Week 4 still wired up.
Download Week 7 PDF
Full lecture · 672 KB — Session plan, hands-on lab steps, webhook + spam-defence troubleshooting.
Continue to Week 8
Typst PDF automation for job applications