Skip to content

Kody is live

Watch the launch video — what Kody is, and why it exists.

← Public packages

@noah/hey-email

HEY.com email integration with Kody: search threads, read messages/attachments, create drafts, and send with explicit confirmation.

Version
1.2.0
License
Published
September 18, 2026
Pinned commit
c1a2829
Rating
No ratings yet
Forks
0
Adaptation effort

@noah/hey-email

Intent

Give Kody packages a thin, secret-backed way to search, read, and draft the signed-in user's HEY mail without running the local hey CLI inside Workers. Powered by the heyToken user secret against https://app.hey.com.

Success means another package can search threads, read bodies, download PDF receipts, and save a reply draft that the user opens in HEY. Nothing in this package sends mail unless sendDraft({ confirm: true }) is called on purpose.

Prerequisites

  1. Save secret heyToken (from hey auth token) with allowed host app.hey.com.
  2. Approve host access if prompted on first fetch.

The token is read from the secret at request time and is only ever sent to app.hey.com. Requests to any other origin are refused.

Exports

  • kody:@noah/hey-email — identity smoke test
  • kody:@noah/hey-email/search — advanced search
  • kody:@noah/hey-email/boxes — list boxes
  • kody:@noah/hey-email/topic — get topic JSON
  • kody:@noah/hey-email/entries — list topic entries
  • kody:@noah/hey-email/message — full message JSON (/messages/{id}.json)
  • kody:@noah/hey-email/attachments — list/download PDF attachments from message HTML
  • kody:@noah/hey-email/drafts — list / create / read drafts; optional send with confirm
  • kody:@noah/hey-email/reply — alias for createReplyDraft
  • kody:@noah/hey-email/sendsendMessage / sendReply / sendDraft (confirm required)

Draft vs send

HEY's POST /entries/{id}/replies.json sends when to is present and saves a draft when to is omitted. createReplyDraft never sends to.

Draft edit URL: https://app.hey.com/messages/{id}/edit Topic URL: https://app.hey.com/topics/{topicId}

License

MIT. See LICENSE.

Smoke test

import identity from 'kody:@noah/hey-email'
import { listDrafts } from 'kody:@noah/hey-email/drafts'
await identity()
await listDrafts()
Report this listing

Log in to report this listing.