The Confluence Gatekeeper connects Cloudflare OS to Atlassian Cloud Confluence via OAuth 2.0 (three-legged OAuth, or 3LO), giving agents and Gadgets the ability to search spaces, read and write pages and blog posts, manage comments and labels, and handle attachments. Page and blog post bodies are automatically converted to and from Markdown so agents can work with content naturally without dealing with Confluence’s native storage format.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudflare/cloudflare-os/llms.txt
Use this file to discover all available pages before exploring further.
Resource Granularities
Access is granted at one of three granularities. You can introduce an agent to an entire Confluence site, a single space, or a specific page or blog post — each yields a different session type with an appropriately scoped API.| Granularity | URL pattern | Session type |
|---|---|---|
| Site — search and open any space, page, or blog post the account can access | https://*.atlassian.net/wiki | ConfluenceSite |
| Space — list, search, and create pages and blog posts within one space | https://*.atlassian.net/wiki/spaces/:spaceKey | ConfluenceSpace |
| Page or blog post — read/edit the body, manage labels/comments/attachments, create child pages | https://*.atlassian.net/wiki/spaces/:spaceKey/pages/:pageId/* | ConfluenceContent |
A single account-level OAuth grant can span multiple Confluence sites. When you paste a resource URL from any of your accessible Confluence sites, the gatekeeper resolves the host to the correct cloud ID automatically.
Setting Up Atlassian OAuth 2.0
Create an OAuth 2.0 integration
- Go to the Atlassian Developer Console.
- Click Create and choose OAuth 2.0 integration.
- Give it a name (e.g., “My Company OS”) and click Create.
Add the Confluence API and enable scopes
In the integration, go to Permissions → Add APIs and add Confluence API.You must enable scopes from both the Granular scopes tab and the Classic scopes tab. The gatekeeper uses the v2 API for most operations (requiring granular scopes) and falls back to v1 endpoints for a few capabilities (requiring classic scopes).Granular scopes (for the v2 REST API):Classic scopes (for v1 fallback endpoints — CQL search, label writes, attachment upload, restore):Account-level scopes (always required):
Set the authorization callback URL
In the integration, go to Authorization and set the callback URL:
- Local dev:
http://localhost:8787/gatekeeper/confluence/oauth - Production:
${PUBLIC_BASE_URL}/gatekeeper/confluence/oauth
Configure credentials
For local development, set the credentials in the repo-root The dev server maps
.dev.vars:.dev.vars
CONFLUENCE_CLIENT_ID / CONFLUENCE_CLIENT_SECRET into the Worker’s CLIENT_ID / CLIENT_SECRET automatically. For production, set CLIENT_ID and CLIENT_SECRET as secrets on the deployed Worker and set BASE_URL to the public gatekeeper URL.Markdown Conversion
Page and blog post bodies are exchanged as Markdown. The gatekeeper converts between Confluence’s native “storage format” (XHTML with custom macros) and Markdown automatically, so agents can read and write page content without dealing with XML.- Reading: Confluence storage format is converted to Markdown before being returned to the agent
- Writing: Markdown from the agent is converted back to Confluence storage format before being saved
- Unsupported macros: degrade gracefully to a labeled placeholder rather than failing
What Agents Can Do
Once a Confluence resource is introduced, agents can:- Site session
- Space session
- Content session
listSpaces— list all accessible spacesgetSpace— fetch a space’s metadatagetContent— fetch a page or blog post by IDsearch— full-text search or raw CQL query across the entire sitegetCurrentUser— read the connected user’s identity
Approvals and Simulation
Every read operation is recorded as an observation. Every write — creating or editing a page, posting a comment, adding a label, uploading an attachment — is staged in the approval queue and not sent to Confluence until you approve it. While writes are pending approval, the agent sees simulated results: provisional IDs for created content, body overlays for edited pages, trashed-state tracking. This means the agent can continue building on the results of a pending write without being blocked by the approval step.Notes and Limitations
- The
authorandlastUpdatedByfields expose only anaccountId. The Confluence v2 API returns IDs rather than full user objects. - CQL search, label add/remove, attachment upload, and restore-from-trash rely on v1 API endpoints. If Atlassian removes these endpoints, those operations will surface a clear “not available” error rather than failing silently.
- Attachment downloads are capped at 16 KB.