Mailgun inbound email webhook
Receives BCC’d / inbound emails from Mailgun (form-encoded multipart payload — see Mailgun’s Routes/Webhooks docs for the full schema). Authenticates via the ?key= query parameter against MAILGUN_ROUTE_KEY. Creates an Activity row, uploads any attachments to S3, detects trip-message replies, auto-associates the email with a donor by sender address when possible, and indexes the activity in Meilisearch. Documented as a webhook for reference; integrators do not call this directly.
Query Parameters
Shared secret matching MAILGUN_ROUTE_KEY. Mailgun appends this from the route configuration.
Body
Mailgun's inbound multipart/form-data payload (sender, recipient, subject, body-plain, body-html, Message-Id, timestamp, message-headers, attachment-count, attachment-N, …). Refer to the Mailgun documentation rather than treating any single field as a stable contract.
The body is of type object.