JIRA Cloud

Setup connector

Jira is a project management tool that helps teams plan, track, and manage work. It can be used for a variety of purposes, including:

  • Software development: Planning and launching campaigns, tracking bugs, and supporting releases
  • Marketing: Managing and tracking requests
  • IT: Building workflows
  • Design: Creating custom processes
  • Operations: Planning and organizing tasks

Overview

Leena AI integrates with Jira using Jira Rest API v3.

The Jira Cloud connector supports two types of authentication:

  1. Basic Authentication
  2. Connect App (supports User Impersonation)

Prerequisites

Before setting up the Jira Cloud connector, ensure you have:

  1. Administrator access to your Jira Cloud instance
  2. Ability to create API tokens in Atlassian
  3. Access to your Leena AI workspace with connector management permissions

Setting up the Jira Cloud Connector

Option 1: Basic Authentication

Basic Authentication is the simpler method using API tokens.

Step 1: Generate API Token in Atlassian

  1. Go to https://id.atlassian.com/manage-profile/security/api-tokens and login using the service account credentials
  2. Click on Create API Token
  3. Provide a Label for the token
  4. Copy the token generated

Step 2: Configure Basic Authentication in Leena AI

  1. Give an ID and Name to your connection. ID is used to identify the connector in workflow
  2. Select Auth Type as Basic Auth
  3. Enter the following details:
ParameterDescriptionExample
Site URLThis is the initial part of your Jira URLhttps://leena-ai.atlassian.net
User EmailThis is the service account Email that would be used for the integration[email protected]
API TokenThis is the user specific token used for the integrationGenerated token from Atlassian
  1. Click Save to store the connector configuration

Option 2: Connect App (supports User Impersonation)

Connect App authentication provides user impersonation capabilities, which is required for certain actions like adding comments with 'Created by' information.

Note: This is the most commonly used authentication type for most of the actions. Actions such as 'Adding Comment' requires 'Created by' (createdBy) information, which can only be fetched if this authentication type is used.

Step 1: Create Basic Authentication Connection

  1. First, create a basic authentication connection following the steps in Option 1
  2. This connection is required to fetch the list of users required in various actions

