Indexed
IndexingConnectors

Confluence

Index your Confluence space into a semantic collection that AI agents can query by meaning.

Confluence

By the end of this guide, you will have your Confluence space indexed into a semantic collection and verified with a test search.

Prerequisites

  • Indexed installed and workspace initialized (indexed config init; see Quick Start)
  • A Confluence Cloud or Server/Data Center instance
  • An API token (Cloud) or personal access token (Server/DC)

Create a Confluence API Token

Cloud vs. Server/Data Center auth

Confluence Cloud uses an Atlassian API token and the email for the account that owns the token. Set ATLASSIAN_EMAIL and ATLASSIAN_TOKEN, or pass --email and --token for that run.

Confluence Server/Data Center can use a bearer or personal access token (CONF_TOKEN), or username and password (CONF_LOGIN and CONF_PASSWORD). No Atlassian email is used.

  1. Go to https://id.atlassian.com/manage-profile/security/api-tokens
  2. Click Create API token
  3. Give it a label (e.g., "Indexed CLI")
  4. Copy the token

Set both variables in your shell or .env file:

Terminal
export ATLASSIAN_EMAIL=your-email@company.com
export ATLASSIAN_TOKEN=your_api_token_here

Token (typical): create a Personal Access Token under your Confluence profile, then:

Terminal
export CONF_TOKEN=your_personal_access_token

Username and password (when your site uses basic auth instead):

Terminal
export CONF_LOGIN=your_username
export CONF_PASSWORD=your_password

Keep tokens out of version control

See Connector credentials — never commit API tokens; use a .env file and .gitignore.

Index Your Wiki

Use a CQL query to select which pages to index. For Confluence Cloud, your URL must include the /wiki suffix:

Terminal
indexed index create confluence \
  -c team-wiki \
  -u https://company.atlassian.net/wiki \
  -q "space = ENG AND type = page"

Cloud URL must include /wiki

For Confluence Cloud instances, the URL must end with /wiki — for example https://company.atlassian.net/wiki. Without it, the connector cannot reach the REST API and will return an authentication or connection error.

Indexing collection 'team-wiki'...
  Fetched 87 pages from Confluence
  Parsed 87 documents
  Created 241 chunks
  Generated embeddings
✓ Collection 'team-wiki' created (241 chunks, 9.8 MB)

Verify and run a quick test search:

Terminal
indexed index inspect team-wiki
indexed index search "database migration process" -c team-wiki
Results for 'database migration process' (top 5):

1. [team-wiki] Database Schema Changes Guide
   Score: 0.88
   ...Before running any migration, ensure you have a backup of
   the production database. Use the migration tool in the
   infra/ directory to generate the migration script...

2. [team-wiki] Incident Response Runbook
   Score: 0.71
   ...If a migration fails in production, follow the rollback
   procedure documented in the DBA handbook...

Common CQL Patterns

GoalCQL
All pages in a spacespace = ENG AND type = page
Recently updatedspace = ENG AND lastModified >= "YYYY-MM-DD" — set the date in Confluence’s advanced search (or your policy), then paste the CQL here; avoid stale “example” dates in shared docs
Specific labelspace = ENG AND label = "architecture"
By title keywordspace = ENG AND title ~ "runbook"
Multiple spacesspace in (ENG, OPS, PLATFORM) AND type = page
Exclude archivedspace = ENG AND type = page AND label != "archived"

Start narrow — one space, one label — and widen from there.

Configure comment indexing

By default, Indexed includes nested replies (--read-all-comments is the default; see indexed index create confluence). Use --first-level-comments for large spaces where thread depth adds noise rather than signal:

Terminal
indexed index create confluence \
  -c team-wiki \
  -u https://company.atlassian.net/wiki \
  -q "space = ENG AND type = page" \
  --first-level-comments

Use --read-all-comments (default) when threaded discussion context matters — for example, when decisions and corrections often appear in nested replies rather than in the page body.

Keep the Index Fresh

Pull only new or modified pages since the last sync:

Terminal
indexed index update team-wiki

To automate it:

crontab
# Update the team-wiki collection every 6 hours
0 */6 * * * /path/to/indexed index update team-wiki

Troubleshooting

Authentication errors for Cloud — set both ATLASSIAN_EMAIL and ATLASSIAN_TOKEN. The email must match the Atlassian account that created the token.

Authentication errors for Server/DC — confirm CONF_TOKEN, or CONF_LOGIN and CONF_PASSWORD, match what your instance expects.

Empty results — test your CQL in Confluence's advanced search first to confirm it returns pages. For Cloud, verify the URL ends with /wiki. Also verify the API token has read access to the target space.

Rate limiting — for large spaces (500+ pages), Indexed handles rate limiting automatically with exponential backoff. If indexing is slow, narrow your CQL query to a single space or label.

What's Next