fix(mailer): correct AgentMail webhook message schema field requirements#5434
Conversation
cc, attachments, and html are omitted from AgentMail's webhook payload when empty rather than sent as empty arrays/null, but the zod schema marked them required. Every inbound email without a CC recipient or attachment (the common case) failed schema validation before a task row was ever created, silently breaking Sim Mailer inbox ingestion since the feature shipped. Renames from_ to from to match AgentMail's documented field name.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The schema now marks Reviewed by Cursor Bugbot for commit 88e025f. Configure here. |
Summary
cc,attachments, andhtmlentirely when empty (not sent as[]/null), but our zod schema marked them required — so any inbound email without a CC recipient or attachment (the common case) failed schema validation before a task row was ever createdmothership_inbox_taskrows created across 13 workspaces that enabled the inbox over 4 months)from_tofromto match AgentMail's documented field name (harmless — AgentMail actually sends both keys today, butfromis the documented one)subject/textto optional as well, matching AgentMail's actual API contractType of Change
Testing
tscandbiomeclean on all changed filescc/attachments/html) and the fixed schema parses it successfullyChecklist