Step 2: Configure Connect App in Leena AI

  1. Select the authentication type as Connect App Auth in Leena AI
  2. Enter the Site URL (e.g., https://leena-ai.atlassian.net)
  3. Enter the Connection ID of the Basic Authentication connection created in Step 1
  4. Copy the Descriptor URL shown
  5. Click Submit

Step 3: Install App in Jira

  1. Go to https://leena-ai.atlassian.net/plugins/servlet/upm
  2. Click on Upload App
  3. Enter the Descriptor URL from Step 2
  4. Click Upload

Step 4: Complete Setup

  1. After the app is installed successfully, come back to Leena AI connector
  2. The OAuth Client ID and Shared Secret should have values fetched automatically from Jira App
  3. The connector is now ready for use

Authentication Comparison

FeatureBasic AuthConnect App
Setup ComplexitySimpleAdvanced
User ImpersonationNot supportedSupported
Use CaseBasic operationsAdvanced operations with user context
Required ForStandard actionsActions requiring 'Created by' information
Recommended ForSimple workflowsFull-featured integrations

Supported Actions

Leena AI Jira Cloud connector supports the following actions:

Action NameDescription
Add AttachmentAdds a new attachment to Jira Issue
Add commentAdds a new comment to Jira Issue
Assign IssueAssign an issue to a user
Create issueCreates a new issue in a project
Create ProjectCreates a new project
Create UsersCreate/onboard a new user in Jira
Delete ProjectDelete a project
Delete UsersDeletes a user in Jira
Edit issueEdit properties of an Issue like status, etc.
Get AttachmentFetches all attachments of an issue
Get commentsFetches all comments of an issue
Get edit issue metadataFetches edit history of an issue
Get issueFetches details of an issue
Get Project By ProjectIdFetches details of a project
Get Projects PaginatedFetches all list of projects in a paginated manner
Get User By AccountIdFetches details of user based on account id
Get UsersFetches all the users from Jira in a paginated manner
Search for issues using JQLFetches all issues based on a JQL query

Use Cases

Some of the use cases that you can achieve using Jira connector are below:

  1. Create, Update and Get status of issue raised via Leena AI Assistant - This connector allows you to setup workflows which enables user to create, add comments or get status of their tickets via natural language using Leena AI assistant.

  2. Provision or De-provision users at the time of onboarding / off-boarding - Provision of accounts for new users at the time of onboarding can be automated. Similarly deletion/deactivation of account at the time of off-boarding can also be automated.

  3. Automate creation of new projects on client onboarding - Integrate with your CRM to automatically create a new project as soon as a new client onboards.

Security Best Practices

  1. API Token Security: Store API tokens securely and rotate them regularly
  2. Service Account: Use dedicated service accounts for integration rather than personal accounts
  3. Principle of Least Privilege: Only grant necessary permissions to the service account
  4. Access Monitoring: Monitor API usage through Jira admin panels
  5. Regular Audits: Review connector permissions and access logs periodically

The connector is now ready to be used by your Leena AI Agents for automated project management and issue tracking workflows.


Create Issue

Helps create a ticket for a user on Jira.

Input Fields

FieldDescriptionType
Update HistoryWhether the project in which the issue is created is added to the user's Recently viewed project list, as shown under Projects in Jira. When provided, the issue type and request type are added to the user's history for a project. These values are then used to provide defaults on the issue create screen.Boolean
FieldsList of issue screen fields to update, specifying the sub-field to update and its value for each fieldObject
History MetadataHistory details of the issueObject
PropertiesDetails of issue properties to be add or updateObject
Additional PropertiesExtra properties of any typeObject

Example Usage

Basic Issue Creation

{
  "fields": {
    "project": {
      "key": "PROJ"
    },
    "summary": "Bug in login functionality",
    "description": "Users are unable to login with valid credentials",
    "issuetype": {
      "name": "Bug"
    }
  }
}

Issue with Additional Fields

{
  "updateHistory": true,
  "fields": {
    "project": {
      "key": "PROJ"
    },
    "summary": "Implement new feature",
    "description": "Add support for multi-factor authentication",
    "issuetype": {
      "name": "Story"
    },
    "priority": {
      "name": "High"
    },
    "assignee": {
      "accountId": "5b10a2844c20165700ede21g"
    }
  }
}

Issue with Custom Properties

{
  "fields": {
    "project": {
      "key": "PROJ"
    },
    "summary": "Database performance issue",
    "description": "Query execution time is significantly slow",
    "issuetype": {
      "name": "Bug"
    }
  },
  "properties": [
    {
      "key": "severity",
      "value": "critical"
    }
  ]
}

Response

Upon successful creation, the action returns:

  • Issue ID
  • Issue Key
  • Issue URL
  • Creation timestamp

Common Use Cases

  1. Bug Reporting: Automatically create bug tickets from user reports
  2. Feature Requests: Generate feature request tickets from feedback
  3. Service Requests: Create IT service tickets from employee requests
  4. Incident Management: Automatically log incidents as Jira issues
  5. Task Creation: Generate tasks from workflow triggers
  6. Customer Support: Create support tickets from customer inquiries

Edit Issue

Action to allow user to update or edit issue.

Input Fields

FieldDescriptionType
Issue id or keyIssue id that needs to be updatedString
Notify userWhether to notify user or notBoolean
Override Screen SecurityWhether screen security is overridden to enable hidden fields to be editedBoolean
Override Editable FlagWhether screen security is overridden to enable uneditable fields to be editedBoolean
Return IssueWhether the response should contain the issue with fields edited in this requestBoolean
ExpandThe expand parameters to use in conjunction to return issue flagString
FieldsList of issue screen fields to update, specifying the sub-field to update and its value for each fieldObject
History MetadataHistory details of the issueObject
PropertiesDetails of issue properties to be updatedObject
Additional PropertiesExtra properties of any typeObject
TransitionDetails of a transition. Required when performing a transition, optional when editing an issueObject

Example Usage

Update Issue Summary and Description

{
  "issueIdOrKey": "PROJ-123",
  "notifyUsers": true,
  "fields": {
    "summary": "Updated: Bug in login functionality",
    "description": "Users are unable to login with valid credentials. Issue occurs on mobile devices."
  }
}

Update Issue Status (Transition)

{
  "issueIdOrKey": "PROJ-123",
  "notifyUsers": true,
  "transition": {
    "id": "31"
  }
}

Update Multiple Fields

{
  "issueIdOrKey": "PROJ-123",
  "notifyUsers": true,
  "returnIssue": true,
  "fields": {
    "priority": {
      "name": "Critical"
    },
    "assignee": {
      "accountId": "5b10a2844c20165700ede21g"
    },
    "labels": ["urgent", "customer-impact"]
  }
}

Update with Override Flags

{
  "issueIdOrKey": "PROJ-123",
  "notifyUsers": false,
  "overrideScreenSecurity": true,
  "overrideEditableFlag": true,
  "fields": {
    "customfield_10001": "Updated custom field value"
  }
}

Response

Upon successful update, the action returns:

  • Updated issue ID
  • Updated fields
  • New status (if transition was performed)
  • Update timestamp

Common Use Cases

  1. Status Updates: Change issue status through workflow transitions
  2. Assignment Changes: Reassign issues to different team members
  3. Priority Updates: Adjust issue priority based on business needs
  4. Field Updates: Update custom fields and standard fields
  5. Bulk Updates: Update multiple fields in a single operation
  6. Automated Workflows: Trigger updates based on external events

Add comment

This action is used to add comment to an existing Issue.

Input Fields

Field NameDescriptionType
Issue Id or KeyIssue ID on which comment needs to be added. Ex: IT-91String
ExpandUse expand to include additional information about comments in the responseString
BodyComment text in the Atlassian formatString
PropertiesA list of comment propertiesArray
VisibilityThe group or role to which this comment is visible. Optional on create and updateObject
Additional PropertiesExtra properties of any type may be provided to this objectObject

Example Usage

Basic Comment

{
  "issueIdOrKey": "IT-91",
  "body": "This issue has been reviewed and assigned to the development team."
}

Comment with Visibility Restriction

{
  "issueIdOrKey": "IT-91",
  "body": "Internal note: This requires urgent attention from senior developers.",
  "visibility": {
    "type": "role",
    "value": "Administrators"
  }
}

Comment with Properties

{
  "issueIdOrKey": "IT-91",
  "body": "Update: Bug has been fixed and is ready for testing.",
  "properties": [
    {
      "key": "status",
      "value": "fixed"
    }
  ]
}

Comment with Expand

{
  "issueIdOrKey": "IT-91",
  "expand": "renderedBody",
  "body": "Please review the attached documentation for more details."
}

Response

Upon successful creation, the action returns:

  • Comment ID
  • Comment body
  • Author details
  • Creation timestamp
  • Visibility settings

Common Use Cases

  1. Status Updates: Provide updates on issue progress
  2. Internal Notes: Add internal comments visible only to specific roles
  3. User Communication: Communicate with issue reporters
  4. Collaboration: Enable team collaboration on issues
  5. Audit Trail: Document actions taken on issues
  6. Automated Updates: Add system-generated comments based on workflows

Get Comments

This action is used to get comments about an existing Issue.

Input Fields

Field NameDescriptionType
Issue Id or KeyIssue ID on which comment needs to be added. Ex: IT-91String
ExpandUse expand to include additional information about comments in the responseString
Start AtIndex to start atInteger
Max ResultsMaximum number of results returnedInteger
Order BySorting to be appliedString

Example Usage

Get All Comments

{
  "issueIdOrKey": "IT-91"
}

Get Comments with Pagination

{
  "issueIdOrKey": "IT-91",
  "startAt": 0,
  "maxResults": 50
}

Get Comments with Sorting

{
  "issueIdOrKey": "IT-91",
  "orderBy": "created",
  "maxResults": 100
}

Get Comments with Expanded Information

{
  "issueIdOrKey": "IT-91",
  "expand": "renderedBody,properties",
  "startAt": 0,
  "maxResults": 25
}

Response

The action returns a list of comments, each containing:

  • Comment ID
  • Comment body
  • Author information
  • Creation timestamp
  • Update timestamp
  • Visibility settings
  • Properties (if expanded)

Common Use Cases

  1. Comment History: Retrieve complete comment history of an issue
  2. Communication Review: Review all communications on a ticket
  3. Audit Trail: Track all updates and discussions
  4. Reporting: Generate reports on issue communications
  5. Search: Find specific comments or discussions
  6. Integration: Sync comments with external systems

Add Attachment

This action is used to add attachment to an Issue. This can be used in conjunction Add comment or Create Issue to allow users to add attachment as well.

Input Fields

Field NameDescriptionType
Issue ID or KeyIssue ID on which attachment needs to be added. Ex: IT-91String
File NameName of the attachment fileString
File DataPublic URL of the attachment or base 64 encoded attachment dataString

Example Usage

Add Attachment from URL

{
  "issueIdOrKey": "IT-91",
  "fileName": "screenshot.png",
  "fileData": "https://example.com/files/screenshot.png"
}

Add Attachment from Base64

{
  "issueIdOrKey": "IT-91",
  "fileName": "error-log.txt",
  "fileData": "data:text/plain;base64,VGhpcyBpcyBhIHNhbXBsZSBlcnJvciBsb2c="
}

Add Multiple Attachments

{
  "issueIdOrKey": "IT-91",
  "fileName": "documentation.pdf",
  "fileData": "https://example.com/files/documentation.pdf"
}

Response

Upon successful upload, the action returns:

  • Attachment ID
  • File name
  • File size
  • Upload timestamp
  • Download URL

Common Use Cases

  1. Bug Reports: Attach screenshots of errors or bugs
  2. Documentation: Upload relevant documentation files
  3. Logs: Attach error logs or system logs
  4. Evidence: Upload supporting evidence for issues
  5. Design Files: Attach design mockups or wireframes
  6. Test Results: Upload test results or reports

Create Project

This action can be used to create a new project in Jira automatically.

Input Fields

FieldDescriptionType
Assignee TypeWho would be the default assignee of the ticketString
Project CategoryCategory of the projectString
DescriptionProject descriptionString
Issue Security SchemeThe ID of the issue security scheme for the project, which enables you to control who can and cannot view issuesString
Field Configuration SchemeThe ID of the field configuration scheme for the projectString
Issue Type SchemeThe ID of the issue type scheme for the projectString
Issue Type Screen SchemeThe ID of the issue type screen scheme for the projectString
Project KeyProject keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric characters. The maximum length is 10 charactersString
Project NameThe name of the projectString

Example Usage

Basic Project Creation

{
  "projectKey": "NEWPROJ",
  "projectName": "New Project",
  "description": "This is a new project for Q4 initiatives",
  "assigneeType": "PROJECT_LEAD"
}

Project with Category

{
  "projectKey": "MARKETING",
  "projectName": "Marketing Campaigns",
  "description": "Project to manage all marketing campaigns",
  "assigneeType": "UNASSIGNED",
  "projectCategory": "Marketing"
}

Project with Schemes

{
  "projectKey": "SECURE",
  "projectName": "Secure Project",
  "description": "High-security project with custom configurations",
  "assigneeType": "PROJECT_LEAD",
  "issueSecurityScheme": "10001",
  "fieldConfigurationScheme": "10002",
  "issueTypeScheme": "10003",
  "issueTypeScreenScheme": "10004"
}

Response

Upon successful creation, the action returns:

  • Project ID
  • Project Key
  • Project URL
  • Creation timestamp
  • Project settings

Common Use Cases

  1. Client Onboarding: Automatically create projects for new clients
  2. Department Setup: Create projects for new departments or teams
  3. Campaign Management: Set up projects for marketing campaigns
  4. Product Development: Create projects for new product initiatives
  5. Event Management: Set up projects for events or launches
  6. Service Management: Create projects for service delivery teams

Create Users

This action enables you to create new users in Jira via any request or automatically at the time of employee onboarding.

Input Fields

FieldDescriptionType
Email AddressList of email addresses to createArray
ProductsThe list of products the user should be given access toArray

Example Usage

Create Single User

{
  "emailAddress": ["[email protected]"],
  "products": ["jira-software"]
}

Create Multiple Users

{
  "emailAddress": [
    "[email protected]",
    "[email protected]",
    "[email protected]"
  ],
  "products": ["jira-software", "jira-servicedesk"]
}

Create User with Multiple Products

{
  "emailAddress": ["[email protected]"],
  "products": ["jira-software", "jira-servicedesk", "jira-core"]
}

Response

Upon successful creation, the action returns:

  • User account ID
  • Email address
  • User status
  • Product access granted
  • Creation timestamp

Common Use Cases

  1. Employee Onboarding: Automatically create Jira accounts for new employees
  2. Bulk User Creation: Create multiple users during team expansion
  3. Contractor Access: Provision access for contractors or temporary staff
  4. Department Setup: Create users for new department members
  5. Project Team Setup: Provision users for new project teams
  6. Integration Workflows: Automatically create users from HR systems

Error Handling

Common error scenarios:

  • Duplicate Email: User with email already exists
  • Invalid Email: Email format is invalid
  • Product Access: Specified product is not available
  • License Limit: Organization has reached user license limit
  • Permission Denied: Insufficient permissions to create users