Intermediate 3-4 hours · 2 APIs
Build a GitHub Activity Digest
Get a daily email summary of activity across your GitHub repositories. Track new issues, pull requests, and stars.
APIs Used
Data Flow
User Action
API Call
Transform
Output
How It Works
1
Authenticate with GitHub API using a personal access token
2
Fetch recent events across your repositories (last 24 hours)
3
Categorize events by type (issues, PRs, stars, forks)
4
Format into an HTML email and send via SendGrid
Code Outline
Pseudocode / JavaScript
// 1. Fetch GitHub events
const eventsRes = await fetch('https://api.github.com/users/YOUR_USERNAME/received_events', {
headers: { 'Authorization': 'token YOUR_GITHUB_TOKEN' }
});
const events = await eventsRes.json();
// 2. Filter last 24 hours
const yesterday = new Date(Date.now() - 86400000);
const recent = events.filter(e => new Date(e.created_at) > yesterday);
// 3. Categorize events
const issues = recent.filter(e => e.type === 'IssuesEvent');
const prs = recent.filter(e => e.type === 'PullRequestEvent');
const stars = recent.filter(e => e.type === 'WatchEvent');
// 4. Send email digest via SendGrid
const html = `<h2>Daily GitHub Digest</h2>
<p>New Issues: ${issues.length} | PRs: ${prs.length} | Stars: ${stars.length}</p>`;
await fetch('https://api.sendgrid.com/v3/mail/send', {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_SENDGRID_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({
personalizations: [{ to: [{ email: '[email protected]' }] }],
from: { email: '[email protected]' },
subject: 'Your Daily GitHub Digest',
content: [{ type: 'text/html', value: html }]
})
}); Recipe Details
Difficulty Intermediate
Time 3-4 hours
APIs Used 2
Tags
Related Recipes
Note: These recipes are AI-generated suggestions based on API capabilities. Actual implementation may vary. Always refer to official API documentation for the latest specifications.