Postmesh syncs email to local storage, runs configurable pipelines over messages, and stores structured results in queryable collections.
Sync mail locally, run configurable pipelines over messages, and store structured results in queryable collections.
Connect an email account and keep a local copy of messages, threads, labels, folders, and metadata.
Define YAML workflows that select messages with MailQuery, process them with deterministic steps, and write structured output.
Store structured records in schema-defined local collections that scripts, tools, and agents can query.
Pipelines select messages, process them, and store results in collections.
name: coupons
source:
type: messages
query:
filter:
query: "coupon OR promo OR discount"
page:
limit: 100
process:
- extract:
using: regex
schema: coupons
fields:
code:
input: text
pattern: "(?:promo code|coupon code|use code|code)[:\\s]+([A-Z0-9-]{4,})"
group: 1
normalize: uppercase
store:
collection: coupons
mode: upsertCollections define the schema for records produced from mail. Use them to model things like coupons, bills, receipts, job leads, subscription events, or unsubscribe candidates.
postmesh records list coupons \ --where.data.merchant Uber \ --select data.merchant,data.code,data.expires_at,source.message_id
name: coupons
schema:
merchant:
type: string
code:
type: string
required: true
discount:
type: string
expires_at:
type: date
source_message_id:
type: string
required: true
key:
fields: [source_message_id, code]Postmesh does not need to be the agent. It gives agents and developer tools a local, deterministic interface for retrieving messages and reading structured collection records.
Postmesh syncs user-authorized mail to local storage and processes it locally. It uses read-only email access for sync and retrieval, and does not send, delete, archive, label, or modify messages.
Install Postmesh with one command.
curl -fsSL https://postmesh.dev/install.sh | sh
Postmesh is awaiting Google OAuth verification. During Gmail setup, Google may show an unverified-app notice. Review Google's details before proceeding to Postmesh.
Sync mail locally. Run pipelines. Build collections.