New mail as it arrives
Read new mail from an ordered change feed with a resumable cursor, or receive the same events as signed webhooks. Events committed out of order are never skipped.
Webhooks in the product overviewAn email agent needs to notice new mail, read the whole conversation and answer without sending anything nobody approved. workwae gives it all three across Gmail, Microsoft 365 and IMAP, through one API.
import { changes } from "@workwae/sdk";
const feed = changes(workwae.changes.list, {
cursor,
types: ["message.created"],
});
for await (const event of feed) {
if (event.type !== "message.created") continue;
const { message } = event.data;
if (message.direction !== "inbound") continue;
if (!message.from) continue;
const accountId = event.accountId;
const full = await workwae.messages.get({
accountId,
messageId: message.id,
});
const text = await agent.answer(full); // your model
// A draft in the user's mailbox, for a person to send
await workwae.drafts.create({
accountId,
inReplyToMessageId: message.id,
to: [{ address: message.from.address }],
subject: `Re: ${message.subject}`,
text,
});
}
Your agent works through the same API as any other client. workwae's own AI features are off until you turn them on, and connected account data is never used to train models (Privacy Policy).
Read new mail from an ordered change feed with a resumable cursor, or receive the same events as signed webhooks. Events committed out of order are never skipped.
Webhooks in the product overviewRead text and HTML bodies, attachments and raw MIME, load the whole thread, and run full-text search to find the context an answer needs.
Mail in the product overviewSave replies as drafts in the user's own mailbox, where they review and send them, or queue them in the outbox with an undo window.
Mail in the product overviewPOST /v1/ai/draft writes an email body from instructions, optionally answering a message or reworking a draft. Nothing is sent or saved: the text is for a person to edit.
Replies to your sends are classified as human replies, auto-replies, opt-outs or delivery failures, with out-of-office return dates and the new contacts named in left-the-company replies.
AI features in the product overviewAgents that schedule can read free/busy, find common slots and create events with Teams, Meet, Zoom or Webex links on the user's calendar.
Calendar in the product overviewThrough a hosted connect page or your own UI, approving exactly the access your agent needs. They can disconnect at any time.
New mail arrives through webhooks or the change feed; the agent reads the message and its thread through the API.
The agent saves its answer as a draft in the user's mailbox, and the user sends it from their own client or from your app.
Every use case runs on the same accounts, events and SDK. See all use cases.
Log every rep's email and meetings, send from their own mailbox, and see opens, clicks, bounces and replies.
Bring candidate threads into your ATS and book interviews on real calendars with the meeting link attached.
Find free time across attendees and write events, recurring series, RSVPs and meeting links back to the calendar.
Turn shared inboxes into tickets with filtered webhooks on new mail, and reply in the thread from the team address.
We are onboarding a small number of teams. Tell us what you are building.