Sent and scheduled
Mail that went out or is waiting to.
Sent and scheduled tools
| Tool | What it does |
|---|---|
| listSentEmails | Mail the workspace sent or will send, newest first, by status, sender, broadcast, or a scheduledFrom and scheduledTo window. |
| getSentEmail | One sent or scheduled email: its status, when it is due or went out, what went wrong and where it stands with each recipient. |
| listEmailEvents | What happened to one email, oldest first: sent, failed, rescheduled and, when tracked, every open, click and download. |
| rescheduleEmail | Move an email that has not gone yet to a new time, an ISO 8601 instant or a duration such as PT2H. |
| updateScheduledEmail | Change the subject, body, sender or recipients of an email that has not gone yet. |
| cancelEmail | Stop an email that has not gone yet. It cannot be brought back, only sent again. |
Reading needs “Read sent messages and their delivery status” (emails:read), and moving, changing or cancelling needs “Send email” (emails:send). A client limited to some addresses reaches only the mail sent from them, and someone whose role does not reach every address may move, change or cancel only the mail they sent.
A message translated when it was accepted keeps its wording, and one that was encrypted keeps its wording and its recipients, so updateScheduledEmail refuses to change them. Cancel it and send again instead.
In the app’s chat, cancelEmail always asks first, and moving or changing an email asks unless you asked for it.
Reference
listSentEmails
Mail this workspace has sent or will send, newest first: messages sent through the app, the API and automations, with their status. status keeps some statuses: queued and scheduled are still waiting, sending, sent, partial, failed and cancelled are not. scheduledFrom and scheduledTo, ISO 8601 instants, keep the messages scheduled inside that window, which with status scheduled and queued is what is waiting to go out. When more follow, the last line gives a cursor.
Inputs
statusstring[]- One of
"queued""scheduled""sending""sent""partial""cancelled""failed" fromstringscheduledFromstring- Format
date-time scheduledTostring- Format
date-time broadcastIdstringlimitinteger- At least 1At most 100
cursorstring
Also available in
getSentEmail
One sent or scheduled email by id: its status, when it is due or went out, what went wrong if anything did, and where it stands with each recipient. Take the id from listSentEmails or from what sendEmail returned.
Inputs
idstringRequired- Not empty
Also available in
listEmailEvents
What happened to one sent email, oldest first: accepted, queued, scheduled, sent, failed, cancelled, rescheduled and, when it was tracked, every counted open, click and download. When more follow, the last line gives a cursor.
Inputs
idstringRequired- Not empty
limitinteger- At least 1At most 100
cursorstring
Also available in
rescheduleEmail
Move a scheduled or queued email to a new time. scheduledAt is an ISO 8601 instant or a duration such as PT2H, in the future and at most a year out. getCurrentDate gives the time now.
Inputs
idstringRequired- Not empty
scheduledAtstringRequired- Not empty
Also available in
updateScheduledEmail
Change an email that has not gone yet: its subject, its body as html or text, the address it goes out as, or who it goes to. A recipient list replaces the stored one whole. A field you leave out keeps its value. A message translated when it was accepted keeps its wording, and one that was encrypted keeps its wording and its recipients, so cancel it and send again instead.
Inputs
idstringRequired- Not empty
subjectstring- Up to 998 characters
htmlstring- Up to 1000000 characters
textstring- Up to 1000000 characters
fromstringtoobject[]- 1 to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
ccobject[]- Up to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
bccobject[]- Up to 50 items
emailstringRequired- Up to 320 charactersFormat
email namestring- Up to 128 characters
Also available in
cancelEmail
Stop an email that has not gone yet: a scheduled one, or one still inside its undo window. It cannot be brought back afterwards, only sent again. One that has already gone cannot be cancelled. Cancelling twice is not an error.
Inputs
idstringRequired- Not empty