fast-gateway-protocol

sendgrid-daemon

Fast SendGrid email operations via FGP daemon. Use when user needs to send emails, use templates, manage contacts, or check email stats via SendGrid. Triggers on "sendgrid send", "send email sendgrid", "sendgrid template", "email stats", "add contact sendgrid".

fast-gateway-protocol 2 Updated 4mo ago

Resources

1
GitHub

Install

npx skillscat add fast-gateway-protocol/fgp-skills/sendgrid-daemon

Install via the SkillsCat registry.

SKILL.md

FGP SendGrid Daemon

Why FGP?

FGP daemons maintain persistent connections and avoid cold-start overhead. Instead of spawning a new API client for each request, the daemon stays warm and ready.

Benefits:

  • No cold-start latency
  • Connection pooling
  • Persistent authentication

Installation

# Via Homebrew (recommended)
brew tap fast-gateway-protocol/fgp
brew install fgp-sendgrid

# Via npx
npx add-skill fgp-sendgrid

Quick Start

export SENDGRID_API_KEY="your-api-key"
fgp start sendgrid
fgp call sendgrid.send --to "user@example.com" --subject "Hello" --body "World"

Methods

  • sendgrid.send - Send a plain text or HTML email
  • sendgrid.send_template - Send an email using a dynamic template
  • sendgrid.list_contacts - List contacts from your marketing lists
  • sendgrid.add_contact - Add a contact to a marketing list
  • sendgrid.get_stats - Get email sending statistics
  • sendgrid.validate_email - Validate an email address

Authentication

Set the SENDGRID_API_KEY environment variable with your SendGrid API key.

export SENDGRID_API_KEY="SG.xxxxxx"

Example Usage

Send a Simple Email

fgp call sendgrid.send \
  --to "recipient@example.com" \
  --from "sender@yourdomain.com" \
  --subject "Welcome!" \
  --body "<h1>Hello World</h1>"

Send a Template Email

fgp call sendgrid.send_template \
  --to "recipient@example.com" \
  --template_id "d-xxxxxxxxxxxxx" \
  --dynamic_data '{"name": "John", "product": "FGP"}'

Get Sending Statistics

fgp call sendgrid.get_stats --start_date "2026-01-01" --end_date "2026-01-17"