> ## Documentation Index
> Fetch the complete documentation index at: https://relevanceai.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Confluence Cloud

> Confluence is a powerful collaboration platform that helps teams organize, create, and share knowledge.

Confluence is a powerful collaboration platform that helps teams organize, create, and share knowledge. With Relevance AI's Confluence integration, you can seamlessly connect your Confluence workspace to your AI agents, enabling them to access, create, and update Confluence content, making your knowledge management workflows more efficient and intelligent.

<Warning>
  The Confluence integration in Relevance AI was built by Relevance AI, and is therefore supported by our team, not Atlassian (Confluence's parent company). If you have a question / issue with using Confluence in Relevance AI, please [reach out to our support team](/get-started/support). If you have a question / issue that is only about Confluence, you can [reach out to Atlassian support](https://support.atlassian.com/contact/).
</Warning>

## Connect the integration

Connecting your Confluence account to Relevance AI is a straightforward process:

1. Go to the **Integrations & API Keys** page in the sidebar of your Relevance AI dashboard.
2. Click on "Confluence" from the available integrations.
3. Click on the "Add Integration" button.
4. In the pop-up window, sign into your Atlassian account.
5. Grant the necessary permissions for Relevance AI to access your Confluence workspace.
6. Once authenticated, your Confluence account will appear as a connected integration.

## Tool steps for Confluence

The Confluence integration provides a rich set of actions that your agents can use to interact with your Confluence workspace. These actions can be incorporated into your agent's workflows as tool steps, enabling sophisticated knowledge management capabilities.

<Snippet file="components/integrations/confluence-tool-steps.mdx" />

## Use the integration's API tool step (Advanced)

In addition to the pre-built actions available in the tool directory, you can build custom tools that perform Confluence-specific activities using the Confluence API Call tool step:

1. Create a new tool in Relevance AI.
2. Scroll down to Tool-steps.
3. Add the Confluence API Tool step.
4. Select your connected Confluence account in the dropdown.
5. Configure the API endpoint, method, and parameters according to your needs.

This advanced approach gives you full access to the Confluence REST API, allowing you to implement custom functionality beyond what's available in the standard actions.

<Warning>
  **Check API Documentation for Required Headers**

  The Confluence API Call Tool step does **not** automatically add headers to your requests. Many Confluence REST API v2 endpoints require the `accept: application/json` header to function properly.

  **Always check the [Confluence API documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/) for your specific endpoint** to see which headers are required, and add them manually in the Headers section of the API Call Tool step.
</Warning>

### Adding Required Headers

When using the Confluence API Call Tool step, you must manually add any headers required by the endpoint you're calling. The tool does not add these automatically.

<Steps>
  <Step title="Check the API documentation">
    Before configuring your API call, visit the [Confluence REST API documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/) and find your specific endpoint. Look for the "Request" section to see which headers are required.

    Many endpoints require the `accept: application/json` header, but requirements vary by endpoint.
  </Step>

  <Step title="Add the API Call Tool step">
    In your tool configuration, add the Confluence API Call Tool step and select your connected Confluence account.
  </Step>

  <Step title="Configure the endpoint">
    Set up your API endpoint and method. For example, to get a page by ID:

    * **Method**: GET
    * **Endpoint**: `/wiki/api/v2/pages/{id}?body-format=storage`
  </Step>

  <Step title="Add required headers manually">
    In the Headers section of the API Call Tool step, add any headers specified in the API documentation. For most Confluence REST API v2 endpoints, this includes:

    ```json theme={null}
    {
      "accept": "application/json"
    }
    ```

    This header tells the Confluence API to return responses in JSON format. Without it, many endpoints will fail with errors.
  </Step>
</Steps>

<Info>
  **Why is this header needed?**

  The `accept: application/json` header tells the Confluence API what format you want the response in. Most REST API v2 endpoints require this header to return data in JSON format, which the tool can then process. Without this header, the API may return an error or data in an unexpected format.
</Info>

### Example API Call Configurations

Here are examples of calling the Confluence API with both object and array request bodies.

<Tabs>
  <Tab title="Object Body Example">
    **Use case**: Get a page by ID

    This endpoint requires the `accept: application/json` header according to the [Atlassian documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get).

    **API Method**: GET

    **Endpoint**: `/wiki/api/v2/pages/{id}?body-format=storage`

    **Headers** (must be added manually):

    ```json theme={null}
    {
      "accept": "application/json"
    }
    ```

    **Path Parameters**:

    * `id`: The ID of the Confluence page you want to retrieve

    **Expected Response**:

    ```json theme={null}
    {
      "id": "123456",
      "status": "current",
      "title": "Page Title",
      "spaceId": "789012",
      "body": {
        "storage": {
          "value": "<p>Page content here</p>",
          "representation": "storage"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Array Body Example">
    **Use case**: Bulk update page properties

    Some Confluence endpoints require array bodies for bulk operations. This example shows updating multiple page properties at once.

    **API Method**: PUT

    **Endpoint**: `/wiki/api/v2/pages/{id}/properties`

    **Headers** (must be added manually):

    ```json theme={null}
    {
      "accept": "application/json",
      "content-type": "application/json"
    }
    ```

    **Body** (array format):

    ```json theme={null}
    [
      {
        "key": "status",
        "value": "reviewed"
      },
      {
        "key": "priority",
        "value": "high"
      },
      {
        "key": "last-updated-by",
        "value": "automation-bot"
      }
    ]
    ```

    **Path Parameters**:

    * `id`: The ID of the Confluence page

    <Info>
      This endpoint demonstrates the array body support added in PR #12797. The API Call tool step now accepts both JSON objects `{}` and JSON arrays `[]` as top-level request bodies.
    </Info>
  </Tab>
</Tabs>

<Tip>
  **Best Practice**: Always consult the [Confluence API documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/) for your specific endpoint before configuring your API call. The documentation will specify all required headers, parameters, and request body formats (including whether an object or array is expected).
</Tip>

## Example use cases

Here are some ways you can leverage the Confluence integration with your agents:

1. **Documentation Assistant**: Create an agent that automatically updates technical documentation in Confluence when new features are released or code changes are made.
2. **Knowledge Summarizer**: Build an agent that monitors specific Confluence spaces and creates executive summaries of new content added during the week.
3. **Content Organizer**: Deploy an agent that automatically adds appropriate labels to new Confluence pages based on their content analysis.
4. **Meeting Notes Processor**: Create an agent that takes meeting notes, formats them according to your team's template, and posts them to the relevant Confluence space.
5. **Knowledge Gap Identifier**: Build an agent that analyzes your Confluence content and identifies areas where documentation is missing or outdated.

## Related Features

* Knowledge Integration - Use Confluence as a knowledge source for your agents, enabling them to access and reference your team's documentation when responding to queries.
* Slack Integration - Combine Confluence and Slack integrations to create powerful workflows where agents can update documentation and notify team members about changes.
* Document Processing - Leverage document processing tools alongside Confluence integration to extract, analyze, and organize information from various sources into your knowledge base.

## Frequently asked questions (FAQs)

<AccordionGroup>
  <Accordion title="What permissions does the Confluence integration require?">
    The integration requires permissions to read and write content, access spaces, and manage page properties in your Confluence workspace. You can review the specific permissions during the authentication process.
  </Accordion>

  <Accordion title="Can I restrict my Agent to only access certain spaces in Confluence?">
    Yes, you can configure your tools and triggers to only interact with specific spaces by setting the appropriate filters and parameters.
  </Accordion>

  <Accordion title="Why am I getting errors when using the Confluence API Call Tool?">
    The most common issue is missing required headers. The API Call Tool does **not** automatically add headers to your requests.

    To troubleshoot:

    1. **Check the API documentation**: Visit the [Confluence API documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/) for your specific endpoint and verify which headers are required. Most REST API v2 endpoints require `accept: application/json`.
    2. **Add headers manually**: In the Headers section of the API Call Tool step, add all required headers as specified in the documentation.
    3. **Verify your connection**: Ensure your Confluence account is properly connected in Relevance AI.
    4. **Check permissions**: Confirm you have the necessary permissions for the endpoint you're calling.
    5. **Validate the endpoint**: Make sure your endpoint URL and parameters are correctly formatted according to the API documentation.
    6. **Use the correct API version**: The REST API v2 is recommended for new integrations.
  </Accordion>

  <Accordion title="Do I need to add the accept header for all Confluence API endpoints?">
    Not necessarily. While many Confluence REST API v2 endpoints require the `accept: application/json` header, requirements vary by endpoint.

    **Always check the official [Confluence API documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/)** for your specific endpoint to see which headers are required. The documentation will clearly specify all required headers in the "Request" section of each endpoint.

    Remember: The API Call Tool does not add any headers automatically, so you must manually add all required headers specified in the documentation.
  </Accordion>

  <Accordion title="When should I use array bodies vs. object bodies in Confluence API calls?">
    The request body format depends on what the specific Confluence API endpoint expects:

    * **Object bodies** `{}` are used for most single-item operations (creating a page, updating a single property)
    * **Array bodies** `[]` are required for bulk operations or specific endpoints that expect multiple items (like updating multiple page properties at once)

    Always check the [Confluence API documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/) for your endpoint to see which format is required. The documentation will show example request bodies in the correct format.
  </Accordion>
</AccordionGroup>
