Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,8 @@
},
{
"path": "integrator-default-profile/samples/github-issue-to-google-chat"
},
{
"path": "integrator-default-profile/samples/jira-issues-to-googlesheets"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"wso2": {
"type": "object",
"properties": {
"jira_issues_to_googlesheets": {
"type": "object",
"properties": {
"jiraConfig": {
"type": "object",
"properties": {
"baseUrl": {
"type": "string"
},
"email": {
"type": "string"
},
"apiToken": {
"type": "string"
},
"projectKey": {
"type": "string"
}
Comment thread
SashenkaG marked this conversation as resolved.
},
"additionalProperties": false,
"required": [
"baseUrl",
"email",
"apiToken",
"projectKey"
],
"description": ""
},
"googleSheetsConfig": {
"type": "object",
"properties": {
"refreshToken": {
"type": "string"
},
"clientId": {
"type": "string"
},
"clientSecret": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"refreshToken",
"clientId",
"clientSecret"
],
"description": ""
},
"timezone": {
"type": "string",
"description": ""
},
"spreadsheetId": {
"type": "string",
"description": ""
},
"timeFrame": {
"enum": [
"LAST_QUARTER",
"LAST_MONTH",
"LAST_WEEK",
"YESTERDAY",
"ALL"
],
"description": ""
}
},
"additionalProperties": false,
"required": [
"jiraConfig",
"googleSheetsConfig"
]
}
},
"additionalProperties": false
},
"ballerina": {
"type": "object",
"properties": {
"log": {
"type": "object",
"properties": {
"destinations": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"enum": [
"stderr",
"stdout"
]
}
},
"additionalProperties": false,
"required": [
"type"
],
"name": "ballerina/log:2.14.0:StandardDestination"
},
{
"type": "object",
"properties": {
"type": {
"enum": [
"file"
]
},
"path": {
"type": "string"
},
"mode": {
"enum": [
"APPEND",
"TRUNCATE"
]
}
},
"additionalProperties": false,
"required": [
"type",
"path",
"mode"
],
"name": "ballerina/log:2.14.0:FileOutputDestination"
}
]
},
"description": ""
},
"modules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"level": {
"enum": [
"WARN",
"INFO",
"ERROR",
"DEBUG"
]
}
},
"additionalProperties": false,
"required": [
"name",
"level"
],
"name": "ballerina/log:2.14.0:Module"
},
"description": ""
},
"keyValues": {
"type": "object",
"properties": {
"msg": {},
"error": {},
"stackTrace": {},
"module": {}
},
"additionalProperties": false,
"name": "ballerina/log:2.14.0:AnydataKeyValues",
"description": ""
},
"format": {
"enum": [
"logfmt",
"json"
],
"description": ""
},
"level": {
"enum": [
"WARN",
"INFO",
"ERROR",
"DEBUG"
],
"description": ""
},
"enableSensitiveDataMasking": {
"type": "boolean",
"description": ""
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"requiredLevel": 3
}
Comment thread
SashenkaG marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
A(["Begin"]):::startNode
B["Fetch Issues from Jira"]:::processNode
C{"Are there<br/>Issues?"}:::decisionNode
D["Create Google Sheet with Timestamp"]:::processNode
E["Populate Sheet with Data"]:::processNode
F(["Complete"]):::endNode

A --> B --> C
C -- Yes --> D --> E --> F
C -- No --> F
Comment thread
SashenkaG marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## What It Does

- Queries all Issue records from Jira using JQL (Jira Query Language)
- Creates a new Google Sheets spreadsheet with a timestamped name (e.g., "Jira Issues 2025-11-17 14:30")
- Appends all issue data to the spreadsheet with columns for Issue Key, Summary, Status, Assignee, Created date, and Due Date
Comment thread
SashenkaG marked this conversation as resolved.

<details>

<summary>Jira Setup Guide</summary>

1. A Jira Cloud account with API access
2. Basic Auth credentials:
- Base URL (your Jira instance URL, e.g., `https://your-domain.atlassian.net`)
- Email (your Jira account email)
- API Token (generated from your Jira account)
- Project Key (the key of the Jira project to query; e.g., "PROJ", "SUPPORT")

This integration uses basic authentication with email and API token. [Learn how to create a Jira API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).

The project key is usually shown in the URL when you open your project in Jira (e.g., in `https://your-domain.atlassian.net/jira/software/projects/<project-key>/boards/1`, the project key is `<project-key>`). You can also find it on the project sidebar or in the project settings.

</details>
Comment thread
SashenkaG marked this conversation as resolved.

<details>

<summary>Google Sheets Setup Guide</summary>

1. A Google Cloud project with Google Sheets API enabled
2. OAuth2 credentials:
- Client ID
- Client Secret
- Refresh Token
3. Scopes Required
- `https://www.googleapis.com/auth/drive`
- `https://www.googleapis.com/auth/spreadsheets`

