---
title: "Content by Label macro"
canonical: "https://support.appfire.com/space/CDML/649956370/Content%20by%20Label%20macro"
format: markdown
---
> Macro (aura-html)


## Overview

> Macro (excerpt)
> 
> Embed filtered search results in your wiki pages.

The "Content by Label" macro, bundled with Confluence, allows you to build simple reports using Confluence search filters – including those added by the Comala Document Management app!

> 📝 This feature requires **Confluence 5.8 or above**.

## Setting up the report

Add the **Content by Label** macro to a wiki page in the usual way.

In the sidebar you'll see an option to specify a label, and, under it, an option to "Add filter":

![image](media://48538286-b74a-4b45-a350-a668dc49aec8)

Search the **Add filter** drop-down for filters containing the word **Workflow** – these are the filters added by the Comala Document Management app.

In the example above, we've selected the **Workflow State** filter. That filter automatically provides a list of all states available on your wiki, so all you need to do is choose one.

![image](media://d2ca5fd2-66c5-4feb-89b2-deea24de4427)

In the screenshot, we've chosen to list all pages with the Label **macro** and the Workflow State **New Draft**.

Chose **Preview** to see the results.

Essentially it allows you to define search criteria, just as you would on the main Confluence Search page, and have the results displayed directly in your content. This is perfect for creating documentation dashboards and "to do" lists.

## Available Filters

> Macro (include)

> ℹ️ The current workflow state can also be retrieved as a metadata value using @awpState@. For example,  using the [get-metadata](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649826804) macro.

An example of some of the filters in action:

![image](media://d571e356-c045-46f8-90ae-ddf67e8b0dcb)

## See also

External Links:

- [Content by Label macro](https://confluence.atlassian.com/doc/content-by-label-macro-145566.html)
- [Advanced Searching Using CQL](https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/)
- [CQL Field Reference](https://developer.atlassian.com/server/confluence/cql-field-reference/)
- [CQL Function Reference](https://developer.atlassian.com/server/confluence/cql-function-reference/)
- [CQL Keywords Reference](https://developer.atlassian.com/server/confluence/cql-keywords-reference/)
- [CQL Operators Reference](https://developer.atlassian.com/server/confluence/cql-operators-reference/)
- [Performing Text Searches with CQL](https://developer.atlassian.com/server/confluence/performing-text-searches-using-cql/)

[Reporting Guide](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649070833)::

- [Confluence Search](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649792098)
- [Page Properties Report macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650250574)

[Workflow Authoring Guide](https://appfire.atlassian.net/wiki/spaces/CDML/pages/648611901):

- [Approvals](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650153766)
- [States](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649595551)
- [Tasks](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694408)

[Developer Guides](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649330694):

- [CQL REST API](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649921636)