AACFlow

AgentMail

Manage email inboxes, threads, and messages with AgentMail

Usage Instructions

Integrate AgentMail into your workflow. Create and manage email inboxes, send and receive messages, reply to threads, manage drafts, and organize threads with labels. Requires API Key.

Tools

agentmail_create_draft

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
tostringNoNo description
subjectstringNoNo description
textstringNoNo description
htmlstringNoNo description
ccstringNoNo description
bccstringNoNo description
inReplyTostringNoNo description
sendAtstringNoNo description

Output

ParameterTypeDescription
draftIdstringUnique identifier for the draft
inboxIdstringInbox the draft belongs to
subjectstringDraft subject
toarrayRecipient email addresses
ccarrayCC email addresses
bccarrayBCC email addresses
textstringPlain text content
htmlstringHTML content
previewstringDraft preview text
labelsarrayLabels assigned to the draft
inReplyTostringMessage ID this draft replies to
sendStatusstringSend status (scheduled, sending, failed)
sendAtstringScheduled send time
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp

agentmail_create_inbox

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
usernamestringNoNo description
domainstringNoNo description
displayNamestringNoNo description

Output

ParameterTypeDescription
inboxIdstringUnique identifier for the inbox
emailstringEmail address of the inbox
displayNamestringDisplay name of the inbox
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp

agentmail_delete_draft

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
draftIdstringYesNo description

Output

ParameterTypeDescription
deletedbooleanWhether the draft was successfully deleted

agentmail_delete_inbox

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description

Output

ParameterTypeDescription
deletedbooleanWhether the inbox was successfully deleted

agentmail_delete_thread

Delete an email thread in AgentMail (moves to trash, or permanently deletes if already in trash)

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
threadIdstringYesNo description
permanentbooleanNoNo description

Output

ParameterTypeDescription
deletedbooleanWhether the thread was successfully deleted

agentmail_forward_message

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
messageIdstringYesNo description
tostringYesNo description
subjectstringNoNo description
textstringNoNo description
htmlstringNoNo description
ccstringNoNo description
bccstringNoNo description

Output

ParameterTypeDescription
messageIdstringID of the forwarded message
threadIdstringID of the thread

agentmail_get_draft

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
draftIdstringYesNo description

Output

ParameterTypeDescription
draftIdstringUnique identifier for the draft
inboxIdstringInbox the draft belongs to
subjectstringDraft subject
toarrayRecipient email addresses
ccarrayCC email addresses
bccarrayBCC email addresses
textstringPlain text content
htmlstringHTML content
previewstringDraft preview text
labelsarrayLabels assigned to the draft
inReplyTostringMessage ID this draft replies to
sendStatusstringSend status (scheduled, sending, failed)
sendAtstringScheduled send time
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp

agentmail_get_inbox

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description

Output

ParameterTypeDescription
inboxIdstringUnique identifier for the inbox
emailstringEmail address of the inbox
displayNamestringDisplay name of the inbox
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp

agentmail_get_message

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
messageIdstringYesNo description

Output

ParameterTypeDescription
messageIdstringUnique identifier for the message
threadIdstringID of the thread this message belongs to
fromstringSender email address
toarrayRecipient email addresses
ccarrayCC email addresses
bccarrayBCC email addresses
subjectstringMessage subject
textstringPlain text content
htmlstringHTML content
createdAtstringCreation timestamp

agentmail_get_thread

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
threadIdstringYesNo description

Output

ParameterTypeDescription
threadIdstringUnique identifier for the thread
subjectstringThread subject
sendersarrayList of sender email addresses
recipientsarrayList of recipient email addresses
messageCountnumberNumber of messages in the thread
labelsarrayLabels assigned to the thread
lastMessageAtstringTimestamp of last message
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp
messagesarrayMessages in the thread
messageIdstringUnique identifier for the message
fromstringSender email address
toarrayRecipient email addresses
ccarrayCC email addresses
bccarrayBCC email addresses
subjectstringMessage subject
textstringPlain text content
htmlstringHTML content
createdAtstringCreation timestamp

agentmail_list_drafts

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
limitnumberNoNo description
pageTokenstringNoNo description

Output

