Skip to content

Implement inbound email ingestion #52

Description

@grimicorn

Priority: P2

What needs to happen

The UI advertises clip-xxxx@in.markpost.io email-in addresses (app/pages/sources.vue:106, app/components/AddSourceModal.vue), but there is no inbound email handling.

  • Pick an inbound-email provider that posts parsed messages to a webhook (e.g. Postmark inbound, SendGrid Inbound Parse, or Mailgun routes). State the choice in the PR.
  • Add server/api/email/inbound.post.ts to receive the provider's parsed-email webhook payload.
  • Exclude this path from Clerk auth in server/middleware/auth.ts (same as the hooks route); authenticate the provider via a shared secret or signature.
  • Map the recipient address (clip-xxxx) to a sources row → userId.
  • Strip tracking pixels and convert subject + body (HTML or text) to a markdown record via Build the payload-to-Markdown conversion pipeline #51; insert into records.
  • Update the source's lastHitAt / recordCount and emit an activity event (Persist activity events and expose an events API #59).
  • Add the provider credentials to .env.example, .env.e2e.example, and any other sample env files, with comments explaining where to obtain them, and document the integration in README.md.
  • Add unit tests under tests/.

Dependencies

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions