RedPlanetHQ / RedPlanetHQ/core
New Integration: SendGrid
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 194
- Avg merge
- 12m
- Merged PRs (30d)
- 2
Description
Description
Add SendGrid integration to sync email delivery events, campaigns, and analytics into CORE.
Reference Implementations
Existing Integrations (use as templates)
integrations/gmail/- Similar email-based integrationintegrations/slack/- Messaging and notification patternsintegrations/linear/- For reference
Required Files Structure
integrations/sendgrid/
├── src/
│ ├── index.ts # Main entry, API key spec
│ ├── schedule.ts # Sync logic
│ ├── utils.ts # SendGrid API utilities
│ ├── account-create.ts # API key setup
│ └── create-activity.ts # Activity formatting
├── package.json
├── tsup.config.ts
└── README.md
SendGrid API Integration
Auth Setup
- Use API Key authentication
- API Key sent in
Authorization: Bearer <API_KEY>header - Base URL:
https://api.sendgrid.com/v3/ - All requests must be over HTTPS (HTTP not supported)
Key Endpoints
POST /v3/mail/send- Send emailGET /v3/stats- Retrieve email statisticsGET /v3/messages- Email activity feedGET /v3/campaigns- List marketing campaignsGET /v3/contactdb/recipients- Contact managementGET /v3/suppression/bounces- Bounce managementGET /v3/templates- Email templatesPOST /v3/user/webhooks/event/settings- Configure event webhooks
Events to Track
- Email Delivery - Sent, delivered, bounced, deferred
- Engagement - Opened, clicked, unsubscribed
- Campaigns - Campaign created, sent, completed
- Suppressions - Bounces, spam reports, unsubscribes
- Templates - Template created, updated, deleted
Implementation Tasks
- Set up basic integration structure following
integrations/github/src/index.tspattern - Implement API key authentication flow in
account-create.ts - Create API utilities in
utils.tsfor v3 API - Implement sync logic in
schedule.tsfor email events and statistics - Set up webhook handling for real-time delivery events
- Convert SendGrid events to CORE activity format
- Add error handling and rate limiting
- Create integration documentation
- Add to
integrations/README.md
Technical Notes
- SendGrid is owned by Twilio; API docs are hosted on Twilio's domain
- SDKs available for 7 languages (Node.js, Python, Ruby, Go, Java, C#, PHP)
- Event webhooks provide real-time delivery and engagement notifications
- Postman collections available for interactive API exploration
- API key must be included in the Authorization header as a Bearer token
Resources
- SendGrid v3 API Reference
- Getting Started with SendGrid API
- SendGrid API Requests
- SendGrid API Responses
- SendGrid Python SDK (GitHub)
Labels
enhancement, integration, new-feature
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing integrations/gmail/, integrations/slack/, integrations/linear/, and integrations/github/src/index.ts. Trace the existing account setup, scheduling, activity formatting, and webhook patterns before defining the SendGrid integration files listed in the issue. Done means the API-key flow, event and statistics synchronization, webhooks, error handling, documentation, and integrations/README.md entry are complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100