Paste a slack message JSON payload and get a Zod z.object schema you can run inside your handler. Same shape walker as the TypeScript-mode page, but the output is a runtime-validated schema with .optional() on missing fields and z.union for nullables.
Slack's Events API is loosely versioned: new fields appear without an envelope bump and Block Kit nesting is recursive, so a parse at the /events handler turns silent shape drift into a single named error instead of an undefined access deep in the block walker.
Slack bot servers tend to run on Node (Bolt, raw Express) where bundle size matters less than developer ergonomics; Zod's chained API and ecosystem of resolvers (zod-to-openapi, zod-form-data, drizzle-zod) integrate cleanly with the rest of the bot. The output is a copy-paste-runnable z.object using only standard Zod primitives (z.string, z.number, z.array, z.union, .optional). Drop it into your handler, run schema.parse(body), and the rest of your code consumes a strongly typed value with no ambient unknowns.