Email workflows start with an incoming message and then often need a follow up email sent from the same mailbox. Enabling agents to take over these email workflow responsibilities requires the ability to read, draft, and send an email. Ampersand already supported reading and drafting emails, but sending required a custom proxy call.
Ampersand now enables agents and applications to send email through Gmail and Outlook Mail (Microsoft 365) without making separate provider API calls.
Before · a custom proxy call
Agent or application
proxy call
sent
Connected mailbox
Sending was the one step that needed provider-specific code.
After · a write action
Agent or application
write
AMPERSAND-messagesthe same object for Gmail and Outlook Mail
sent
Connected mailbox
One write sends a new message from the connected mailbox.
Read and send email with Ampersand message objects
Both connectors expose new objects to manage messages:
AMPERSAND-messages: reading inbox mail or sending a new messageAMPERSAND-sentMessages: reading sent mail
The new objects give builders separate ways to read incoming mail, send new mail, and read sent mail.
Manage message drafts
Drafts can be created, updated, and deleted:
- Gmail: use the provider’s native
draftsobject. - Outlook Mail: use
AMPERSAND-drafts[new]
| Workflow step | Gmail | Outlook Mail |
|---|---|---|
| Read the inbox | AMPERSAND-messages | AMPERSAND-messages |
| Send a new email | AMPERSAND-messages (write) | AMPERSAND-messages (write) |
| Read sent mail | AMPERSAND-sentMessages | AMPERSAND-sentMessages |
| Create, update or delete a draft | drafts | AMPERSAND-drafts |