Confluence Connector

Make your Confluence files searchable with AI. Connect your Confluence to SourceSync and instantly search across all your files with semantic understanding.

Common Challenges

  • Basic keyword matching misses context
  • Limited file content search
  • Separate search for each folder
  • Complex Confluence API integration
  • Manual file syncing

Our Solution

  • Semantic search understands meaning
  • Full-text search across all files
  • Unified search across folders
  • Simple REST API
  • Automatic content sync

How It Works

1

Set Up Confluence Integration

Create a Confluence app and configure OAuth credentials. We'll guide you through the setup process.

2

Select Your Files

Choose which Confluence files to connect. Our integration respects your permissions and only accesses the files you explicitly select.

3

Start Searching

Use our API to search across your Confluence content with AI understanding. Perfect for building internal tools, knowledge bases, or search applications.

Implementation Guide

1. Create Confluence App

First, set up your Confluence app and configure OAuth:

  1. Go to Confluence Developer Console
  2. Click Create OAuth 2.0 Integration
  3. In the initial setup:
    • Enter app name: SourceSync Integration (or your preferred name)
    • Check the terms and conditions
    • Click Create
  4. Go to Distribution tab:
    • Click on Edit
    • Distribution Status:
      • Select Distribution Status as Sharing
    • Vendor & Security details:
      • Fill out the Vendor & Security details
    • Personal Data Declaration:
      • Select Yes for Does your app store personal data?
      • Tick the checkbox for I confirm that I've implemented the Personal Data Reporting API
    • Click Save Changes
  5. Go to Permissions tab:
    • User Identity API:
      • Click on Add action for User Identity API
      • Click on Configure action for User Identity API
      • Click on Edit Scopes
      • Select View active user profile scope with code read:me
      • Click on Save
      • Go back to Permissions tab again
    • Confluence API:
      • Click on Add action for Confluence API
      • Click on Configure action for Confluence API
      • Go to Granular Scopes tab
      • Click on Edit Scopes
      • Search for read:space and select View spaces scope with code read:space:confluence
      • Search for read:page and select View pages scope with code read:page:confluence
      • Click on Save
      • Go back to Permissions tab again
  6. Go to Authorization tab:
    • Click on Add action for OAuth 2.0 (3LO) authentication type
    • Paste the below callback URL: https://api.sourcesync.ai/connectors/confluence/callback
    • Click on Save Changes
  7. Go to Settings tab:
    • Change any details if you want
    • Under Authentication Details:
      • Note down your app credentials:
        • Client ID
        • Client Secret

2. Configure SourceSync

Add your Confluence configuration to your SourceSync namespace:

Configure Confluence

curl -X PATCH https://api.sourcesync.ai/v1/namespaces/ns_123 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "confluenceConfig": {
      "clientId": "your-confluence-client-id",
      "clientSecret": "your-confluence-client-secret"
    }
  }'

3. Create Confluence Connection

Now create a connection to your Confluence:

  1. To create a connection, you need to have the domain of your Confluence (e.g. https://<your-confluence-domain>.atlassian.net).
  2. Create a new Confluence connection to get an authorization URL
  3. Open the URL in a browser for the user to authorize
  4. Check the connection status - it will be ACTIVE if authorization is successful

Create Connection

# Create Confluence connection
curl -X POST https://api.sourcesync.ai/v1/connections \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "namespaceId": "ns_123",
    "name": "My Confluence",
    "connector": "CONFLUENCE",
    "metadata": {
      "domain": "your-confluence-domain",
    },
    "clientRedirectUrl": "https://example.com/ragaas/confluence/success"
  }'

# Open authorizationUrl in browser for user to authorize
# Confluence redirects back to SourceSync after authorization

# Check connection status
curl -X GET https://api.sourcesync.ai/v1/connections/conn_abc123?namespaceId=ns_123 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

4. Select Confluence Pages

After successfully creating a connection, you can use below APIs to see the available spaces and pages.

  1. Get all the available spaces (with pagination - limit and cursor)
  2. Get all the available pages in a space (with pagination - limit and cursor)
  3. Note down the page ids of the pages you want to connect to SourceSync

Get Confluence Spaces

# Get all spaces (without limit and without cursor) [default limit is 20]
curl -X GET https://api.sourcesync.ai/v1/connectors/confluence/spaces?namespaceId=ns_123&connectionId=conn_abc123 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

# Get all spaces (without limit and without cursor)
curl -X GET https://api.sourcesync.ai/v1/connectors/confluence/spaces?namespaceId=ns_123&connectionId=conn_abc123&limit=10 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

# Get all spaces (with limit and with cursor)
curl -X GET https://api.sourcesync.ai/v1/connectors/confluence/spaces?namespaceId=ns_123&connectionId=conn_abc123&limit=10&cursor=123 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

Get Confluence Pages in a Space

# Get all pages in a space (without limit and without cursor) [default limit is 20]
curl -X GET https://api.sourcesync.ai/v1/connectors/confluence/pages?namespaceId=ns_123&connectionId=conn_abc123&spaceId=space_123 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

# Get all pages in a space (without limit and without cursor)
curl -X GET https://api.sourcesync.ai/v1/connectors/confluence/pages?namespaceId=ns_123&connectionId=conn_abc123&spaceId=space_123&limit=10 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

# Get all pages in a space (with limit and with cursor)
curl -X GET https://api.sourcesync.ai/v1/connectors/confluence/pages?namespaceId=ns_123&connectionId=conn_abc123&spaceId=space_123&limit=10&cursor=123 \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

5. Ingest Confluence Content

After successfully creating a connection and noting down the page ids, you can ingest the selected Confluence pages: (docs)

Ingest Content

# Start ingestion
curl -X POST https://api.sourcesync.ai/v1/ingest/confluence \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "namespaceId": "ns_123",
    "ingestConfig": {
      "source": "CONFLUENCE",
      "config": {
        "connectionId": "conn_abc123",
        "externalIds": ["page_123", "page_124"],
        "metadata": {
          "source": "confluence",
          "workspace": "My Workspace"
        }
      }
    }
  }'

# Get the ingestJobRunId from the response

# Check ingestion status
curl "https://api.sourcesync.ai/v1/ingest-job-runs/job_xyz789?namespaceId=ns_123" \
 -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}"

6. Search Your Content

Once your ingestion job is complete, you can search across your Confluence pages: (docs)

Search Content

curl -X POST https://api.sourcesync.ai/v1/search \
  -H "Authorization: Bearer ${SOURCE_SYNC_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is our refund policy?",
    "namespaceId": "ns_123",
    "filter": {
      "metadata": {
        "source": "confluence"
      }
    }
  }'

Supported File Types

The Confluence connector supports the following file types:

  • Documents: .pdf, .doc, .docx, .ppt, .pptx
  • Spreadsheets: .xls, .xlsx, .csv
  • Text files: .txt, .md, .rtf
  • Web files: .html, .xml

Next Steps