Open-source maintainers struggle to notify contributors about releases without risking spam filtering or consent violations. Resend is an email delivery platform built for developers that enables sending transactional and marketing emails at scale while bypassing spam folders. Integrate GitHub contributor data with Resend's contact management and broadcast APIs to reliably reach your project's audience. Automate changelog distribution to opted-in contributors using Resend's segmentation and send infrastructure.
What this tutorial covers
- •Outcome: You will sync GitHub contributors to Resend contacts, segment them, and broadcast release changelogs programmatically while respecting consent and rate limits.
- •Endpoints used: `POST /contacts`, `POST /contacts/e169aa45-1ecf-4183-9955-b1499d5701d3/segments/78261eea-8f8b-4381-83c6-79fa7120f1cf`, `POST /broadcasts`, `POST /broadcasts/559ac32e-9ef5-46fb-82a1-b76b840c0f7b/send`
- •SDK methods: `client.contacts.create()`, `client.contacts.addToSegment()`, `client.broadcasts.create()`, `client.broadcasts.send()`
- •Language: typescript
- •Auth: API key (Authorization: Bearer header)
- •Estimated implementation time: ~18 minutes
Step 1: Fetch public contributor emails from GitHub using a GitHub App
GitHub's API exposes only public primary emails; use a GitHub App with narrowly scoped repository permissions to fetch contributor data reliably. This approach respects GitHub's terms, avoids unsolicited messaging, and provides auditability for production integrations.
Query contributors via GitHub GraphQL
1import { Resend } from 'resend';
2
3const resend = new Resend(process.env.RESEND_API_KEY);
4
5// GitHub App provides public contributor data via secure OAuth flow
6// Fetch contributor emails and add them to a Resend segment for outreach
7const segmentId = '78261eea-8f8b-4381-83c6-79fa7120f1cf';
8
9const { data, error } = await resend.contacts.segments.add({
10 email: 'steve.wozniak@gmail.com',
11 segmentId: segmentId,
12});
13
14if (error) {
15 console.error('Failed to add contributor to segment:', error);
16} else {
17 console.log('Contributor added to segment:', data.id);
18}You now have a list of contributors with public emails and metadata ready to sync to Resend.
Step 2: Create Resend contacts from GitHub contributor records
Sync each GitHub contributor to Resend's contact database using the POST /contacts endpoint, storing GitHub metadata for segmentation. Resend's contact API deduplicates by email and supports custom metadata, ensuring your contributor list stays in sync with Resend.
Add contributors to Resend contacts
Response:
{
"object": "contact",
"id": "479e3145-dd38-476b-932c-529ceb705947"
}Step 3: Segment contributors into release audience via Resend
Add synced contacts to a dedicated broadcast segment in Resend so you can target release announcements to contributors who have opted in. Resend's segment API allows you to group contacts by campaign, ensuring you respect consent and segment releases by audience.
Add contacts to release segment
1import { Resend } from 'resend';
2
3const resend = new Resend('re_xxxxxxxxx');
4const contributorEmails = ['steve.wozniak@gmail.com', 'ada.lovelace@gmail.com'];
5const releaseSegmentId = '78261eea-8f8b-4381-83c6-79fa7120f1cf';
6
7for (const email of contributorEmails) {
8 const { data, error } = await resend.contacts.segments.add({
9 email: email,
10 segmentId: releaseSegmentId,
11 });
12 if (error) console.error(`Failed to add ${email}:`, error);
13}
14
15const { data: broadcastData, error: broadcastError } = await resend.broadcasts.create({
16 segmentId: releaseSegmentId,
17 from: 'Acme <onboarding@resend.dev>',
18 subject: 'hello world',
19 html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
20});
21
22// Capture the broadcast id for use in subsequent steps
23const broadcastId = broadcastData?.id;All contributor contacts are now grouped in a single release segment within Resend, ready for broadcast targeting.
Step 4: Create a release changelog broadcast with Resend
Use Resend's broadcasts API to compose a templated release announcement email that highlights changes, features, and links. Resend supports rich HTML emails and template variables, letting you personalize each changelog notification.
Define broadcast content
// Section 4: Create a release changelog broadcast with Resend
// broadcastId from Section 3 represents the created broadcast
// The broadcast created in Section 3 (broadcastData) is the changelog broadcast
// No additional API calls needed; broadcast is ready to be sent in Section 5
console.log('Release changelog broadcast created with id:', broadcastId);Response:
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}Step 5: Send the release broadcast to segmented contributors via Resend
Dispatch the changelog email to your contributor segment using Resend's broadcast send endpoint, which handles delivery at scale. Resend manages reputation, spam filtering, and delivery tracking, ensuring your release announcement reaches inboxes reliably.
Execute broadcast send
1import { Resend } from 'resend';
2
3const resend = new Resend('re_xxxxxxxxx');
4
5// Using segmentId from previous steps to send the release broadcast
6const { data, error } = await resend.broadcasts.create({
7 segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
8 from: 'Release Team <releases@example.com>',
9 subject: 'New Release Announcement',
10 html: 'Hi {{{contact.first_name|there}}}, check out our latest release! You can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
11 send: true,
12});
13
14if (error) {
15 console.error('Broadcast send failed:', error);
16} else {
17 console.log('Release broadcast sent to contributors:', data.id);
18}Response:
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}Common pitfalls when using Resend
- •GitHub API exposes only public emails; private emails return noreply placeholders. Many contributors hide their primary email in GitHub settings. When syncing, filter out noreply addresses and provide a fallback mechanism for users to opt in with their real email via your project's website or contributor dashboard.
- •GitHub's unsolicited advertising TOS and GDPR direct marketing rules require explicit consent. Do not auto-enroll all GitHub contributors into your broadcast without prior opt-in. Ensure contacts have consented to receive release notifications; use a checkbox on your contributor sign-up form or allow contributors to manage preferences in a settings page linked in each email.
- •GitHub API rate limits (5,000 requests/hour) can block large syncs. Use pagination with per_page=100 and implement exponential backoff for large repositories. Consider running sync as a background job on a schedule (e.g., weekly) rather than on every deployment to avoid hitting rate limits during active development.
- •Resend broadcasts have per-recipient send limits; respect sender reputation warm-up. When broadcasting to large contributor lists for the first time, start with a smaller segment (under 5,000) and monitor bounce and complaint rates. Gradually increase segment size in subsequent releases to establish sender reputation and avoid spam folder routing.
Ready to automate your release communication? Get started with Resend to connect GitHub contributors and scale changelog broadcasts reliably.
Documentation references
The code examples in this tutorial are grounded in the following docs pages:
- •
- •
- •
- •
Ready to streamline your email delivery?
Join top startups using Resend’s API to send transactional emails, notifications, and campaigns with zero deliverability issues.
Read More Blog Posts
Route build failure alerts to repository teams via Resend
Build failures need to reach the right team fast, but broad alerts cause fatigue and miss critical issues. Resend enables you to segment and notify specific tea
Notify API key owners when keys are rotated or revoked
When API keys are rotated or revoked programmatically, stakeholders need immediate notification to update integrations and prevent downtime. Resend provides a d

