Skip to content
Back to skills

Sendgrid

ASecurity

SendGrid handles transactional and marketing email delivery. This skill focuses on the `@sendgrid/mail` SDK and dynamic templates.

  • 13 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 5, 2026
ai-agentsgobashapisecurity

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add ashish7802/awesome-api-skills --skill sendgrid --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sendgrid?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sendgrid
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-sendgrid/badge)](https://www.skillsdirectory.com/skills/ashish7802-sendgrid)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# SendGrid API Skill

## Overview
SendGrid handles transactional and marketing email delivery. This skill focuses on the `@sendgrid/mail` SDK and dynamic templates.

## Installation
```bash
npm install @sendgrid/mail
pip install sendgrid
```

## Authentication
Use a SendGrid API Key. Restrict API key permissions to 'Mail Send' only for production application servers.

## Core Concepts
- **Dynamic Templates**: Handlebars-like syntax for transactional emails.
- **Personalizations**: Allows sending to multiple recipients with unique template data per recipient.

## Common Workflows
1. Set API Key.
2. Construct message object with `template_id` and `dynamic_template_data`.
3. Call `sgMail.send(msg)`.

## Error Handling
Handle HTTP 401 (Invalid Key) and HTTP 403 (Domain not authenticated). Output `error.response.body.errors` for detailed validation messages.

## Security
Ensure Sender Authentication (Domain Authentication / SPF / DKIM) is configured; otherwise emails will go to spam.

## Rate Limits
SendGrid limits depend on the plan, typically supporting thousands of requests per second.

## Best Practices
Do not use `to` arrays for bulk mailing unless you want recipients to see each other. Use multiple `personalizations` instead.

## Troubleshooting
If emails aren't arriving, check the Activity Feed in the SendGrid dashboard for bounces or drops.

## References
- [API Reference](https://docs.sendgrid.com/api-reference)

## Why use this skill
Use this when your agent works with **sendgrid** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Using outdated SDK or API versions from training data
- Inventing environment variable names
- Omitting error handling and retry logic

## Production checklist
- [ ] Secrets in environment variables, not source code
- [ ] Error handling and logging in place
- [ ] Rate limits and timeouts configured

## Related skills
- [`twilio`](../twilio/SKILL.md) — related to

---
> **Last Verified:** 2026-07-02

Files in this skill

  • SKILL.md2 KB
  • examples/example.py91 B
  • examples/example.ts85 B
  • prompts/send-email.md141 B
  • tests/skill.test.ts31 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.