- Receive email
- Send email
- Read threads
- Attachments
Use this workflow to create a temporary inbox, wait for a message to arrive, and clean up afterward. This is the most common AgentPost pattern — for example, automating sign-up verification flows.
Create a mailbox
Call The
CreateMailbox with no arguments to get a new address on the default AgentPost domain.email_address field is the address your agent hands off to whatever external system needs to send you an email.Use the address externally
Submit the email address to the service you’re automating — a sign-up form, a password reset flow, a notification trigger, etc. The mailbox starts accepting mail immediately after creation.
Wait for the email to arrive
Call If the timeout expires before a message arrives, the response returns
WaitForEmail with the address. The tool streams a notifications/progress event every 2 seconds so your agent knows it’s still running, then returns the full message when it arrives."status": "timeout". Your agent can call WaitForEmail again to extend the wait, or fall back to ListMailboxEmails to check for messages that arrived during the gap.Or: list and read emails manually
Instead of Use
WaitForEmail, your agent can poll by calling ListMailboxEmails to see all messages in the inbox, then ReadEmail to fetch the full content of a specific one.include_body: true on ListMailboxEmails if you want previews without an extra ReadEmail round trip.