Skip to content

Use Confluence

Connect Jira, and the same Atlassian connection lets agents find, read and write Confluence pages with the confluence command. Confluence needs no setup or login of its own.

What you do What the agent does
Connect Jira Finds, reads, creates and updates pages with confluence
Ask for what you need Writes to Confluence as your Atlassian account
Reconnect when the connection breaks Says so and stops when the connection cannot be used

confluence works in every agent’s sessions. An OAuth token is checked on every call and renewed before it expires, so you never restart a session for it.

Connect Jira in ⚙ Settings → “Issue tracker”. The steps are in Connect an issue tracker.

  • With an API token connection there is nothing else to prepare
  • With an OAuth connection, the tenant’s Atlassian app needs the Confluence scopes. Without them, the Jira card shows a warning
What the Jira card says What does not work
Confluence: not available. Every confluence command
Confluence: search works, but … Page commands such as info, create-child and copy-tree (they answer 401)

Either way, it works once the tenant administrator has added the scopes to the app and you reconnect Jira.

Just ask the way you normally would.

Find the “Release procedure” page in Confluence and sum it up

Write this design note as a new page in the DEV space

Add this bug to the “Known issues” section of page 123456

Agents use commands like these.

Task Example
Find pages confluence search "release notes"
Read a page confluence read PAGE_ID --format markdown
Look up a space confluence space-lookup KEY
Create a page confluence create "Title" SPACE --content "…"
Update a page confluence update PAGE_ID …
  • What is written carries your name. It can do only what your Atlassian account is allowed to do
  • Pages can be read and written as Markdown. Japanese, emoji, tables, lists, and code or bold next to Japanese text are kept as they are
  • Someone else’s edit is never overwritten. If another person changed the page after it was read, the update is refused. The agent reads the page again and redoes the edit

It works the same way from a terminal. There is no confluence init to run.

Terminal window
confluence search "release notes"
confluence --help

The connection has expired or been revoked, or it lacks the Confluence scopes. Check the Jira card in ⚙ Settings → “Issue tracker” and reconnect Jira.

The connection dropped after the request was sent, so it is not known whether the page was written. Writes are never re-run on their own. Search for the title or read the page before running it again.

Some commands fail with “410”, “401” or “403”

Section titled “Some commands fail with “410”, “401” or “403””

Page commands switch to Atlassian’s newer API by themselves. These still fail:

  • With “410” (they still use an API Atlassian has removed): listing comments, adding a footer comment or an inline comment with --inline-properties, --inline-original-selection or --inline-marker-ref, attachments, page versions and properties (front matter). For export, add --skip-attachments
  • With “401” or “403” on an OAuth connection (it does not ask for the permission, on purpose): delete, replying to a comment (--parent), an inline comment given only --inline-selection, and comment-resolve. An API-token connection has the token’s own permissions

When page commands such as info or create-child answer 401 and confluence prints a line about newer scopes, your connection predates them: see the Jira card above.

confluence api --jq cannot be used with the saved connection. Pipe instead, as in confluence api … | jq '…'.

It cannot be connected in Settings. Set it up yourself with confluence init, --profile, or variables such as CONFLUENCE_DOMAIN and CONFLUENCE_API_TOKEN. confluence then runs as you configured it, without the saved connection.