---
title: "Filter users by email domain"
canonical: "https://support.appfire.com/space/REPS/472918155/Filter%20users%20by%20email%20domain"
format: markdown
---
> Macro (aura-html)

## Scenario

Combining the Text Filter and User Reporter macros lets you filter and list certain users from the *confluence-users* group. 

Given the following Confluence users:

![image](media://9cf02bd4-0d31-42ae-a212-723e027efd0c)

## Result

![image](media://04e37f9a-3f0e-4929-974c-b9a16113f661)

## Recipe

| Apps | Reporting for Confluence Data Center |
| --- | --- |
| Level | Easy |
| Estimated time | 10 minutes |
| Macros | Report Column, Report Info, Report Table, Text Filter, User Filter |
| Suppliers | Report Supplier, Text Supplier, User Supplier |

## Storage format

You can copy and paste this code into the [Confluence Source Editor](https://appfire.atlassian.net/wiki/spaces/REPS/pages/472907841):

```
<ac:structured-macro ac:macro-id="60583f9e-30c0-4a45-8bb6-3392e00ad85e" ac:name="report-table" ac:schema-version="1"><ac:parameter ac:name="injected">true</ac:parameter><ac:rich-text-body><ac:structured-macro ac:macro-id="69abf7f4-375c-441b-992e-61ef27ab3cb0" ac:name="user-reporter" ac:schema-version="1"><ac:parameter ac:name="groups">confluence-users</ac:parameter><ac:rich-text-body>
<p>&#xa0;<ac:structured-macro ac:macro-id="8b906441-d031-41dc-b35d-8f0b25eb41b8" ac:name="text-filter" ac:schema-version="1"><ac:parameter ac:name="include">.*gmail.*</ac:parameter><ac:parameter ac:name="">user:email</ac:parameter></ac:structured-macro></p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:macro-id="4b7968ae-8f05-463f-b8f1-1a95d8d17db8" ac:name="report-column" ac:schema-version="1"><ac:parameter ac:name="injected">true</ac:parameter><ac:parameter ac:name="title">Confluence Users Who use Gmail</ac:parameter><ac:rich-text-body>
<p><ac:structured-macro ac:macro-id="269b77e4-9e28-4e8e-a65e-ae8a31bcc5c7" ac:name="report-info" ac:schema-version="1"><ac:parameter ac:name="">user:email</ac:parameter></ac:structured-macro></p></ac:rich-text-body></ac:structured-macro></ac:rich-text-body></ac:structured-macro>

```

## Macro structure

You can recreate the example in the editor view:

![image](media://b987a97b-5bef-4d17-9cc2-628312655382)

## Steps

1. Create a Report Table macro with **Injected**: selected.
2. Within the Report Table, create a User Reporter macro with **Groups**: `confluence-users`.
3. Within the User Reporter macro, create a Text Filter macro with the following parameters:
  - **Key:** `user:email`
  - **Include:** `.*gmail.*`
4. Within the Report Table macro, under the User Reporter macro, create a Report Column macro with the following parameters:
  - **Title**: `Confluence Users Who use Gmail`
  - **Injected**: selected
5. Within the Report Column macro, create a Report Info macro with **Key**: `user:email`.