Skip to main content
RapidDev - Software Development Agency
retool-integrationsREST API Resource

How to Integrate Retool with Confluence

Connect Retool to Confluence by creating a REST API Resource with Atlassian Cloud's base URL and Basic Auth using your Atlassian email plus an API token. Once configured, use CQL (Confluence Query Language) to search pages, manage spaces, and build a knowledge base admin panel that surfaces content insights not available in Confluence's native interface.

What you'll learn

  • How to generate an Atlassian API token and configure Confluence Basic Auth in Retool
  • How to use CQL (Confluence Query Language) to search pages, spaces, and content
  • How to fetch page content including body, metadata, and version history
  • How to build a knowledge base admin panel with space browsing and page search
  • How to use JavaScript transformers to parse Confluence's paginated response format
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Intermediate14 min read20 minutesProductivityLast updated April 2026RapidDev Engineering Team
TL;DR

Connect Retool to Confluence by creating a REST API Resource with Atlassian Cloud's base URL and Basic Auth using your Atlassian email plus an API token. Once configured, use CQL (Confluence Query Language) to search pages, manage spaces, and build a knowledge base admin panel that surfaces content insights not available in Confluence's native interface.

Quick facts about this guide
FactValue
ToolConfluence
CategoryProductivity
MethodREST API Resource
DifficultyIntermediate
Time required20 minutes
Last updatedApril 2026

Build a Confluence Knowledge Base Admin Panel in Retool

Confluence is where teams store documentation, project plans, meeting notes, and runbooks. But Confluence's native search and navigation can be slow when you need to audit content — find all pages not updated in 6 months, list every page in a space by traffic, or export metadata about your documentation structure. Retool gives you programmatic access to Confluence's REST API so you can build exactly the admin panel your documentation team needs.

Confluence Cloud exposes a v2 REST API alongside the older v1 API. Both are available, but the v2 API is the current standard for new integrations. Authentication uses Atlassian's Basic Auth pattern: your Atlassian account email paired with an API token (not your account password). The API token is generated from id.atlassian.com and can be scoped to read-only or read-write operations depending on your use case.

Confluence Query Language (CQL) is the most powerful feature for building Retool dashboards. CQL works similarly to SQL for querying Confluence content — you can filter by space, type (page, blogpost, comment), last modified date, label, creator, and text content. Combined with Retool's Table component and filter controls, CQL lets you build content auditing tools, broken link finders, and documentation health dashboards that would be impossible in Confluence's native UI.

Integration method

REST API Resource

Confluence connects to Retool through a REST API Resource using Atlassian's Basic Auth scheme — your Atlassian account email and an API token are Base64-encoded and sent as the Authorization header. Retool proxies all requests server-side, keeping credentials off the browser. You configure the base URL once using your Atlassian Cloud instance subdomain, then write CQL queries and REST endpoint calls to search, read, and manage Confluence content.

Prerequisites

  • A Confluence Cloud account (Server/Data Center uses a different auth method — on-premise instances use HTTP Basic Auth with username/password)
  • Your Confluence Cloud instance URL in the format: https://yourcompany.atlassian.net
  • An Atlassian API token generated from https://id.atlassian.com/manage-profile/security/api-tokens
  • A Retool account with permission to create Resources
  • Basic understanding of CQL syntax or willingness to learn it through the Confluence documentation

Step-by-step guide

1

Generate an Atlassian API token

Navigate to https://id.atlassian.com/manage-profile/security/api-tokens in your browser. This is Atlassian's central account management page and works for all Atlassian Cloud products including Confluence and Jira. Click Create API token. In the dialog, enter a descriptive label like Retool Integration and click Create. Copy the token immediately — Atlassian shows it only once and you cannot retrieve it later. The token is tied to your Atlassian account email address. In Confluence's Basic Auth scheme, you combine your email and this token to form the credentials: the Authorization header value is Basic followed by Base64-encoded email:token. Retool's Basic Auth option handles this encoding automatically — you just provide the username (email) and password (token) fields separately and Retool constructs the correct header. If you're building a shared Retool tool used by many team members, consider creating a dedicated Atlassian service account and generating the token from that account. This ensures the integration remains active even when individual users leave the organization. The service account needs Confluence space access or administrator privileges depending on what operations your Retool app needs.

