CQL Tables · Confluence Cloud

What CQL Tables does in Confluence — and five queries to start with

Confluence search finds pages. CQL Tables lets you show the answer on a page — live, as a table, a list, or a count. Here is how it works, with five queries you can use today.

Confluence search is good at finding things. It is bad at showing things. If your team needs a page that lists “all pages awaiting review”, “all docs owned by Ana”, or “everything updated this quarter”, the usual answer is a hand-maintained list — which goes stale the day after someone updates it.

Confluence Query Language, or CQL, is the search language underneath Confluence. It lets you ask precise questions — by type, space, label, author, date, or title — and CQL Tables turns the answer into a live table, list, or count on any page.

How it works

You add the CQL Tables macro to a page and write a query. Every time someone opens the page, the macro runs the query live through the Confluence REST API and displays the results. The results respect the viewer’s own Confluence permissions: CQL Tables only ever shows content that person already has permission to see.

You choose how the results look: a table with columns for title, space, type, author, date, labels, and status; a compact list; or a single count, such as “14 pages awaiting review”. You can sort by any column, page through long results, export them as CSV, and save the queries you use most as favourites.

Five queries to start with

1. Pages awaiting review. If your team labels pages that need review, this is the most useful query in Confluence:

type = page AND label = "needs-review" ORDER BY lastModified DESC

Put it on your team home page and the review queue maintains itself.

2. Everything updated recently. A simple activity feed for a space:

type = page AND space = "TEAM" AND lastModified > startOfMonth(-1) ORDER BY lastModified DESC

Replace TEAM with your space key.

3. Your own pages. A personal dashboard that follows whoever is viewing it:

type = page AND creator = currentUser() ORDER BY lastModified DESC

4. Pages by title. Keep all SOPs in one place without maintaining a list:

type = page AND title ~ "SOP*" ORDER BY title ASC

5. Just a number. Sometimes a count is the whole dashboard:

type = page AND label = "approved" AND lastModified > startOfYear()

Displayed as a count, this tells the team at a glance how many pages were approved this year.

A few habits that make it work

Agree on labels before you build dashboards — a query is only as good as the labels behind it. Keep queries narrow: a table with fifty rows is useful; one with five thousand is a search result wearing a costume. And remember that results are live, so a page that looked right in January will still be right in June, as long as the query is.

CQL Tables is free for teams up to 10 users, then $0.50 per user per month at every tier. It runs entirely on Atlassian Forge, stores nothing except your saved favourite queries, and makes no external network calls.

When a table is the wrong answer

Live tables are not free: every macro on a page runs a query when the page loads, and a dashboard with twenty macros will feel it. Use tables where the question is stable and the answer changes slowly — review queues, SOP indexes, approved-document lists. For one-off questions, plain Confluence search is faster and nobody has to maintain a macro.

The other limit is trust. A table is only as believable as the data behind it, and CQL can only find what people actually recorded. If half the team never adds the “approved” label, the approved-documents table will under-report no matter how good the query is. Dashboards built on CQL work best when they are paired with a small amount of discipline: agreed labels, agreed spaces, and someone who notices when the numbers look wrong.

Start small: one table on one team page, answering one question the team already asks every week. If it saves a meeting, add a second. If nobody looks at it after a month, delete it — a dashboard nobody reads is clutter, however clever the query behind it is.

← Back to all articles

Try the tool this article is about: CQL Tables — free for teams up to 10 users.