-
-
Notifications
You must be signed in to change notification settings - Fork 0
Email Notifications
Ferran Buireu edited this page Feb 15, 2026
·
3 revisions
GitHub Star Tracker can send HTML email reports with charts and star data. This guide covers both built-in SMTP and external email action setups.
- HTML formatted report with inline CSS
- Embedded charts (via QuickChart.io URLs)
- Repository table with star counts and deltas
- Stargazer section (if
track-stargazersenabled) - Forecast tables (if enough history)
- Localized content based on
localesetting - Responsive design for desktop and mobile
Use dawidd6/action-send-mail for maximum flexibility.
- Well-maintained and battle-tested
- Better error handling and logging
- Supports attachments
- Full control over send conditions
name: Track Stars with Email
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
track:
runs-on: ubuntu-latest
steps:
- name: Track stars
id: tracker
uses: fbuireu/github-star-tracker@v1
with:
github-token: ${{ secrets.GITHUB_STAR_TRACKER_TOKEN }}
include-charts: true
- name: Send email
if: steps.tracker.outputs.stars-changed == 'true'
uses: dawidd6/action-send-mail@v9
with:
server_address: smtp.gmail.com
server_port: 587
username: ${{ secrets.EMAIL_FROM }}
password: ${{ secrets.EMAIL_PASSWORD }}
subject: '⭐ Star Update: ${{ steps.tracker.outputs.total-stars }} total (+${{ steps.tracker.outputs.new-stars }})'
to: ${{ secrets.EMAIL_TO }}
from: GitHub Star Tracker
html_body: ${{ steps.tracker.outputs.report-html }}Only send email when accumulated changes reach a threshold:
- name: Track stars
id: tracker
uses: fbuireu/github-star-tracker@v1
with:
github-token: ${{ secrets.GITHUB_STAR_TRACKER_TOKEN }}
notification-threshold: '5'
- name: Send email when threshold reached
if: steps.tracker.outputs.should-notify == 'true'
uses: dawidd6/action-send-mail@v9
with:
server_address: smtp.gmail.com
server_port: 587
username: ${{ secrets.EMAIL_FROM }}
password: ${{ secrets.EMAIL_PASSWORD }}
subject: '⭐ Stars changed: ${{ steps.tracker.outputs.total-stars }} total'
to: ${{ secrets.EMAIL_TO }}
from: GitHub Star Tracker
html_body: ${{ steps.tracker.outputs.report-html }}Use the action's integrated email functionality by providing SMTP inputs.
- uses: fbuireu/github-star-tracker@v1
with:
github-token: ${{ secrets.GITHUB_STAR_TRACKER_TOKEN }}
include-charts: true
smtp-host: smtp.gmail.com
smtp-port: '587'
smtp-username: ${{ secrets.EMAIL_FROM }}
smtp-password: ${{ secrets.EMAIL_PASSWORD }}
email-from: ${{ secrets.EMAIL_FROM }}
email-to: ${{ secrets.EMAIL_TO }}- Email is sent when
stars-changed == trueAND the notification threshold is reached - If
send-on-no-changes: true, email is sent even with no star changes - Email failures are non-fatal — the action logs a warning and completes successfully
- Subject line is auto-generated and localized
Control when the built-in email fires:
with:
notification-threshold: '0' # Every run with changes (default)
notification-threshold: '10' # After 10 stars accumulated change
notification-threshold: 'auto' # Adaptive based on total starsSee Configuration > notification-threshold for details on adaptive thresholds.
| Secret | Description | Example |
|---|---|---|
EMAIL_FROM |
Sender email address | your.email@gmail.com |
EMAIL_PASSWORD |
App-specific password or API key | abcd efgh ijkl mnop |
EMAIL_TO |
Recipient address | recipient@example.com |
- Enable 2-factor authentication on your Google Account
- Generate an app-specific password:
- Go to Google Account > Security > 2-Step Verification > App passwords
- Select "Mail" and generate
- Copy the 16-character password
smtp-host: smtp.gmail.com
smtp-port: '587'
smtp-username: your.email@gmail.com
smtp-password: ${{ secrets.EMAIL_PASSWORD }} # App passwordsmtp-host: smtp-mail.outlook.com
smtp-port: '587'
smtp-username: your.email@outlook.com
smtp-password: ${{ secrets.EMAIL_PASSWORD }}smtp-host: smtp.office365.com
smtp-port: '587'
smtp-username: your.email@company.com
smtp-password: ${{ secrets.EMAIL_PASSWORD }}- Create an API key at SendGrid Dashboard
- Verify your sender email
smtp-host: smtp.sendgrid.net
smtp-port: '587'
smtp-username: apikey # Literal string "apikey"
smtp-password: ${{ secrets.SENDGRID_API_KEY }}- name: Send email
if: steps.tracker.outputs.stars-changed == 'true'
uses: dawidd6/action-send-mail@v9on:
schedule:
- cron: '0 9 * * 1' # Every Monday at 9 AM UTC- name: Send email for big changes
if: steps.tracker.outputs.new-stars >= 10 || steps.tracker.outputs.lost-stars >= 5
uses: dawidd6/action-send-mail@v9With built-in SMTP:
with:
send-on-no-changes: trueWhen include-charts: true, the HTML email includes chart images via QuickChart.io URLs. These are static PNG images (not the animated SVGs used in the data branch).
- Total stars chart — star trend over time
- Comparison chart — top N repos overlaid
- Per-repo charts — individual repo trends
- Forecast chart — projected growth
- Some email clients block external images by default (user must click "Show images")
- Maximum 30 data points per chart
- If QuickChart.io is unreachable, charts appear as broken images; report text is unaffected
The built-in email auto-generates localized subject lines:
| Locale | Example Subject |
|---|---|
en |
GitHub Stars Report: 523 total stars (+15) |
es |
Informe de estrellas de GitHub: 523 estrellas totales (+15) |
ca |
Informe d'estrelles de GitHub: 523 estrelles totals (+15) |
it |
Rapporto stelle GitHub: 523 stelle totali (+15) |
| Issue | Solution |
|---|---|
| Email not received | Check spam folder; verify SMTP credentials; ensure app password for Gmail |
| Authentication failed | Gmail requires app password (not account password); enable 2FA first |
| Charts missing in email | Ensure include-charts: true; need 2+ runs; check if client blocks images |
| Multiple emails | Check for duplicate workflows; add if: stars-changed == 'true' condition |
| Email sent on no changes | Set send-on-no-changes: false or add conditional if step |
- Star Trend Charts — Chart types and customization
- Configuration — All email-related inputs
- Examples — Advanced email workflows
- Troubleshooting — Detailed email issue resolution