Skip to main content
The Confluence Get spaces action retrieves a paginated list of Confluence spaces. Use this read-only action to discover available spaces and capture a space ID for follow-up actions like creating or updating content. This action is commonly the first step in Confluence workflows—fetch the target space, then pass its ID into write actions such as Create page or Update page.

Limitations

  • Pagination is required for large result sets.

Prerequisites

  • Glean action must be enabled for your instance and the Confluence action pack must be available.
  • A connected Confluence account must exist for the user with permission to view spaces.

Supported parameters

ParameterTypeDescription
ExpandArrayList of entities or fields to expand in the response payload, for example, body.storage.
LabelArrayList of labels to filter results by; only items with at least one of these labels are returned.
Maximum limitIntegerMaximum number of results to return per page. Defaults to 25.
Space keyArrayList of space keys to filter results to specific spaces.
StartIntegerIndex of the first item to return (pagination offset).
StatusStringStatus to filter results by (for example, current, draft, or trashed).
TypeStringType of content to filter by (for example, page or blogpost).

Usage example

You want to find the Engineering space ID so you can create a new API documentation page in that space. Instruction to an agent: “Find the Engineering space in Confluence and show me its space ID. I need it to create a new documentation page.” Resulting behavior:
  • Calls the Get spaces action to retrieve the list of available spaces.
    • Searches through the returned spaces to find one matching “Engineering” by name or key.
    • Returns the space ID for the Engineering space.
    • The agent displays the space ID, which can then be used with actions like Create page or Update page.
Workflow tip: Once you have the space ID, you can use it with Get pages to find specific pages within that space, or with Create page to add new content.

Troubleshooting

  • Possible cause: The Confluence action pack may not be fully configured, the connected account is missing, inactive, expired, or lacks the required scopes to view spaces.
  • Fix: Ask an admin to verify that the Confluence action pack is enabled for your deployment. Have the user reconnect their Confluence account to refresh the token and ensure it has the right scopes.
  • Possible cause: Temporary infrastructure or refresh issues.
  • Fix: Retry the action. If problems persist, have an admin check action pack availability and logs.

FAQs

Get spaces retrieves a list of Confluence spaces (workspaces) to identify which space to work in. Get pages retrieves pages within a specific space using filters such as author, label, and status.