Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
SENDGRID_API_KEYYesSendGrid API key (starts with SG.) Docs.

Setup

  1. Sign in to SendGrid: Go to https://app.sendgrid.com and sign in. A free tier account is sufficient for testing.
  2. Verify a sender: Under Settings → Sender Authentication, verify a single sender address or authenticate your domain. Mail Send rejects unverified ‘from’ addresses.
  3. Create an API key: Open Settings → API Keys (https://app.sendgrid.com/settings/api_keys) and create a key with Full Access, or Restricted Access including Mail Send, Marketing, Template Engine, and Stats.
  4. Set the environment variable: Add the key to your .env as SENDGRID_API_KEY=SG…
  5. Verify access: Run List Templates to confirm the key works, then send a test email to yourself.
  • SendGrid authenticates with ‘Authorization: Bearer SG.xxx’
  • Mail Send returns HTTP 202 with an empty body on success
  • Upsert Contacts is asynchronous - changes can take a few minutes to appear in List Contacts
Provider API reference: https://www.twilio.com/docs/sendgrid/api-reference

Tools

ToolAccessDescription
Send EmailWriteSend an email via the SendGrid v3 Mail Send API
List ContactsReadList marketing contacts in the account
Search ContactsReadSearch marketing contacts with an SGQL query (read-only search via POST)
Upsert ContactsWriteAdd or update marketing contacts (asynchronous; returns a job_id)
List TemplatesReadList transactional email templates
Get Email StatsReadGet global email statistics (delivered, opens, clicks, bounces) for a date range

Example prompts

  • Send an email via SendGrid with a subject, recipient, and HTML body.
  • Show my SendGrid email stats for the last 30 days and summarize delivery, open, and bounce rates.