# Confluence on boxd

> A tool for team collaboration and knowledge management.

- Page: https://boxd.sh/integrations/confluence/
- CLI: `run confluence` (69 commands, 41 marked common)
- SDK: `import { confluence } from "@boxd/run"`; every parameter and response type is at `@boxd/run/confluence`
- Triggers: 23
- Connect: `run auth confluence` (Sign in with Confluence), or https://app.boxd.sh/integrations/detail/confluence
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth confluence      # once: prints a link to connect your account
run confluence           # list its commands
run confluence get-pages
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { confluence } from "@boxd/run";

const result = await confluence.getPages({});
console.log(result);

confluence.on("new-audit-log", async (event) => {
  // New Audit Log Record: runs on this machine, once per event
  console.log(event);
});
```

Run it with `run confluence.run.ts`. A script that calls `.on()` keeps running as a job and handles each event.

## Commands

Required flags are listed; `run confluence <command> --help` lists the optional ones. "common" marks what `run confluence` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `add-content-label` ·common | `confluence.addContentLabel()` | `--id` `--labels` | 0 | Add labels to a piece of content |
| `cql-search` | `confluence.cqlSearch()` | `--cql` | 5 | Searches for content in Confluence using Confluence Query Language (CQL) |
| `create-blogpost` ·common | `confluence.createBlogpost()` | `--body` `--spaceId` `--status` `--title` | 0 | Create a new Confluence blog post |
| `create-blogpost-property` | `confluence.createBlogpostProperty()` | `--id` `--key` `--value` | 0 | Create a property on a specified blog post |
| `create-content-property-for-whiteboard` | `confluence.createContentPropertyForWhiteboard()` | `--key` `--value` `--whiteboard-id` | 0 | Create a new content property on a whiteboard |
| `create-footer-comment` ·common | `confluence.createFooterComment()` | `--body` | 5 | Create a footer comment on a Confluence page, blog post, attachment, or custom content |
| `create-inline-comment` ·common | `confluence.createInlineComment()` | `--body` | 4 | Creates an inline comment on a Confluence page or blog post, highlighting specific text |
| `create-page` ·common | `confluence.createPage()` | `--spaceId` `--title` | 2 | Create a new Confluence page in a specified space |
| `create-page-property` ·common | `confluence.createPageProperty()` | `--key` `--page-id` `--value` | 0 | Create a property on a Confluence page |
| `create-private-space` ·common | `confluence.createPrivateSpace()` | `--key` `--name` | 1 | Create a private Confluence space |
| `create-space` ·common | `confluence.createSpace()` | `--key` `--name` | 3 | Create a new Confluence space |
| `create-space-property` | `confluence.createSpaceProperty()` | `--key` `--spaceId` `--value` | 1 | Create a new property on a Confluence space |
| `create-whiteboard` | `confluence.createWhiteboard()` | `--spaceId` | 2 | Create a new Confluence whiteboard |
| `delete-blogpost` ·common | `confluence.deleteBlogpost()` | `--id` | 1 | Deletes a Confluence blog post by ID |
| `delete-blogpost-property` | `confluence.deleteBlogpostProperty()` | `--id` `--propertyId` | 0 | Delete a blog post property |
| `delete-content-property-for-page-by-id` | `confluence.deleteContentPropertyForPageById()` | `--pageId` `--propertyId` | 0 | Delete a content property from a page by property ID |
| `delete-content-property-for-whiteboard-by-id` | `confluence.deleteContentPropertyForWhiteboardById()` | `--propertyId` `--whiteboardId` | 0 | Delete a content property from a whiteboard by property ID |
| `delete-page` ·common | `confluence.deletePage()` | `--id` | 0 | Delete a Confluence page |
| `delete-space` | `confluence.deleteSpace()` | `--space-key` | 0 | Delete a Confluence space by its key |
| `delete-space-property` | `confluence.deleteSpaceProperty()` | `--propertyId` `--spaceIdOrKey` | 0 | Delete a space property |
| `download-attachment` ·common | `confluence.downloadAttachment()` | `--attachmentId` `--pageId` | 0 | Downloads an attachment from a Confluence page and returns a downloadable file |
| `find-text-selections` | `confluence.findTextSelections()` | `--page-id` `--search-text` | 3 | Finds text occurrences in a Confluence page's content to help with inline comment creation |
| `get-attachment-labels` ·common | `confluence.getAttachmentLabels()` | `--id` | 4 | List labels on an attachment |
| `get-attachments` ·common | `confluence.getAttachments()` | `--pageId` | 3 | Retrieve attachments of a Confluence page |
| `get-audit-logs` ·common | `confluence.getAuditLogs()` | — | 5 | Retrieve Confluence audit records |
| `get-blog-posts` ·common | `confluence.getBlogPosts()` | — | 2 | Retrieve a list of blog posts |
| `get-blog-posts-for-label` ·common | `confluence.getBlogPostsForLabel()` | `--id` | 2 | List all blog posts under a specific label |
| `get-blogpost-by-id` ·common | `confluence.getBlogpostById()` | `--id` | 0 | Retrieve a specific Confluence blog post by its ID |
| `get-blogpost-labels` ·common | `confluence.getBlogpostLabels()` | `--id` | 2 | Retrieve labels of a specific Confluence blog post by ID |
| `get-blogpost-like-count` ·common | `confluence.getBlogpostLikeCount()` | `--id` | 0 | Get like count for a Confluence blog post |
| `get-blogpost-operations` | `confluence.getBlogpostOperations()` | `--id` | 0 | Retrieve permitted operations for a Confluence blog post |
| `get-blogpost-version-details` ·common | `confluence.getBlogpostVersionDetails()` | `--blogpostId` `--versionNumber` | 0 | Retrieve details for a specific version of a blog post |
| `get-blogpost-versions` ·common | `confluence.getBlogpostVersions()` | `--blogpostId` | 2 | Retrieve all versions of a specific blog post |
| `get-child-pages` ·common | `confluence.getChildPages()` | `--id` | 3 | List all direct child pages of a given Confluence page |
| `get-content-properties-for-blog-post` | `confluence.getContentPropertiesForBlogPost()` | `--blogpost-id` | 2 | Retrieve all content properties on a blog post |
| `get-content-properties-for-page` | `confluence.getContentPropertiesForPage()` | `--page-id` | 2 | Retrieve all content properties on a page |
| `get-content-restrictions` | `confluence.getContentRestrictions()` | `--id` | 1 | Retrieve restrictions on a Confluence content item |
| `get-current-user` | `confluence.getCurrentUser()` | — | 0 | Get information about the currently authenticated user, always scoped to the account tied to the configured connection, not arbitrary users |
| `get-inline-comments-for-blog-post` | `confluence.getInlineCommentsForBlogPost()` | `--id` | 4 | Retrieve inline comments for a Confluence blog post |
| `get-labels` ·common | `confluence.getLabels()` | — | 2 | Retrieve all labels in a Confluence site; use for label discovery when you need to list or page through labels |
| `get-labels-for-page` ·common | `confluence.getLabelsForPage()` | `--id` | 2 | Retrieve labels of a specific Confluence page by ID |
| `get-labels-for-space` ·common | `confluence.getLabelsForSpace()` | `--id` | 4 | List labels on a space |
| `get-labels-for-space-content` ·common | `confluence.getLabelsForSpaceContent()` | `--id` | 3 | List labels on all content in a space |
| `get-page-ancestors` | `confluence.getPageAncestors()` | `--id` | 1 | Retrieve all ancestors for a given Confluence page by its ID |
| `get-page-by-id` ·common | `confluence.getPageById()` | `--id` | 2 | Retrieve a Confluence page by its ID |
| `get-page-footer-comments` | `confluence.getPageFooterComments()` | `--id` | 5 | Retrieve footer (non-inline) comments for a Confluence page |
| `get-page-inline-comments` | `confluence.getPageInlineComments()` | `--id` | 6 | Retrieve inline comments for a Confluence page |
| `get-page-like-count` ·common | `confluence.getPageLikeCount()` | `--id` | 0 | Get like count for a Confluence page |
| `get-page-versions` ·common | `confluence.getPageVersions()` | `--id` | 2 | Retrieve all versions of a specific Confluence page |
| `get-pages` ·common | `confluence.getPages()` | — | 8 | Retrieve a paginated list of Confluence pages |
| `get-space-by-id` ·common | `confluence.getSpaceById()` | `--id` | 0 | Retrieve a Confluence space by its ID |
| `get-space-contents` ·common | `confluence.getSpaceContents()` | `--spaceKey` | 4 | Retrieve content in a Confluence space |
| `get-space-properties` | `confluence.getSpaceProperties()` | `--id` | 3 | Get properties of a Confluence space |
| `get-spaces` ·common | `confluence.getSpaces()` | — | 7 | Retrieve a paginated list of Confluence spaces with optional filtering |
| `get-tasks` ·common | `confluence.getTasks()` | — | 12 | List Confluence tasks (action items) with filtering by assignee, creator, space, page, blog post, status, and dates |
| `get-user-anonymous` | `confluence.getUserAnonymous()` | — | 0 | Retrieve information about the anonymous user |
| `list-spaces` ·common | `confluence.listSpaces()` | — | 2 | Retrieves a paginated list of Confluence spaces visible to the authenticated user |
| `search-content` | `confluence.searchContent()` | `--query` | 4 | Searches for content by filtering pages from the Confluence v2 API with intelligent ranking |
| `search-pages` ·common | `confluence.searchPages()` | — | 6 | Searches for pages in Confluence using filters like title, space, and status |
| `search-spaces` ·common | `confluence.searchSpaces()` | — | 8 | Searches for Confluence spaces with flexible filtering by name, key, type, status, and labels |
| `search-users` | `confluence.searchUsers()` | — | 3 | Searches for users using user-specific queries from the Confluence Query Language (CQL) |
| `update-blogpost` ·common | `confluence.updateBlogpost()` | `--body` `--id` `--spaceId` `--title` `--version` | 1 | Update a Confluence blog post's title or content |
| `update-blogpost-property` | `confluence.updateBlogpostProperty()` | `--id` `--propertyId` `--value` | 0 | Update a property of a specified blog post |
| `update-content-property-for-page-by-id` | `confluence.updateContentPropertyForPageById()` | `--pageId` `--propertyId` `--value` | 0 | Update a content property on a Confluence page |
| `update-content-property-for-whiteboard-by-id` | `confluence.updateContentPropertyForWhiteboardById()` | `--propertyId` `--value` `--whiteboardId` | 0 | Update a content property on a whiteboard |
| `update-page` ·common | `confluence.updatePage()` | `--body` `--id` `--title` `--version` | 1 | Update an existing Confluence page, replacing the entire page content |
| `update-space-property` | `confluence.updateSpaceProperty()` | `--propertyId` `--spaceId` `--value` | 0 | Update a space property |
| `update-task` ·common | `confluence.updateTask()` | `--id` `--status` | 1 | Update a Confluence task status |
| `validate-credential` ·common | `confluence.validateCredential()` | — | 0 | Validates Confluence credentials by attempting to retrieve the current authenticated user's information |

## Triggers

`confluence.on("<event>", handler)` in a script; required config goes before the handler as an object.

| Event | Name | Required config | Description |
|---|---|---|---|
| `"attachment-added"` | New Attachment Added | `pageId` | Triggers when a new attachment is uploaded to a Confluence page |
| `"blog-post-added-to-label"` | Blog Post Added to Label | `label_id` | Triggers when a new blog post is added to a specific label in Confluence |
| `"blogpost-inline-comment-added"` | Blogpost Inline Comment Added | `blog_post_id` | Triggers when a new inline comment is added to a Confluence blog post |
| `"blogpost-like-count-changed"` | Blog Post Like Count Changed | `blogpost_id` | Triggers when a Confluence blog post's like count changes (someone likes or unlikes) |
| `"blogpost-updated"` | Blog Post Updated | `blogpost_id` | Triggers when a Confluence blog post is updated (any edit that creates a new version) |
| `"content-restrictions-changed"` | Content Restrictions Changed | `content_id` | Triggers when view or edit restrictions change on a Confluence page or blog post |
| `"footer-comment-added"` | New Footer Comment Added to Page | `page_id` | Triggers when a new footer comment is added to a Confluence page |
| `"new-audit-log"` | New Audit Log Record | — | Triggers when a new audit log record is created in Confluence |
| `"new-blog-post-created"` | New Blog Post Created | — | Triggers when a new blog post is created in Confluence |
| `"new-child-page"` | New Child Page Created | `parent_page_id` | Triggers when a new child page is created under a specific parent page in Confluence |
| `"new-cql-content-match"` | New CQL Content Match | `cql_query` | Triggers when new Confluence content appears that matches a user-provided CQL query |
| `"new-task-created"` | New Task Created | — | Triggers when a new task (action item) is created in Confluence |
| `"page-content-properties-changed"` | Page Content Properties Changed | `page_id` | Triggers when content properties on a Confluence page are added, removed, or updated |
| `"page-created"` | New Page Created | — | Triggers when a new page is created in Confluence |
| `"page-inline-comment-added"` | New Inline Comment Added to Page | `page_id` | Triggers when a new inline comment is added to a Confluence page |
| `"page-like-count-changed"` | Page Like Count Changed | `page_id` | Triggers when a Confluence page's like count changes (someone likes or unlikes) |
| `"page-moved"` | Page Moved | `page_id` | Triggers when a Confluence page is moved to a different location in the page hierarchy |
| `"page-updated"` | Page Updated | `page_id` | Triggers when a Confluence page is updated (any edit that creates a new version) |
| `"page-version-created"` | Page Version Created | `page_id` | Triggers when a new version is created for a specific Confluence page |
| `"space-content-added"` | New Space Content Added | — | Triggers when new content (pages or blog posts) is added to a Confluence space |
| `"space-created"` | New Space Created | — | Triggers when a new Confluence space is created |
| `"space-details-changed"` | Space Details Changed | `space_id` | Triggers when a Confluence space's details change (name, description, status, owner, icon, etc.) |
| `"space-properties-changed"` | Space Properties Changed | `space_id` | Triggers when properties on a Confluence space are added, removed, or updated |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