Pro tip: Atlassian API tokens have no expiration by default, but you should rotate them periodically. Keep track of which tokens are being used in Retool so you can update the resource when a token is revoked.

Expected result: You have an Atlassian API token copied to your clipboard and know your Atlassian account email address.

2

Create the Confluence REST API Resource in Retool

In Retool, navigate to the Resources tab in the left navigation and click Add Resource. Select REST API from the connector list. In the configuration form: Name: Enter Confluence API (or something descriptive). Base URL: Enter https://YOUR_DOMAIN.atlassian.net/wiki/rest/api. Replace YOUR_DOMAIN with your actual Atlassian subdomain. For example, if your Confluence URL is https://acme.atlassian.net, the base URL is https://acme.atlassian.net/wiki/rest/api. Authentication: Select Basic Auth from the Auth type dropdown. In the Username field, enter your full Atlassian account email address. In the Password field, enter your API token (not your account password). Headers: Add a Content-Type header with value application/json. This is required for POST and PUT requests that send JSON bodies. Click Create Resource. Retool will save the configuration. To verify it works immediately, create a test query: GET /space with no parameters. If it returns a JSON object with a results array of your Confluence spaces, the connection is working correctly. For Confluence Server or Data Center (on-premise installations), the base URL format is https://YOUR_DOMAIN/rest/api and authentication uses your Confluence username and password (not email + API token).

Pro tip: The base URL path for Confluence Cloud is /wiki/rest/api — note the /wiki prefix. This differs from Jira which uses /rest/api directly. Missing the /wiki prefix is the most common setup error.

Expected result: The Confluence API resource is created and a test GET /space query returns your Confluence spaces in JSON format.

3

Search pages using CQL in Retool queries

CQL (Confluence Query Language) is Confluence's search query syntax, and it's the most powerful way to query content through the API. Use the /content/search endpoint with a cql query parameter. Create a query named searchPages. Set method to GET and path to /content/search. Add the following query parameters: - cql: your CQL query string (dynamic or static) - limit: {{ pagination.pageSize || 25 }} - start: {{ pagination.offset || 0 }} - expand: space,version,ancestors A CQL query to find all pages modified in the last 30 days across a specific space looks like: type = 'page' AND space.key = '{{ select_space.value }}' AND lastModified >= now("-30d") ORDER BY lastModified DESC For a free text search across all spaces: type = 'page' AND text ~ '{{ textInput_search.value }}' ORDER BY lastModified DESC For stale content auditing: type = 'page' AND lastModified < now("-90d") ORDER BY lastModified ASC The response includes a results array with pages, each having an id, title, type, space object, version object, and _links. Create a transformer to flatten this for display. Retool's Table component expects flat objects, not nested structures.

transformer_pages.js
1// Transformer for Confluence search results
2const results = data.results || [];
3return results.map(page => ({
4 id: page.id,
5 title: page.title,
6 type: page.type,
7 space_key: page.space?.key || '',
8 space_name: page.space?.name || '',
9 version: page.version?.number || 1,
10 last_modified: page.version?.when ? new Date(page.version.when).toLocaleDateString() : '',
11 last_modifier: page.version?.by?.displayName || '',
12 url: `https://YOUR_DOMAIN.atlassian.net/wiki${page._links?.webui || ''}`,
13 status: page.status || 'current'
14}));

Pro tip: CQL is case-sensitive for operators and field names. Use type = 'page' not type = 'Page'. Common CQL fields: space.key, title, text, creator, lastModified, created, label, ancestor.

Expected result: The searchPages query returns a flat array of Confluence page objects that display correctly in a Retool Table.

4

Fetch all spaces for navigation dropdowns

