# mention in CQL (Confluence): syntax and examples

URL: https://goingstellar.ro/reference/cql/mention-field/

The mention field finds content that contains an @mention of a given user. Use it to build a list of pages and comments that mention you, or to check where a person is referenced before they leave a project. You can match by accountId, by currentUser() or by full name through a sub-field.

## Syntax

```
mention = currentUser()
mention = "<accountId>"
mention in ("<accountId>", "<accountId>")
mention.fullname ~ "name"
```

## Arguments

- `value`: An accountId in quotes, or the function currentUser(). The doc also lists public name and full name as ways to find a user.

## Works with

- Operators: =, !=, IN, NOT IN (~, !~, >, >=, <, <= are rejected)
- Functions: currentUser()
- Sub-field: mention.fullname accepts ~ (full name matching depends on profile visibility)
- Not with: ~ on mention itself, use mention.fullname for name matching

## Examples

```
mention = currentUser() AND type = page
```

Lists the pages where someone tagged you, as a personal to-do list. Run on Confluence Cloud on 2026-11-29.

```
mention = currentUser() AND space = SD AND type = comment
```

Finds comments in one space that mention you, so a reply does not get lost in a long thread. Run on Confluence Cloud on 2026-11-29.

```
mention.fullname ~ "alana"
```

Finds content that mentions anyone whose full name contains a word, when you do not have an accountId. Run on Confluence Cloud on 2026-11-29.

```
mention in ("99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e", "48293:5s04-XXXX-XXXX-XXXX-d7a9b9d8c9f01")
```

Finds content that mentions either of two people, for example the two owners of a service. Run on Confluence Cloud on 2026-11-29.

```
mention = "99:27935d01-XXXX-XXXX-XXXX-a9b8d3b2ae2e"
```

Finds every place one person is mentioned, using their accountId. Run on Confluence Cloud on 2026-11-29.

## Pitfalls

- `mention ~ "alana"` fails with: Operator '~' is not supported for field 'mention'. Name matching needs the sub-field `mention.fullname`.
- Do not use text search to find mentions. `text ~ "alana"` looks for the word, while `mention` is the field for tagged users.
- `mention != currentUser()` keeps everything that does not mention you, including all content with no mentions at all. It is a very large set, so add `space` and `type`.
- accountId values from the docs end in XXXX groups. Replace them with a real accountId, otherwise the query runs and finds nothing.

## Related

- [currentUser()](https://goingstellar.ro/reference/cql/currentuser/)
- [text](https://goingstellar.ro/reference/cql/text-field/)
- [owner](https://goingstellar.ro/reference/cql/owner-field/)
- [watcher](https://goingstellar.ro/reference/cql/watcher-field/)
- [creator](https://goingstellar.ro/reference/cql/creator-field/)
- [contributor](https://goingstellar.ro/reference/cql/contributor-field/)

## Sources

- [CQL fields (Atlassian Developer, Confluence Cloud)](https://developer.atlassian.com/cloud/confluence/cql-fields/)

