New to Kestra?
Use blueprints to kickstart your first workflows.
Query the GitHub GraphQL API from Kestra to fetch closed issues with titles, URLs, and labels. Extract structured repo data for reporting and automation.
Pull structured data straight from GitHub without writing custom REST glue code. This blueprint calls the GitHub GraphQL API to fetch the 20 most recent closed issues in the kestra-io/kestra repository, returning each issue's title, URL, and first 5 labels in a single typed request. GraphQL lets you ask for exactly the fields you need and nothing more, so you avoid over-fetching and multiple round trips. Wrapping that call in a Kestra flow turns an ad hoc script into a versioned, schedulable, and observable pipeline you can extend into reporting, metrics, and downstream automation.
The flow runs a single task, get_github_issues, of type io.kestra.plugin.graphql.Request. It POSTs a GraphQL query to https://api.github.com/graphql with an Authorization: Bearer header built from {{ secret('GITHUB_TOKEN') }}. The embedded query targets the repository(owner: "kestra-io", name: "kestra") node and requests issues(last: 20, states: CLOSED), walking the edges and node structure to return each issue's title, url, and the first 5 labels. The task output holds the parsed JSON response, ready to be consumed by any subsequent task you add.
kestra-io/kestra in a single response.title, url, and up to 5 label names.The GitHub API has no built-in scheduler, no retry policy, and no execution history. Kestra adds all of it declaratively. Run the query on a schedule or fire it from an event trigger, attach retries and timeouts so transient API or rate-limit errors recover automatically, and get full execution logs and lineage for every run. Everything is plain YAML, so the query lives in Git alongside the rest of your pipelines instead of in an untracked cron job on someone's laptop.
GITHUB_TOKEN: a GitHub personal access token (or fine-grained token) with read access to the repository's issues.GITHUB_TOKEN secret to your Kestra instance.namespace if needed.get_github_issues task output.owner and name in the query to point at your own repository.states: CLOSED for OPEN, or query pull requests, releases, or discussions.Schedule trigger to refresh the data on a cadence.after cursors to pull more than 20 issues.