This integration uses refresh token flow for auth. [Learn how to Develop on Google Workspace](https://developers.google.com/workspace/guides/get-started).

</details>

<details>

<summary>Additional Configurations</summary>

1. `timezone`
- Time zone to be used for timestamping the spreadsheet name (e.g., "America/New_York")
2. `timeFrame`:
- Time frame to filter new issues. Possible values:
- `YESTERDAY`
- `LAST_WEEK`
- `LAST_MONTH`
- `LAST_QUARTER`
- `ALL`
3. `spreadsheetId`:
- ID of an existing Google Sheets spreadsheet to append data to. Below is how to find the spreadsheet ID.
- `https://docs.google.com/spreadsheets/d/<spreadsheetId>/`
- Use this `spreadsheetId` as the value.
- A new sheet will be created in the spreadsheet with a timestamped name.
- If not provided, a new spreadsheet will be created.

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ballerina generates this directory during the compilation of a package.
# It contains compiler-generated artifacts and the final executable if this is an application package.
target/

# Ballerina maintains the compiler-generated source code here.
# Remove this if you want to commit generated sources.
generated/

# Contains configuration values used during development time.
# See https://ballerina.io/learn/provide-values-to-configurable-variables/ for more details.
Config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
org = "wso2"
name = "jira_issues_to_googlesheets"
version = "0.1.0"
title = "jira-issues-to-googlesheets"
distribution = "2201.13.1"

[build-options]
sticky = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Jira to Google Sheets Integration

## Description

This integration extracts Jira issues from a specified project using JQL (Jira Query Language) and creates a spreadsheet in Google Sheets with key issue information. Each execution creates a new spreadsheet with a timestamp, providing a historical snapshot of your project's status over time.

Comment thread
SashenkaG marked this conversation as resolved.
### What It Does

- **Queries Jira issues** from a specific project (e.g., `project=PROJ`), optionally filtered by timeFrame (e.g., issues created in the last 7 days)
- **Creates or updates Google Sheets:**
- Creates a new timestamped Google Sheets spreadsheet if `spreadsheetId` is not provided
- Appends a new timestamped sheet to an existing spreadsheet if `spreadsheetId` is provided
- **Exports the following Jira fields:**
- Issue Key
- Summary
- Status
- Assignee
- Created Date
- Due Date

- **Timestamps** are generated in the configured timezone (default:UTC)

## Prerequisites

Before running this integration, you need:

### Jira Setup

1. **A Jira Cloud account**
2. **API Credentials:**
* **Email:** Your Jira account email
* **API Token:** A token generated from your [Atlassian account security settings](https://id.atlassian.com/manage-profile/security/api-tokens)
* **Base URL:** Your Jira instance URL (e.g., `https://your-domain.atlassian.net`)
* **Jira project key:** The project key is usually shown in the URL when you open your project in Jira (e.g., in `https://your-domain.atlassian.net/jira/software/projects/PROJ/boards/1`, the project key is `PROJ`). You can also find it on the project sidebar or in the project settings.

### Google Sheets Setup

1. **A Google Cloud project** with Google Sheets API enabled
2. **OAuth2 credentials:**
* Client ID
* Client Secret
* Refresh Token
3. **Scopes Required:**
* `https://www.googleapis.com/auth/spreadsheets`
* `https://www.googleapis.com/auth/drive`

> This integration uses refresh token flow for auth. [Learn how to Develop on Google Workspace](https://developers.google.com/workspace/guides/get-started).

## Configuration

The following configurations are required to connect to Jira and Google Sheets. Create a `Config.toml` file or set environment variables.

### Jira Credentials

* `email` - Your Jira account email address
* `apiToken` - Your Jira API token
* `baseUrl` - Your Jira instance URL
* `jiraProjectKey` - The key of the project you want to export

### Google Credentials

* `refreshToken` - Your Google OAuth2 refresh token
* `clientId` - Your Google OAuth2 client ID
* `clientSecret` - Your Google OAuth2 client secret
Comment thread
SashenkaG marked this conversation as resolved.

## Deploying on WSO2 Integration Platform

1. **Sign in** to your [WSO2 Integration Platform account](https://wso2.com/devant/).
2. **Create a new Integration** and follow instructions in the [Documentation](https://wso2.com/devant/docs/references/import-a-repository/) to import this repository.
3. **Select the Technology** as `WSO2 Integrator: BI`.
4. **Choose the Integration Type** as `Automation` and click **Create**.
5. Once the build is successful, click **Configure to Continue** and set up the required environment variables for Jira and Google Sheets credentials.
6. Click **Schedule** to schedule the automation.
7. In the **BY INTERVAL** tab, select **Week** from the dropdown.
8. Set the desired day and time for the integration to run weekly and click Update.
9. Once tested, you may promote the integration to production. Make sure to set the relevant environment variables in the production environment as well.
Loading