Webhook icon
If icon
SlackIncomingWebhook icon

Send GitHub Star Notifications to Slack

Listen for GitHub star webhook events and post conditional, color-coded Slack notifications with Kestra when a repository is starred or unstarred.

Categories
BusinessCore

Turn every GitHub star and unstar into an instant, color-coded Slack notification. This event-driven blueprint listens for GitHub star webhook events, inspects whether the action was a new star or a removed star, and posts a tailored message to your Slack channel with the sender's login, a link to their GitHub profile, and the repository's current star count. It solves the problem of teams missing community signals because no one is polling the GitHub API or refreshing the repo page, giving open-source maintainers and DevOps teams real-time visibility into project traction.

How it works

  1. A io.kestra.plugin.core.trigger.Webhook trigger exposes a URL secured by a key and fires the flow whenever GitHub posts a star event payload.
  2. The check_action task, a io.kestra.plugin.core.flow.If, evaluates the condition {{ trigger.body.action == 'created' }} to branch on the event type.
  3. On a new star, the notify_star_added task (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts a green attachment (#88FF00) announcing the new stargazer and the updated stargazers_count.
  4. On an unstar, the notify_star_removed task posts a red attachment (#FF0000) noting who removed the star and the new total.

What you get

  • Real-time Slack alerts for both starring and unstarring, no manual polling.
  • Color coding (green for gained, red for lost) for instant visual triage.
  • Sender login, clickable profile link, and live star count in every message.
  • A single declarative YAML flow you can drop into any namespace.

Who it's for

  • Open-source maintainers tracking repository momentum.
  • DevOps and platform teams monitoring community engagement.
  • Developer relations and marketing teams reporting on project growth.

Why orchestrate this with Kestra

GitHub webhooks can fire an HTTP call, but they cannot branch on the payload, format a rich Slack attachment, retry on failure, or give you execution history. Kestra fills that gap: the event trigger reacts the instant GitHub posts, the If task routes conditionally, built-in retries handle transient Slack outages, and every run is logged with full lineage and replayable inputs. You define it all as declarative YAML, version controlled and portable across environments.

Prerequisites

  • A Kestra instance reachable by GitHub's webhook delivery.
  • A Slack incoming webhook URL for the target channel.
  • A GitHub repository where you can configure a webhook for star events.

Secrets

  • SLACK_WEBHOOK_URL: the Slack incoming webhook used to post both notifications.
  • GITHUB_WEBHOOK_KEY: the secret key that secures the Kestra webhook trigger URL.

Quick start

  1. Add the SLACK_WEBHOOK_URL and GITHUB_WEBHOOK_KEY secrets to your Kestra instance.
  2. Create the flow and copy the generated webhook URL from the github_webhook trigger.
  3. In your GitHub repository settings, add a webhook pointing at that URL and subscribe to the Star event.
  4. Star and unstar the repository to confirm the green and red Slack messages arrive.

How to extend

  • Change the channel in each payload to route alerts to a dedicated channel.
  • Add a threshold check so milestones (every 100 stars) trigger a celebratory message.
  • Fan out to other notification plugins (email, Discord, Microsoft Teams) alongside Slack.
  • Append star events to a database or data warehouse task for trend reporting.

Links

Orchestrate with Kestra
Orchestrate Slack with Kestra
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.