Skip to main content

email-sync

Durable Resend inbox poller — the backstop for the signed webhook. Lists received mail, filters to SABLE_INBOUND_ADDRESS across To/Cc/Bcc, and idempotently ingests bodies plus attachment files, so a webhook outage or a missing signing secret cannot lose inbound mail.

{ "dryRun": true, "limit": 100 }
{ "limit": 100 }

Production polling runs every ten minutes via Trigger.dev's sable.email.ingest schedule and does not depend on RESEND_WEBHOOK_SECRET being set. Full connector detail is on the Email BCC / Attachment Inbox page.

Where the code lives

  • sable-agents-demo/supabase/functions/email-sync/index.ts
  • sable-agents-demo/supabase/functions/_shared/resend_email.ts