# Connect Atlassian Teamwork Graph to EkLine Docs Agent

import { Steps, Aside } from '@astrojs/starlight/components';

Connect Atlassian Teamwork Graph so Docs Agent can search your entire Confluence site for source material. Instead of pointing the agent at a single page, you let it find the relevant pages across every space you have access to. It then uses what it finds to draft and update documentation.

This connection is read-only. The agent searches and reads Confluence through it, and never writes back. Publishing edits to Confluence stays in the [knowledge base management](/agent/manage-knowledge-base) workflow.

<Aside type="note" title="How this differs from the Confluence integration">
The [Confluence integration](/agent/integrations#confluence) pulls a page you name by URL into a prompt. Teamwork Graph lets the agent **discover** pages across your whole site when you don't already know the URL. Connect both to reference a known page and search for related ones in the same session.
</Aside>

## Prerequisites

- An EkLine account with Docs Agent, and Teamwork Graph enabled for your organization.
- An Atlassian account with access to the Confluence content you want the agent to search.
- Permission to create an Atlassian API token for that account.

## Use a service account

Connect with a dedicated Atlassian service account rather than an individual's account. A service account is a standard Atlassian account your team creates for automated access.

A service account gives you:

- **Stable ownership.** The connection keeps working when a team member changes roles or leaves. A token tied to a personal account stops working when that account is deactivated.
- **Scoped access.** Grant the service account access to only the spaces the agent should search. The account's Confluence permissions are the boundary for what the agent can read.
- **Clear auditing.** Activity in Confluence appears under a recognizable account, such as `EkLine AI`, instead of a person's name.

<Aside type="tip" title="Apply the same approach to Jira and Confluence">
Connect the Jira, Confluence, and Teamwork Graph integrations with the same service account. Using one dedicated account for all three keeps access consistent and easy to review, and avoids tying the agent's reach to any one person's permissions.
</Aside>

## Create an Atlassian API token

Create the token from one of two places, depending on the account you connect. A service account token is the recommended option.

### Create a service account API token (recommended)

An organization administrator creates the token from the Atlassian admin console. For full details, see the Atlassian guides to [service accounts](https://support.atlassian.com/user-management/docs/understand-service-accounts/) and [API tokens for service accounts](https://support.atlassian.com/user-management/docs/manage-api-tokens-for-service-accounts/).

<Steps>

1. **Open the Atlassian admin console.**

   Go to [admin.atlassian.com](https://admin.atlassian.com) and select your organization if you have more than one.

2. **Open your service accounts.**

   Select **Directory > Service accounts**. If you don't have a service account yet, create one for EkLine first, such as `EkLine AI`.

3. **Create credentials.**

   Select the service account, then click **Create credentials**. Select **API token**, then click **Next**.

4. **Name the token and set an expiration.**

   Enter a recognizable name such as `EkLine Docs Agent`, then set an expiration date. Atlassian allows an expiration between 1 and 365 days.

5. **Select scopes.**

   Select every scope with the **Classic** scope type and a **Read**, **Read only**, or **Search** action. These give the agent read and search access to Confluence without granting write access. Click **Next**.

6. **Create and copy the token.**

   Review the token, click **Create**, then click **Copy to clipboard** and store the token securely.

   <Aside type="caution">
   Atlassian shows the token value only once. Copy it before you leave the page.
   </Aside>

</Steps>

### Create a personal API token

Connect with an individual account when you want to test the integration quickly. A personal token stops working when that account is deactivated, so prefer a service account for ongoing use.

<Steps>

1. **Open the API tokens page.**

   Sign in as the account the agent uses, then go to [id.atlassian.com/manage-profile/security/api-tokens](https://id.atlassian.com/manage-profile/security/api-tokens). For full details, see the [Atlassian guide to managing API tokens](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).

2. **Create a token.**

   Click **Create API token**, enter a recognizable label such as `EkLine Docs Agent`, and set an expiration date that fits your organization's rotation policy.

3. **Copy the token.**

   Copy the generated token and store it securely. It starts with `ATATT`.

   <Aside type="caution">
   Atlassian shows the token value only once. Copy it before you leave the page.
   </Aside>

</Steps>

## Connect Teamwork Graph in EkLine

<Steps>

1. **Open your integrations.**

   Go to your [EkLine dashboard](https://ekline.io/dashboard) and navigate to **Settings > Organization > Integrations**.

2. **Start the connection.**

   Find the **Atlassian Teamwork Graph** card and click **Connect**.

3. **Enter your Atlassian site.**

   In the **Atlassian site** field, enter your full site URL, such as `mycompany.atlassian.net`.

4. **Enter the account email.**

   In the **Atlassian account email** field, enter the email of the account whose token you created. For a service account, this is the service account's email.

5. **Enter the API token.**

   Paste the token into the **API token** field. EkLine stores the token encrypted and never displays it again.

6. **Connect.**

   Click **Connect**. EkLine validates the credentials against Confluence before saving. If validation fails, EkLine shows an error and stores nothing.

</Steps>

## Verify the connection

Confirm the integration is ready:

- The **Atlassian Teamwork Graph** card shows a connected status.
- In a Docs Agent session, ask the agent to find a Confluence page you know exists, and confirm it returns a result:

  ```text
  Search Confluence for our internal runbook on database failover
  and summarize the recovery steps.
  ```

## Use Teamwork Graph in Docs Agent

After you connect, ask the agent to find source material in Confluence as part of a documentation task. The agent searches across the spaces the connected account can access.

```text
Find the Confluence pages that describe our authentication flow,
then draft a public "How authentication works" guide from them.
```

```text
Search Confluence for anything we've written about rate limiting
and list the pages so I can pick which to turn into docs.
```

The agent reads only content the connected account has permission to view. Grant the service account access to a space to make that space searchable; remove access to take it out of scope.

## Troubleshooting

| Problem | Cause | Fix |
|---------|-------|-----|
| The connection fails when you click **Connect** | The email or token is wrong, or the token was revoked | Confirm the email matches the account that created the token, then create a fresh token and try again |
| The agent finds no pages | The connected account can't see the space | Grant the account access to the space in Confluence, then search again |
| The agent can't find a page you can see | You and the connected account have different Confluence permissions | Give the connected service account access to that space |
| The token stopped working | The token expired or the account was deactivated | Create a new token — on a service account, to avoid the connection breaking when an individual leaves — and reconnect |

## Next steps

- [Manage a Confluence or Pylon knowledge base](/agent/manage-knowledge-base) — Let the agent update Confluence pages and publish changes back.
- [Docs Agent integrations](/agent/integrations) — Reference Slack, Notion, Jira, Confluence, and more in your prompts.
- [Create documentation](/agent/create) — Generate a draft from your connected sources.

---

## Stuck?

Reply to your welcome email or contact support@ekline.io. We read every message.