Skip to content

therapyneuroflex-source/claude-bounty-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

GitHub Weekly Summary with Claude API

Automated n8n workflow that generates AI-powered narrative summaries of your GitHub repository activity every week. Fetches commits, PRs, and closed issues over the past 7 days, then uses Claude (Anthropic) to create a professional summary delivered to Slack, Discord, or email.

Features

  • Weekly Schedule Trigger: Runs every Friday at 5 PM UTC (configurable)
  • GitHub Data Aggregation: Fetches commits, merged PRs, and closed issues from the past 7 days
  • Claude API Integration: Generates narrative summaries highlighting key changes and impact
  • Multi-Channel Delivery: Slack, Discord, or Email output (or all three)
  • Configurable Variables: Repository owner, repo name, language (EN/FR), and notification channels
  • Production-Ready: Error handling and execution logging enabled

Setup Instructions (5 Steps)

Step 1: Import the Workflow

  1. Log into your n8n instance (self-hosted or cloud)
  2. Click "New Workflow""Import from File"
  3. Select the workflow.json file from this repository
  4. Click "Import"

Step 2: Configure GitHub Credentials

  1. In the workflow editor, click on any "GitHub" node
  2. Click the GitHub credential dropdown → "Create New"
  3. Select "OAuth2" authentication
  4. Authorize your GitHub account when prompted
  5. Save the credential

Step 3: Add Anthropic API Key

  1. In the workflow editor, click on the "Claude: Generate Summary" node
  2. Click the Anthropic credential dropdown → "Create New"
  3. Paste your Anthropic API key (get it from console.anthropic.com)
  4. Save the credential

Step 4: Set Environment Variables

  1. Click "Workflow Settings" (top right)
  2. Add these environment variables (adjust values for your setup):
    GITHUB_OWNER=your-github-username
    GITHUB_REPO=your-repository-name
    SUMMARY_LANGUAGE=English
    SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
    DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR/WEBHOOK
    EMAIL_FROM=noreply@yourcompany.com
    EMAIL_TO=recipient@yourcompany.com
    

Step 5: Test and Deploy

  1. Click "Execute Workflow" (play button, top right)
  2. Check execution logs to verify GitHub fetch, Claude summary generation, and delivery
  3. Confirm the summary appears in your chosen channel (Slack/Discord/Email)
  4. Click "Activate" to enable the weekly schedule

Configuration

Environment Variables Reference

Variable Required Default Notes
GITHUB_OWNER Yes Your GitHub username or organization name
GITHUB_REPO Yes Repository name to summarize
SUMMARY_LANGUAGE No English Language for summary (English or French)
SLACK_WEBHOOK_URL No Slack incoming webhook for notifications
DISCORD_WEBHOOK_URL No Discord webhook for notifications
EMAIL_FROM If using email Sender email address
EMAIL_TO If using email Recipient email address

Choosing a Delivery Channel

The workflow sends to all three channels if all webhooks/email are configured. To use only one:

  • Slack Only: Set SLACK_WEBHOOK_URL, leave others empty
  • Discord Only: Set DISCORD_WEBHOOK_URL, leave others empty
  • Email Only: Set EMAIL_FROM and EMAIL_TO, configure SMTP credentials, leave webhooks empty

Customizing the Schedule

To change the trigger time (default: Friday 5 PM):

  1. Click the "Schedule Trigger" node
  2. Adjust Trigger at hour (0-23) and Trigger at minute (0-59)
  3. Change Trigger at day of week (5 = Friday, 0 = Sunday)
  4. Save

API Keys Required

GitHub

Anthropic (Claude)

Slack (Optional)

Discord (Optional)

  • Create webhook in your Discord server settings → Webhooks

Testing Without Schedule

To test immediately without waiting for Friday:

  1. Remove or disable the "Schedule Trigger" node
  2. Add a "Manual Trigger" (or "Webhook") node
  3. Connect it to "Configuration"
  4. Click "Execute Workflow" to run manually
  5. Re-add the Schedule Trigger for production use

Troubleshooting

Issue Solution
GitHub fetch fails Verify GitHub credentials are saved and the repo exists. Check GITHUB_OWNER and GITHUB_REPO variables.
Claude API error Ensure API key is valid and has sufficient credits. Check console.anthropic.com.
Slack/Discord shows no message Verify webhook URLs are correct and active. Test webhook URL in browser.
Email not sent Configure SMTP credentials in n8n. Test with a simple email node first.
Workflow times out Increase Max Execution Time in Workflow Settings to 3600+ seconds.

Customization Ideas

  • Change Claude model to claude-opus-4-20250514 for more detailed summaries
  • Modify the prompt in the "Claude: Generate Summary" node for different summary styles
  • Add additional GitHub API nodes to fetch comments, contributors, or code metrics
  • Integrate with Jira, Linear, or other tools by adding more aggregation nodes

Acceptance Criteria Checklist

  • ✅ Exportable n8n workflow (.json file)
  • ✅ Weekly cron schedule (Friday 5 PM UTC)
  • ✅ Fetches commits, closed issues, merged PRs from last 7 days
  • ✅ Calls Claude API (claude-sonnet-4-20250514) for narrative summary
  • ✅ Multi-channel delivery (Slack, Discord, Email)
  • ✅ Configurable variables (repo, channel, language)
  • ✅ README with 5-step setup (this document)
  • ✅ Production-ready with error logging

License

MIT

Support

For issues or questions, refer to:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors