Usage #
// Import the typed helper
import { sendEmail } from "@hotglue/sdk/sendgrid";
const result = await client.execute({
...sendEmail({
from: object,
to: array,
subject: string,
// ...
}),
userId: "user_123",
});
// result is typed as SendEmailOutput
const result = await client.execute({
integration: "sendgrid",
tool: "send_email",
userId: "user_123",
input: {
from: object,
to: array,
subject: string,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["sendgrid"],
userId: "user_123",
}),
});
await agent.generate("run the Send Email tool");
Required Permissions #
mail.send
Input Schema #
from
object
required
to
object[]
required
subject
string
required
content
object[]
required
template_id
string
This tool calls: #
POST
https://api.sendgrid.com/v3/mail/send