ParameterTypeDescription
draftsarrayList of drafts
draftIdstringUnique identifier for the draft
inboxIdstringInbox the draft belongs to
subjectstringDraft subject
toarrayRecipient email addresses
ccarrayCC email addresses
bccarrayBCC email addresses
previewstringDraft preview text
sendStatusstringSend status (scheduled, sending, failed)
sendAtstringScheduled send time
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp
countnumberTotal number of drafts
nextPageTokenstringToken for retrieving the next page

agentmail_list_inboxes

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
limitnumberNoNo description
pageTokenstringNoNo description

Output

ParameterTypeDescription
inboxesarrayList of inboxes
inboxIdstringUnique identifier for the inbox
emailstringEmail address of the inbox
displayNamestringDisplay name of the inbox
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp
countnumberTotal number of inboxes
nextPageTokenstringToken for retrieving the next page

agentmail_list_messages

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
limitnumberNoNo description
pageTokenstringNoNo description

Output

ParameterTypeDescription
messagesarrayList of messages in the inbox
messageIdstringUnique identifier for the message
fromstringSender email address
toarrayRecipient email addresses
subjectstringMessage subject
previewstringMessage preview text
createdAtstringCreation timestamp
countnumberTotal number of messages
nextPageTokenstringToken for retrieving the next page

agentmail_list_threads

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
limitnumberNoNo description
pageTokenstringNoNo description
labelsstringNoNo description
beforestringNoNo description
afterstringNoNo description

Output

ParameterTypeDescription
threadsarrayList of email threads
threadIdstringUnique identifier for the thread
subjectstringThread subject
sendersarrayList of sender email addresses
recipientsarrayList of recipient email addresses
messageCountnumberNumber of messages in the thread
lastMessageAtstringTimestamp of last message
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp
countnumberTotal number of threads
nextPageTokenstringToken for retrieving the next page

agentmail_reply_message

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
messageIdstringYesNo description
textstringNoNo description
htmlstringNoNo description
tostringNoNo description
ccstringNoNo description
bccstringNoNo description
replyAllbooleanNoNo description

Output

ParameterTypeDescription
messageIdstringID of the sent reply message
threadIdstringID of the thread

agentmail_send_draft

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
draftIdstringYesNo description

Output

ParameterTypeDescription
messageIdstringID of the sent message
threadIdstringID of the thread

agentmail_send_message

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
tostringYesNo description
subjectstringYesNo description
textstringNoNo description
htmlstringNoNo description
ccstringNoNo description
bccstringNoNo description

Output

ParameterTypeDescription
threadIdstringID of the created thread
messageIdstringID of the sent message
subjectstringsubject output from the tool
tostringRecipient email address

agentmail_update_draft

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
draftIdstringYesNo description
tostringNoNo description
subjectstringNoNo description
textstringNoNo description
htmlstringNoNo description
ccstringNoNo description
bccstringNoNo description
sendAtstringNoNo description

Output

ParameterTypeDescription
draftIdstringUnique identifier for the draft
inboxIdstringInbox the draft belongs to
subjectstringDraft subject
toarrayRecipient email addresses
ccarrayCC email addresses
bccarrayBCC email addresses
textstringPlain text content
htmlstringHTML content
previewstringDraft preview text
labelsarrayLabels assigned to the draft
inReplyTostringMessage ID this draft replies to
sendStatusstringSend status (scheduled, sending, failed)
sendAtstringScheduled send time
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp

agentmail_update_inbox

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
displayNamestringYesNo description

Output

ParameterTypeDescription
inboxIdstringUnique identifier for the inbox
emailstringEmail address of the inbox
displayNamestringDisplay name of the inbox
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp

agentmail_update_message

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
messageIdstringYesNo description
addLabelsstringNoNo description
removeLabelsstringNoNo description

Output

ParameterTypeDescription
messageIdstringUnique identifier for the message
labelsarrayCurrent labels on the message

agentmail_update_thread

Input

ParameterTypeRequiredDescription
apiKeystringYesNo description
inboxIdstringYesNo description
threadIdstringYesNo description
addLabelsstringNoNo description
removeLabelsstringNoNo description

Output

ParameterTypeDescription
threadIdstringUnique identifier for the thread
labelsarrayCurrent labels on the thread

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started