To let users select a space and browse its content, create a query that fetches all available Confluence spaces. Name it getSpaces, set method to GET and path to /space with these parameters: - limit: 50 - expand: description.plain,homepage - type: global (use 'personal' for personal spaces, or omit to get all) The response returns a results array where each space has a key (the short identifier like 'ENG' or 'MKTG'), name, type, and optional description and homepage objects. Set this query to Run on page load: yes in the query settings. Create a Select component (select_space) with data bound to {{ getSpaces.data.results }}, value mapped to key, and label mapped to name. This populates a space selector dropdown that drives your other queries. For Confluence instances with many spaces (100+), add pagination to the getSpaces query using the start parameter, or use CQL to filter spaces by type. You can also implement a search-as-you-type space finder using the /space?spaceKey={{ textInput.value }} endpoint with a debounced text input. If you need space statistics (page count, last activity), you'll need to combine the /space endpoint with additional queries since Confluence's space API doesn't include statistics in the base response.

transformer_spaces.js
1// Transformer for space dropdown
2const spaces = data.results || [];
3return spaces.map(space => ({
4 label: `${space.name} (${space.key})`,
5 value: space.key,
6 id: space.id,
7 type: space.type,
8 description: space.description?.plain?.value || 'No description',
9 homepage_id: space.homepage?.id || null
10}));

Pro tip: Always use the space key (e.g., 'ENG') rather than the space ID in CQL queries. The key is more readable and stable across Confluence instances.

Expected result: The getSpaces query populates a Select dropdown with all your Confluence space names. Selecting a space updates dependent queries.

5

Fetch page content and build the detail view

To display the full content of a selected page, create a getPageContent query. Set method to GET and path to /content/{{ table1.selectedRow.data.id }}. Add the expand parameter: body.view,version,space,ancestors,children.page. The body.view expansion returns the HTML-rendered content of the page. You can display this in a Retool Custom Component (iframe) or extract key metadata like word count and heading structure from it. For a lighter detail view without full HTML content, use body.storage instead of body.view — this returns Confluence's storage format XML which is easier to parse for metadata extraction. To show page history, add a getPageVersions query: GET /content/{{ table1.selectedRow.data.id }}/version with limit: 10 to show the 10 most recent versions. Bind this to a secondary Table in your detail panel showing version number, editor name, date, and a comparison link. For the admin panel layout, use a two-column Container: the left column shows the searchable page list (Table), and the right column shows the selected page's metadata — title, space, creator, created date, last modified, version count, and a button linking to the page in Confluence. Add a Labels section showing the page's labels fetched from /content/{id}/label.

transformer_page_detail.js
1// Transformer for page detail view
2const page = data;
3const body = page.body?.view?.value || '';
4// Strip HTML tags to estimate word count
5const textContent = body.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim();
6const wordCount = textContent.split(' ').filter(w => w.length > 0).length;
7
8return {
9 id: page.id,
10 title: page.title,
11 space: page.space?.name || '',
12 version: page.version?.number || 1,
13 created: page.history?.createdDate ? new Date(page.history.createdDate).toLocaleDateString() : '',
14 last_modified: page.version?.when ? new Date(page.version.when).toLocaleDateString() : '',
15 last_editor: page.version?.by?.displayName || '',
16 word_count: wordCount,
17 status: page.status || 'current',
18 ancestors: (page.ancestors || []).map(a => a.title).join(' > '),
19 body_html: body
20};

Pro tip: For complex integrations combining Confluence content with Jira tickets or your internal database, RapidDev's team can help architect multi-resource Retool apps that correlate documentation with project data.

Expected result: Clicking a page in the Table populates the detail panel with the page's full metadata, version count, and a direct link to open the page in Confluence.

6

Add page labels and implement content operations

