New to Kestra?
Use blueprints to kickstart your first workflows.
List Confluence pages, alert Slack on documentation older than your retention threshold, and log the result for platform and docs teams.
A Confluence space accumulates runbooks, onboarding guides, and incident postmortems that nobody revisits once the page stops being urgent. Confluence has no built-in schedule that flags a page nobody has touched in months, so outdated instructions sit at the top of search results looking exactly as current as the page updated yesterday. This blueprint reads each page's real last-edit timestamp and reports what has actually gone stale, not a guess.
This blueprint was created by Mohit Jeswani.
list_pages (io.kestra.plugin.confluence.pages.List) fetches current and archived
pages, optionally scoped to space_ids, each with its version metadata. Read-only;
nothing in Confluence is changed. allowFailure: true covers an API or auth error without
failing the flow outright.evaluate (io.kestra.plugin.core.output.OutputValues) compares each page's
versionInfo.createdAt (the timestamp of its latest edit, not when the page was first
created) against stale_after_days, with a jq filter.route (io.kestra.plugin.core.flow.If):summary logs the count and severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example an expired API token.pages.List used as a
standing retention audit, distinct from this repo's existing Confluence blueprint, which
writes a weekly recap page rather than auditing page age.Confluence shows a page's last-modified date one page at a time; it does not compare that
date across a whole space against a retention policy you declare, or notify anyone. Kestra
keeps stale_after_days as a flow input, turns the scan into a Slack page naming the actual
stale titles, and keeps a full execution history of every run.
Confluence is a hosted Atlassian Cloud product with no official standalone Docker image, so
list_pages cannot be exercised against a local container; validate against a real,
low-traffic space or Atlassian's free Confluence tier first.
CONFLUENCE_USERNAME: the Confluence account email used by list_pages. In Kestra OSS,
provide it as the base64-encoded environment variable SECRET_CONFLUENCE_USERNAME.CONFLUENCE_API_TOKEN: the Atlassian API token for that account. In Kestra OSS, provide it
as the base64-encoded environment variable SECRET_CONFLUENCE_API_TOKEN.SLACK_WEBHOOK_URL: used by alert and the errors block. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Default | Purpose |
|---|---|---|
space_ids |
[] |
Spaces to scan; empty scans every space the account can see |
limit |
100 |
Max pages fetched per run (API max 250) |
stale_after_days |
180 |
Days since last edit past which a page is reported stale |
max_stale_count |
1 |
Stale-page count that triggers the Slack alert |
{{ outputs.list_pages.children }}: every scanned page (title, markdown,
versionInfo, rawResponse).{{ outputs.evaluate.values.stale_count }} / .stale_titles: how many pages are stale and
their titles, semicolon-joined.{{ outputs.evaluate.values.severity }}: OK, STALE_DOCS_FOUND, or CRITICAL.versionInfo.createdAt is the latest edit timestamp, not the page's original creation
date; a page created five years ago but edited last week is correctly not stale.limit bounds how many pages list_pages even considers per run (API max 250); a space
larger than that needs cursor-based pagination this blueprint does not yet implement, so
a very large space is only partially scanned per run.status filter on pages.List covers current and archived pages;
deleted and trashed pages are never scanned, which is correct for a retention audit
since both are already effectively gone.CONFLUENCE_USERNAME, CONFLUENCE_API_TOKEN, and SLACK_WEBHOOK_URL secrets.confluence_server_url and, optionally, space_ids to your real site.summary logs a count.stale_after_days above every scanned page's age, or lower it below a known old
page's age, to confirm both compliant and alert fire correctly.weekly trigger once stale_after_days matches your real retention policy.cursor property to scan a space larger than 250 pages in one run.io.kestra.plugin.confluence.pages.Update on each stale page to prepend a
"needs review" label to its title, gated behind an explicit confirm_tag input so tagging
never runs by accident.stale_titles by spaceId from rawResponse in a downstream task to route each
space's stale pages to that space's own owning team.