New to Kestra?
Use blueprints to kickstart your first workflows.
Export repo stargazers to BigQuery weekly, guard against empty pulls, and alert Slack on failures.
Star counts are vanity until you can slice them. This blueprint pulls a repository's stargazers — user and the date they starred — into BigQuery on a weekly schedule, so you can chart growth, cohort new stars, and join stargazers against signups or issues.
fetch_stargazers (io.kestra.plugin.scripts.python.Script) pages through the GitHub stargazers API with a token, capped by max_pages, and writes stargazers.csv via the output directory protocol. Empty pages stop pagination early.check_results (io.kestra.plugin.core.flow.If) only proceeds when rows were actually fetched — an empty week logs a warning instead of truncating your table.load_to_bigquery (io.kestra.plugin.gcp.bigquery.Load) loads the CSV with WRITE_TRUNCATE into your destination table.errors block alerts Slack on token rate limits or GCP permission failures.stargazers BigQuery table refreshed weekly.The GitHub API gives you JSON; the flow turns it into a weekly, guarded, alerted table load — and the next step (join with signups, chart in Looker, alert on milestones) is one task away.
GITHUB_TOKEN: token for the stargazers API.GCP_SERVICE_ACCOUNT: JSON key for BigQuery load.SLACK_WEBHOOK_URL: webhook for failure alerts.repository, gcp_project_id, and bigquery_table.export_count and the BigQuery table.weekly_export.