SendGrid Integration

Pro v1.0.0

Send emails, manage contacts, and track email analytics with SendGrid's Email API

Requires Claude Code CLI

This skill integrates with SendGrid through Claude Code. Install Claude Code and add this skill to use it.

Available Actions

Send Email

Send a transactional email with plain text or HTML content

Parameters

Name Type Required Description
from string Required Sender email address (must be verified in SendGrid)
to string Required Recipient email address
subject string Required Email subject line
body string Optional Plain text email body (use body OR html)
html string Optional HTML email body (use body OR html)

Returns

object Send confirmation with status code and message ID

Try saying...

  • "Send an email to user@example.com about their password reset"
  • "Email the invoice to customer@company.com"
  • "Send a welcome email to new-user@example.com"

Send Template Email

Send an email using a pre-configured dynamic template

Parameters

Name Type Required Description
from string Required Sender email address
to string Required Recipient email address
template_id string Required SendGrid template ID (starts with 'd-')
template_data string Optional JSON string of dynamic template data

Returns

object Send confirmation with status code and message ID

Try saying...

  • "Send the welcome template to new-user@example.com"
  • "Use template d-abc123 to email customer@company.com"
  • "Send password reset template to user@example.com"

List Templates

View all available email templates in your SendGrid account

Returns

array List of templates with ID, name, and updated timestamp

Try saying...

  • "Show me all email templates"
  • "List available SendGrid templates"
  • "What email templates do I have?"

Get Email Statistics

Retrieve email delivery statistics including opens, clicks, and bounces

Parameters

Name Type Required Description
start_date string Optional Start date in YYYY-MM-DD format (defaults to 30 days ago)
end_date string Optional End date in YYYY-MM-DD format (defaults to today)
aggregated_by string Optional Aggregation period: day, week, or month

Returns

array Statistics including requests, delivered, opens, clicks, and bounces

Try saying...

  • "Show me email stats for the last 7 days"
  • "Get delivery statistics for January 2025"
  • "What's my email open rate this month?"

Add Contact

Add a contact to your SendGrid marketing contacts

Parameters

Name Type Required Description
email string Required Contact email address
first_name string Optional Contact first name
last_name string Optional Contact last name

Returns

object Confirmation of contact creation

Try saying...

  • "Add john@example.com to our contact list"
  • "Create a new contact for jane.smith@company.com"
  • "Add subscriber bob@example.com with name Bob Johnson"

Getting Started

API Key Easy Setup
  1. 1 Sign up or log in at sendgrid.com
  2. 2 Navigate to Settings > API Keys
  3. 3 Click 'Create API Key'
  4. 4 Choose 'Full Access' or select specific permissions
  5. 5 Copy the API key (shown only once)
  6. 6 Add to shell config: echo 'export SENDGRID_API_KEY="YOUR_KEY"' >> ~/.zshrc
  7. 7 Restart terminal or run: source ~/.zshrc

Verify Setup

python scripts/client.py list-templates

Success: Returns list of templates or 'No templates found'

Security & Access

Access Scope

API key grants access to send emails and manage SendGrid account based on selected permissions (Full Access, Mail Send only, etc.)

  • API key can send emails on behalf of your domain
  • Restrict API key permissions to minimum required (e.g., Mail Send only)
  • Never commit API keys to version control
  • Monitor email activity for unauthorized sending
  • Use sender domain verification to prevent spoofing

Limitations

  • Maximum 1,000 recipients per API call
  • Maximum email size of 30MB including attachments
  • Sender email addresses must be verified in SendGrid
  • Custom arguments must be less than 10,000 bytes

Get This Skill

Requires Pro subscription ($9/month)

Quick Reference

Type
PYTHON_SDK
Auth
API Key
Setup
Easy Setup
Tools Required
Bash
Python Dependencies
sendgrid>=6.11.0

Have Feedback?

Help us improve this skill by sharing your ideas and suggestions.

Request Improvements