What the model is told
Send an email to a customer. Ask for their email address if you do not have it and spell it back to confirm. Provide a clear subject and plain text body. SendGrid replies with an empty 202 response when it has accepted the email, so tell the customer it has been sent, not that it has arrived. Only send to the number or address the customer gave you in this conversation, and read it back to confirm it, together with the message wording, before calling this tool.
Request
POSThttps://api.sendgrid.com/v3/mail/send
Headers
Content-Typeapplication/jsonAuthorizationBearer YOUR_SENDGRID_API_KEY
Body
{
"personalizations": [
{
"to": [
{
"email": "{{toEmail}}"
}
]
}
],
"from": {
"email": "YOUR_SENDGRID_FROM_EMAIL"
},
"subject": "{{subject}}",
"content": [
{
"type": "text/plain",
"value": "{{message}}"
}
]
}Parameters
toEmail stringThe customer's email address.subject stringThe email subject line.message stringThe plain text body of the email.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "b867cb02-e057-414d-bb54-4f7dce66481a",
"type": "HTTP_REQUEST",
"label": "Send SendGrid Email",
"name": "send_sendgrid_email",
"customName": false,
"description": "Send an email to a customer. Ask for their email address if you do not have it and spell it back to confirm. Provide a clear subject and plain text body. SendGrid replies with an empty 202 response when it has accepted the email, so tell the customer it has been sent, not that it has arrived. Only send to the number or address the customer gave you in this conversation, and read it back to confirm it, together with the message wording, before calling this tool.",
"parameters": [
{
"name": "toEmail",
"type": "string",
"description": "The customer's email address."
},
{
"name": "subject",
"type": "string",
"description": "The email subject line."
},
{
"name": "message",
"type": "string",
"description": "The plain text body of the email."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://api.sendgrid.com/v3/mail/send"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer YOUR_SENDGRID_API_KEY"
}
],
"body": "{\n \"personalizations\": [\n {\n \"to\": [\n {\n \"email\": \"{{toEmail}}\"\n }\n ]\n }\n ],\n \"from\": {\n \"email\": \"YOUR_SENDGRID_FROM_EMAIL\"\n },\n \"subject\": \"{{subject}}\",\n \"content\": [\n {\n \"type\": \"text/plain\",\n \"value\": \"{{message}}\"\n }\n ]\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.