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. Send a plain text email from the company mailbox. Confirm the recipient's email address with the customer before sending.
Request
POSThttps://graph.microsoft.com/v1.0/users/YOUR_MAILBOX/sendMail
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}
Body
{
"message": {
"subject": "{{subject}}",
"body": {
"contentType": "Text",
"content": "{{body}}"
},
"toRecipients": [
{
"emailAddress": {
"address": "{{recipientEmail}}"
}
}
]
},
"saveToSentItems": true
}Parameters
recipientEmail stringThe email address to send to.subject stringThe email subject line.body 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": "21fe38e3-05a0-4bf7-a308-916d18a0fa73",
"type": "HTTP_REQUEST",
"label": "Send Outlook Email",
"name": "send_outlook_email",
"customName": false,
"description": "Get a Microsoft Graph access token first if you do not already have one. Send a plain text email from the company mailbox. Confirm the recipient's email address with the customer before sending.",
"parameters": [
{
"name": "recipientEmail",
"type": "string",
"description": "The email address to send to."
},
{
"name": "subject",
"type": "string",
"description": "The email subject line."
},
{
"name": "body",
"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/sendMail"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
}
],
"body": "{\n \"message\": {\n \"subject\": \"{{subject}}\",\n \"body\": {\n \"contentType\": \"Text\",\n \"content\": \"{{body}}\"\n },\n \"toRecipients\": [\n {\n \"emailAddress\": {\n \"address\": \"{{recipientEmail}}\"\n }\n }\n ]\n },\n \"saveToSentItems\": true\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.