Microsoft
Create Outlook Draft Email
Saves a draft email in a mailbox for a person to review and send.
Unverified
Add this first. This tool needs an access token, so add Get Microsoft Graph Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Get a Microsoft Graph access token first if you do not already have one. Save a draft email for a team member to review, for example a follow-up the customer has asked for. It is not sent. Confirm the recipient and content with the customer. Returns the draft with its ID.
Request
POSThttps://graph.microsoft.com/v1.0/users/YOUR_MAILBOX/messages
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}
Body
{
"subject": "{{subject}}",
"body": {
"contentType": "Text",
"content": "{{content}}"
},
"toRecipients": [
{
"emailAddress": {
"address": "{{toEmail}}"
}
}
]
}Parameters
toEmail stringThe recipient's email address.subject stringThe email subject.content stringThe plain text body of the email.accessToken stringThe access_token value returned by Get Microsoft Graph Access Token. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "4a5cb39a-d39d-4bae-af36-1bf468887dc0",
"type": "HTTP_REQUEST",
"label": "Create Outlook Draft Email",
"name": "create_outlook_draft_email",
"customName": false,
"description": "Get a Microsoft Graph access token first if you do not already have one. Save a draft email for a team member to review, for example a follow-up the customer has asked for. It is not sent. Confirm the recipient and content with the customer. Returns the draft with its ID.",
"parameters": [
{
"name": "toEmail",
"type": "string",
"description": "The recipient's email address."
},
{
"name": "subject",
"type": "string",
"description": "The email subject."
},
{
"name": "content",
"type": "string",
"description": "The plain text body of the email."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by Get Microsoft Graph Access Token. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://graph.microsoft.com/v1.0/users/YOUR_MAILBOX/messages"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": "{\n \"subject\": \"{{subject}}\",\n \"body\": {\n \"contentType\": \"Text\",\n \"content\": \"{{content}}\"\n },\n \"toRecipients\": [\n {\n \"emailAddress\": {\n \"address\": \"{{toEmail}}\"\n }\n }\n ]\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.