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

# Jira Integration

> Lightweight integration for automated documentation generation with Sammy AI

The Sammy Jira integration automatically captures ticket data from your Jira issues and sends it to Sammy's AI platform for documentation generation and knowledge updates. Using webhook events, Sammy processes ticket information whenever issues are updated or transitioned in your Jira workspace.

## How It Works

The integration works by setting up webhook events in Jira that send ticket data to Sammy whenever issues are created, updated, or transitioned. Sammy authenticates with your Jira instance using an API token to retrieve additional context and process the information for knowledge base updates.

### Setup Process

<Steps>
  <Step title="Create Service User and API Token">
    Create a Jira service account and generate an API token for authentication
  </Step>

  <Step title="Get Sammy API Key">
    Generate your Sammy API key from the admin dashboard
  </Step>

  <Step title="Configure Webhook Automation">
    Set up Jira automation rules to send webhook requests to Sammy
  </Step>

  <Step title="Start Using">
    Create or update issues to trigger documentation generation
  </Step>
</Steps>

## Requirements

<Card title="What You Need" icon="clipboard-check">
  **Jira Setup**

  * Jira project with admin permissions
  * Ability to create service users and API tokens
  * Permission to configure webhooks

  **Sammy Account**

  * Active Sammy account with admin access
</Card>

## Installation Guide

### Step 1: Create Service User and API Token

<Steps>
  <Step title="Create Service User">
    Create a dedicated service user in your Jira instance for Sammy integration. Navigate to **User Management** and create a new user with appropriate project permissions.
  </Step>

  <Step title="Access Account Settings">
    Log in as the service user and click on your profile icon in the top right corner, then select **Account settings**
  </Step>

  <Step title="Navigate to Security">
    In the account settings, click on the **Security** tab to access API token management
  </Step>

  <Step title="Create API Token">
    Scroll down to the **API tokens** section and click **Create API token**. Give it a meaningful name like "Sammy Integration Token"

    <img src="https://mintcdn.com/sammy-b83aa4c3/3J-P8SLQT1J2EhaR/images/jira/create-api-token.png?fit=max&auto=format&n=3J-P8SLQT1J2EhaR&q=85&s=a21acdcabd8b4971bc9c9e1f328b592b" alt="Create API Token" width="1606" height="602" data-path="images/jira/create-api-token.png" />
  </Step>

  <Step title="Copy and Share Token">
    Copy the generated API token immediately and securely share it with your Sammy admin. The token will not be displayed again after you close this dialog.
  </Step>
</Steps>

### Step 2: Get Sammy API Key

<Steps>
  <Step title="Generate SAMMY API Key">
    Navigate to your [SAMMY admin dashboard](https://app.sammylabs.com/admin/organisation-settings) and go to the **API Keys** tab

    <img src="https://mintcdn.com/sammy-b83aa4c3/0dw6inOSCHVtZ932/images/jira/generate-api-key.png?fit=max&auto=format&n=0dw6inOSCHVtZ932&q=85&s=6ede800dd2eb13e383520a40deb3a0b2" alt="Generate API Key" width="2378" height="1638" data-path="images/jira/generate-api-key.png" />
  </Step>

  <Step title="Create New API Key">
    Click **Generate New API Key** and give it a descriptive name like "Jira Integration"
  </Step>

  <Step title="Copy API Key">
    Copy the generated API key immediately - you'll need this for the webhook configuration in the next step
  </Step>
</Steps>

### Step 3: Configure Webhook Integration

<Card title="Automation Rule Setup" icon="webhook">
  Configure Jira automation rules to send webhook requests to Sammy whenever issues are created, updated, or transitioned.
</Card>

<Steps>
  <Step title="Navigate to Space Settings">
    In your Jira project, navigate to **Project Settings** → **Automation** tab

    <img src="https://mintcdn.com/sammy-b83aa4c3/3J-P8SLQT1J2EhaR/images/jira/space-settings.png?fit=max&auto=format&n=3J-P8SLQT1J2EhaR&q=85&s=adcec69a80a74ad569244a487a7d5358" alt="Space Settings" width="2964" height="874" data-path="images/jira/space-settings.png" />
  </Step>

  <Step title="Create New Rule">
    Click **Create rule** and select **Create from scratch** to build a custom automation rule
  </Step>

  <Step title="Select Trigger">
    Choose a trigger that matches when you want to send data to Sammy:

    * **Work item created** - for new issues
    * **Work item transitioned** - for status changes
    * **Work item updated** - for any modifications
          <img src="https://mintcdn.com/sammy-b83aa4c3/3J-P8SLQT1J2EhaR/images/jira/select-trigger.png?fit=max&auto=format&n=3J-P8SLQT1J2EhaR&q=85&s=885bb66fc0d8b24e92e7ea75705c73ce" alt="Select Trigger" width="2460" height="924" data-path="images/jira/select-trigger.png" />
  </Step>

  <Step title="Add Web Request Action">
    Click **Add component** and select **Send web request** action

    <img src="https://mintcdn.com/sammy-b83aa4c3/3J-P8SLQT1J2EhaR/images/jira/add-web-request.png?fit=max&auto=format&n=3J-P8SLQT1J2EhaR&q=85&s=62f04590a69caa91ad8351bbebd8ad32" alt="Add Web Request" width="2436" height="1594" data-path="images/jira/add-web-request.png" />
  </Step>

  <Step title="Configure Web Request">
    Fill in the web request details:

    * **Web request URL**: `https://api.sammylabs.com/api/v1/ingest/ticket/jira`
    * **HTTP method**: `POST`
    * **Web request body**: Select `Issue data (Automation format)`
    * **Headers**: Add Authorization header with value `Bearer [YOUR_SAMMY_API_KEY]` (from Step 2)
  </Step>

  <Step title="Save and Test">
    Save the automation rule and test it by creating or updating an issue. Verify that the web request sends successfully and receives a 200 response.
  </Step>
</Steps>

<Note>
  The automation rule will automatically trigger whenever issues match your selected trigger conditions, sending real-time updates to Sammy for processing.
</Note>

### Step 4: Start Using

<Steps>
  <Step title="Test the Integration">
    Create or update a test issue in your Jira project to verify the automation rule triggers correctly
  </Step>

  <Step title="Monitor Webhook Responses">
    Check that the web request returns a 200 response in the automation rule execution history
  </Step>

  <Step title="Begin Documentation Generation">
    Start creating and updating issues normally - Sammy will automatically process them and update your knowledge base
  </Step>
</Steps>

## Summary

You've successfully set up the Sammy Jira integration! Here's what you've accomplished:

✅ **Created service user and API token** for Jira authentication\
✅ **Configured automation rules** to send webhook requests to Sammy\
✅ **Connected to Sammy API** with proper authorization headers

Now when issues are created, updated, or transitioned, Sammy will automatically:

* Receive ticket data via webhook requests (summary, description, comments, custom fields)
* Process the information using AI for knowledge updates
* Update your organization's knowledge base in real-time

The integration runs seamlessly using Jira's built-in automation system, providing immediate updates whenever your specified trigger conditions are met.

## Getting Support

If you encounter issues:

1. Verify your service user has appropriate project permissions
2. Confirm your API tokens are valid and haven't expired
3. Check webhook configuration and endpoint connectivity
4. Review Sammy admin dashboard for integration status

For additional support, contact the Sammy team with your Jira instance URL, service user details, and any error messages.
