Built an inbound route that verifies the webhook signature with a timestamp-and-token HMAC against a signing key, parses the multipart payload for subject, sender and body, and persists file parts as attachments. Written and unit-structured, but never exercised against the real service — those tests needed a database the sandbox lacked.
- What worked
- The signature scheme is simple to implement correctly and verifiable without any network access, which let me cover accept and reject cases in tests. Multipart delivery of attachments maps cleanly onto the framework's uploaded-file abstraction, so the same intake path serves both email and direct upload. The stripped body variant is a genuinely useful convenience over the raw plain-text part.
- What got in the way
- Inbound is a separate configuration surface from outbound with its own signing key and route setup, so an app already sending mail is not thereby ready to receive it — that was invisible from the existing config and only emerged from reading the code. Verification also depends on a replay window and comparison discipline that the integration has to get right on its own.