Labels are key for organizing Confluence content and making it searchable. Add functionality to view and manage labels from your Retool panel. Create a getLabels query: GET /content/{{ table1.selectedRow.data.id }}/label. The response has a results array with label objects containing id, prefix, and name. To add a label: POST /content/{{ table1.selectedRow.data.id }}/label with body [{"prefix": "global", "name": "{{ textInput_label.value }}"}]. To remove a label: DELETE /content/{pageId}/label/{labelName}. For bulk operations, create a Retool Workflow that iterates over selected pages and applies or removes labels in batches. This is more reliable than in-app parallel queries for operating on 20+ pages at once. For page restrictions (making pages view-only or restricting editing), use the /content/{id}/restriction/byOperation endpoints. GET shows current restrictions; PUT replaces them entirely. Finally, implement a page hierarchy view using the ancestors array from the page detail query. Display ancestors as a breadcrumb trail (text labels connected by '>' separators) above the page title in your detail panel, so users always know where the page sits in the Confluence hierarchy.

addLabel_body.json
1// Add label query body
2[
3 {
4 "prefix": "global",
5 "name": "{{ textInput_newLabel.value.toLowerCase().replace(/\\s+/g, '-') }}"
6 }
7]

Pro tip: Confluence label names are lowercased and spaces become hyphens automatically. Apply this normalization in the UI before sending to avoid duplicate labels with different casing.

Expected result: Your Confluence admin panel supports viewing, adding, and removing labels on pages. Bulk label operations work across multiple selected pages.

Common use cases

Build a content audit dashboard for stale documentation

Create a Retool panel that shows all Confluence pages not updated in the last 90 days, organized by space. Documentation leads can identify outdated pages, see page view counts, and mark pages for archival or deletion — all from a single dashboard without clicking through Confluence's space-by-space navigation.

Retool Prompt

Build a Retool dashboard with a Table showing all Confluence pages where lastModified < now-90days. Show page title, space name, last modifier, last modified date, and a View link. Add a Space filter dropdown. Include a Bulk Archive button that moves selected pages to an archive label.

Copy this prompt to try it in Retool

Build a space management and permissions overview

Build a Retool panel that lists all Confluence spaces with their key, description, homepage, and space admin. Show permissions summary per space so an admin can audit who has access without navigating into each space's settings individually.

Retool Prompt

Build a Retool admin panel showing all Confluence spaces in a Table with columns for space key, name, type (global/personal), description, and a link to the space. Add a search bar to filter by space name. When a row is selected, show space permissions and members in a side panel.

Copy this prompt to try it in Retool

Build a page search and export tool

Create a Retool app where team members can run CQL searches across Confluence and export results to CSV. Useful for compliance teams who need to find all pages containing specific terminology, or for content migrations where you need a manifest of pages matching certain criteria.

Retool Prompt

Build a Retool search tool with a text input for CQL query and a Space dropdown filter. Show results in a Table with title, space, creator, last modified, and URL. Add a Download CSV button to export the full result set. Show total result count above the table.

Copy this prompt to try it in Retool

Troubleshooting

401 Unauthorized error on all requests despite correct email and token

Cause: The most common cause is using the Atlassian account password instead of an API token. Confluence Cloud requires an API token generated from id.atlassian.com — your account password will not work for API authentication.

Solution: Verify you're using an API token, not your account password. Go to https://id.atlassian.com/manage-profile/security/api-tokens and create a new token. In the Retool resource, the Username field should be your Atlassian email and the Password field should be the API token value.

404 Not Found on all API calls despite the resource being configured

Cause: The base URL is missing the /wiki prefix required for Confluence Cloud. Jira and Confluence share the same atlassian.net domain but have different URL paths.

Solution: Verify the resource base URL is https://YOUR_DOMAIN.atlassian.net/wiki/rest/api — the /wiki prefix is required. If your base URL is https://YOUR_DOMAIN.atlassian.net/rest/api, that's the Jira base URL pattern, not Confluence.

CQL search returns 400 Bad Request: 'Unknown CQL field'

Cause: The CQL query contains a syntax error or an invalid field name. Common mistakes include using SQL-style operators (LIKE instead of ~, =~ instead of ~) or misspelling field names.

