AGENT SKILL

sendgrid

Send transactional and marketing emails via SendGrid API. Supports templates, attachments, and email analytics.

License 许可
MIT
最近更新
2026-04-05
Stars
★ 7
Forks
1

01 前言 Front Matter

name
sendgrid
metadata
{ "clawdbot": { "emoji": "?", "requires": { "env": [ "SENDGRID_API_KEY" ] } } }
description
Send transactional and marketing emails via SendGrid API. Supports templates, attachments, and email analytics.

02 资源文件 1

03 SKILL.md 正文

SendGrid

Send emails at scale.

Environment

export SENDGRID_API_KEY="SG.xxxxxxxxxx"

Send Email

curl -X POST "https://api.sendgrid.com/v3/mail/send" \
  -H "Authorization: Bearer $SENDGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{"to": [{"email": "recipient@example.com"}]}],
    "from": {"email": "sender@example.com"},
    "subject": "Hello",
    "content": [{"type": "text/plain", "value": "Hello World!"}]
  }'

Send with Template

curl -X POST "https://api.sendgrid.com/v3/mail/send" \
  -H "Authorization: Bearer $SENDGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{
      "to": [{"email": "recipient@example.com"}],
      "dynamic_template_data": {"name": "John", "order_id": "12345"}
    }],
    "from": {"email": "sender@example.com"},
    "template_id": "d-xxxxxxxxxxxx"
  }'

List Templates

curl "https://api.sendgrid.com/v3/templates?generations=dynamic" \
  -H "Authorization: Bearer $SENDGRID_API_KEY"

Get Email Stats

curl "https://api.sendgrid.com/v3/stats?start_date=2024-01-01" \
  -H "Authorization: Bearer $SENDGRID_API_KEY"

Links

04 同仓库更多 Skills