Last week I wrote here about checking Connect apps before support ends on 31 January 2027. Step 4 said: note the macro's name, run macro = "that-name" in CQL, and you know how many pages depend on the app. Since then I tested that step properly on a Cloud site, and it needs a correction. The query works, but there are four cases where it returns zero without any error, and a zero is exactly what tempts you to uninstall.
Start with the Macro usage report
Confluence admins have it under Settings, Data management, Macro usage. "All macros" lists every app with the names of its macros and how many content items use each. Use the names exactly as shown there; that alone avoids most of the problems below. Two limits are stated on the report itself: it counts only content you can see, and archived spaces are left out. On our site it gave counts, not the pages, and there is no filter by space. For the list of pages you need CQL:
type = page AND macro = "macro-name" AND space = KEY
Run it through the REST search endpoint (/wiki/rest/api/content/search?cql=) in a logged-in browser; totalSize is the count. It counts pages, not macros: a page with five old diagrams is one result.
Four cases where zero is wrong
- macroName: in the search box. That is Data Center syntax. In Cloud it searches the words as text: on our site
macroName:drawio returned files with "drawio" in the name and missed the page that actually had the draw.io macro.
- Forge macros under their full key. A Forge macro is stored with a key like
app-id/environment-id/static/module-key. CQL matches only the module key, the part after static/. With one of our own Forge macros on nine pages, the module key found all nine; the full key and the app ID returned zero. This is the one that will matter more each month, as apps move from Connect to Forge.
- Info, note, tip and warning panels. In Cloud they are one native panel element.
macro = "info" found nothing on a page with an info panel; macro = "panel" found it, along with every other coloured panel. The Macro usage report lists info, note, tip and warning as unused for the same reason, while our test site has them on two pages.
- Status lozenges and code blocks.
macro = "status" and macro = "code" returned zero on a page that had both, while toc and expand on the same page were found within seconds. I found no CQL condition for them.
A ten-minute check before you uninstall
- Write down the app's macro names and counts from Macro usage.
- Run the CQL query for each and compare totalSize with the count. A gap means restricted pages, archived spaces or a wrong name.
- Before trusting a zero, ask someone who can see restricted content to run the same query.
- Disable the app for a week or two before uninstalling, so anyone who finds a broken page can tell you while switching back is easy.
If you know a way to find status lozenges or code blocks with CQL in Cloud, please add it below; I will update this.
Disclosure: I build Forge apps for Confluence, including replacements for three Connect apps (CQL Search, SVG out, Table Exporter). Everything above uses only Confluence itself. The longer write-up with the exact queries is here: Find every Confluence Cloud page that uses a macro.