# Integrations

## Overview

Integrations are how SRE.ai connects to the tools beyond Salesforce:

**GitHub is the core integration,** without it, SRE.ai cannot track **branches**, trigger **automations**, or manage **pull requests**.

The remaining integrations further extend SRE.ai's reach, enabling it to serve as a truly cross-platform **DevOps assistant**.

{% hint style="info" %}
Integrations rely on various connection methods such as **SSO**, **OAuth**, and **API keys**.
{% endhint %}

## Core capabilities

SRE.ai's Integrations feature supports five applications:

* GitHub
* GitLab
* Jira
* Microsoft Teams
* Supabase

### Integrations page

If no integrations have been configured yet, the Integrations page displays an empty state with a **Connect an integration** button. Click it to begin adding your first integration.

{% hint style="info" %}
**Salesforce is not managed here.**

To connect a Salesforce org, navigate to **Salesforce Orgs** instead.

The Integrations page covers third-party tools: GitHub, GitLab, Jira, Microsoft Teams, and Supabase.
{% endhint %}

Once at least one integration is configured, the page displays a table of your connected integrations.

## Setup

### SSO

GitHub uses SSO, redirecting the user to the relevant sign-in page when connecting for the first time:

#### GitHub

<details>

<summary><mark style="background-color:yellow;"><strong>Click to learn about connecting GitHub to SRE.ai</strong></mark></summary>

1. In the Integrations page, click **+ Add Integration** in the top right of the screen and select **GitHub**
2. You'll be redirected to GitHub to install the SRE.ai GitHub App
3. GitHub will ask: "Where do you want to install the SRE.ai GitHub App?"
4. Select your organization (not your personal account)
5. On the repository access screen, choose your access scope:
   * **Only select repositories:** Choose specific repositories to connect (recommended)
   * Select at least one repository from the dropdown
6. Review the permissions SRE.ai is requesting:
   * Read access to metadata
   * Read and write access to code, pull requests, and repository hooks
7. Click **Install** (or **Update access** if modifying an existing installation)
8. You'll be returned to SRE.ai with your GitHub account connected

{% hint style="warning" %}
**Webhook signature verification is enforced.**

SRE.ai verifies the signature of every incoming webhook from GitHub using the secret configured for your integration.\
\
Webhook requests with a missing or invalid signature are rejected with a `401 Unauthorized` response and will not trigger any pipeline actions.

Ensure the webhook secret in your GitHub repository settings matches the one stored in SRE.ai. A mismatch will cause all webhook events to be rejected.
{% endhint %}

**Viewing enabled repositories:**

After connecting, the Integrations table shows your GitHub integration along with the repositories currently enabled for SRE.ai.

You can see at a glance which repos are accessible without leaving the page.

**Managing repository access:**

To add or remove repositories after the initial setup, use the repository management button in the GitHub row of the Integrations table. This takes you directly to GitHub's repository selection UI.

There's no need to reinstall or fully re-integrate the GitHub App.

</details>

### OAuth

The following Integrations require OAuth client IDs and OAuth client secrets to connect to SRE.ai:

* GitLab
* Jira

#### GitLab

<details>

<summary><mark style="background-color:yellow;"><strong>Click to learn about connecting GitLab to SRE.ai</strong></mark></summary>

Connecting to GitLab requires three items:

* GitLab URL
  * Use <https://gitlab.com> for GitLab.com or your self-hosted URL
* OAuth Client ID
  * [Read GitLab's documentation](https://docs.gitlab.com/integration/oauth_provider/) to learn about the OAuth Client ID
* OAuth Client Secret
  * [Read GitLab's documentation](https://docs.gitlab.com/integration/oauth_provider/) to learn about the OAuth Client Secret

Users who don't yet have OAuth credentials can create the credentials in [GitLab's settings](https://gitlab.com/-/user_settings/applications).

{% hint style="warning" %}
**Webhook signature verification is enforced.**

SRE.ai verifies the signature of every incoming webhook from GitLab using the secret token configured for your integration.\
\
Webhook requests with a missing or invalid `X-Gitlab-Token` payload are rejected with a `401 Unauthorized` response and will not trigger any pipeline actions.

Ensure the secret token in your GitLab webhook settings matches the one stored in SRE.ai. A mismatch will cause all webhook events to be rejected.
{% endhint %}

</details>

#### Jira

<details>

<summary><mark style="background-color:yellow;"><strong>Click to learn about connecting Jira to SRE.ai</strong></mark></summary>

If your team uses Jira for issue tracking, you can connect it to SRE.ai to link deployments with tickets and automate status updates.

**Prerequisites**

* Access to the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/)
* Permission to create OAuth apps in your Atlassian workspace (admin rights may be required)

**Step 1: Create an OAuth App in Atlassian**

1. Go to the [Atlassian Developer Console](https://developer.atlassian.com/console/myapps/)
2. Log in with your Atlassian account
3. Click **Create** → **OAuth 2.0 integration**
4. Enter a name for the app (e.g., "SRE-ai")
5. Agree to the developer terms and click **Create**

**Step 2: Configure Permissions**

1. In your new app, go to **Permissions** in the left sidebar
2. Find the **Jira API** and click **Add**
3. Configure the following scopes:
   * `read:jira-work` — Allows SRE.ai to view issues and projects
   * `write:jira-work` — Allows SRE.ai to create and update issues
   * `read:jira-user` — Allows SRE.ai to read user information
   * `offline_access` — Allows SRE.ai to maintain access via refresh tokens
4. Click **Save**

**Step 3: Configure Authorization**

1. Go to **Authorization** in the left sidebar
2. Next to "OAuth 2.0 (3LO)", click **Add**
3. You'll need to enter a callback URL—get this from SRE.ai:
   * In SRE.ai, go to **Integrations**
   * Click **Add Integration** → **Jira**
   * Copy the callback URL shown in the connection dialog
4. Paste the callback URL into Atlassian and save

**Step 4: Get Your OAuth Credentials**

1. In the Atlassian Developer Console, go to **Settings** in the left sidebar
2. Copy your **Client ID**
3. Create a new **Client Secret** and copy it

**Step 5: Connect in SRE.ai**

1. In SRE.ai, go to **Integrations**
2. Click **Add Integration** → **Jira**
3. Enter your OAuth Client ID and OAuth Client Secret
4. Click **Connect Jira**
5. You'll be redirected to Atlassian to authorize the connection
6. Select the Atlassian site you want to connect to and click **Accept**
7. You'll be returned to SRE.ai with Jira connected

</details>

### Webhook URL

SRE.ai uses a Webhook URL to configure its Microsoft Teams integration.

<details>

<summary><mark style="background-color:yellow;"><strong>Click to learn about connecting Microsoft Teams to SRE.ai</strong></mark></summary>

Connecting to Microsoft Teams requires two items:

* Channel Name
* Webhook URL
  * Found in Teams channel → More options (⋯) → Connectors → Incoming Webhook

</details>

### API Key

SRE.ai uses an API Key to configure its Supabase integration.

<details>

<summary><mark style="background-color:yellow;"><strong>Click to learn about connecting Supabase to SRE.ai</strong></mark></summary>

Connecting to Supabase requires three items:

* Integration Name
* Project URL
  * Found in Dashboard → Settings → API
* API Key
  * [Read Supabase's documentation](https://supabase.com/docs/guides/api/api-keys) to learn about API keys
* Default Schema (Optional)

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sre.ai/setting-up-sre.ai/integrations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