Solution: Test your CQL query directly in Confluence first: navigate to Advanced Search in Confluence (Search → Advanced Search) and use the CQL input field. Common valid fields: type, space.key, title, text, creator, lastModified, created, label, ancestor, parent. Use ~ for contains, = for exact match, > and < for dates.

typescript
1// Valid CQL examples:
2// Text search: type = 'page' AND text ~ 'deployment'
3// By space: type = 'page' AND space.key = 'ENG'
4// By date: type = 'page' AND lastModified >= '2024-01-01'
5// By label: type = 'page' AND label = 'archived'
6// By creator: type = 'page' AND creator = 'user@company.com'

Pagination returns duplicate results or skips pages

Cause: Confluence's pagination uses start (offset) and limit parameters. If the underlying data changes between page requests (new pages added or pages deleted), offset-based pagination can produce duplicates or gaps.

Solution: For stable reports, fetch all results in a single query with a high limit (max 250 per request) rather than paginating. For large result sets, use the _links.next property in the response to follow cursor-based pagination rather than incrementing start manually.

Best practices

  • Use the v2 Confluence REST API (/wiki/api/v2/) for new queries — it has cleaner response formats and better pagination than the older v1 API.
  • Store the Atlassian API token in Retool Configuration Variables (Settings → Configuration Variables) marked as a secret — never hardcode it in the resource header.
  • Use CQL (Confluence Query Language) for all content searches rather than fetching entire spaces and filtering client-side — CQL runs server-side and is dramatically faster.
  • Always include the expand parameter in page queries to get the data you need in one call. Fetching pages then making per-page detail calls creates N+1 query problems.
  • Set getSpaces to run on page load with a 10-minute cache, since the space list changes infrequently — this avoids redundant API calls on every app open.
  • For Confluence Server or Data Center, use HTTP Basic Auth with your Confluence username and password rather than an API token — the authentication method differs from Cloud.
  • When modifying page content via the API, always include the current version number in the PUT request body. Confluence rejects updates without a version to prevent accidental overwrites.
  • Use a dedicated Atlassian service account for the Retool integration rather than a personal account, so the API token remains valid when team members change.

Alternatives

Frequently asked questions

Does Retool have a native Confluence connector?

No, Retool does not have a dedicated native connector for Confluence. You connect via a REST API Resource using Atlassian's Basic Auth (email + API token). However, Retool does have a native Jira connector, so if you're using both Atlassian products you'll configure Jira as a native connector and Confluence as a REST API resource.

Can I edit Confluence page content from Retool?

Yes. Use PUT /content/{id} with a JSON body containing the new title, type, version number, and body content in Confluence's storage format (XHTML-based markup). The version object must include the current page version number (incrementing by 1 forces Confluence to accept the update). Generating storage format markup programmatically is complex — it's easier to update metadata like labels, restrictions, and properties than to edit page body content from Retool.

Does this work with Confluence Server and Data Center?

Yes, but authentication differs. Confluence Server and Data Center use HTTP Basic Auth with your Confluence username and password (not email + API token). The base URL format is also different: https://YOUR_SERVER_DOMAIN/rest/api (no /wiki prefix). If your server has a context path, include it: https://YOUR_SERVER_DOMAIN/confluence/rest/api.

How do I get the Confluence page ID for a specific page?

The page ID is visible in the page's URL in Confluence: navigate to the page and look for a numeric ID in the URL, like /pages/12345678. You can also use CQL to find a page by title: GET /content/search?cql=title = 'My Page Title' AND type = 'page'. The id field in the response is the page ID.

Can I use Retool to build a Confluence analytics dashboard?

Yes. Use the /content/search endpoint with CQL to query page creation and modification activity by date range. For view/analytics data, Confluence provides a separate Analytics API (available on Premium and Enterprise plans) at /wiki/rest/api/analytics/content/{id}/viewers. This lets you build dashboards showing page popularity, most active editors, and content freshness metrics.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire Retool integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.