-
Notifications
You must be signed in to change notification settings - Fork 76
Add Jira Issues to Google sheets prebuilt integration #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SashenkaG
wants to merge
15
commits into
wso2:main
Choose a base branch
from
SashenkaG:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5a0fa52
Add implementation for Jira to Google Sheets integration
SashenkaG df9c22a
Enhance integration with spreadsheet management and improved issue ma…
SashenkaG 2aee609
Refactor Jira project key configuration to use jiraConfig record
SashenkaG 0ff8cb2
Add documentation for Jira to Gsheets integration
SashenkaG ebe63b9
Address CodeRabbit reviews
SashenkaG fa3b6f5
Add Jira-to-gsheets to path
SashenkaG f935ea3
Fix property name in config schema
SashenkaG 3b20df4
Remove config.toml from .gitignore
SashenkaG 065a0fb
Address review suggestions
SashenkaG 1c11ac5
Address review suggestions
SashenkaG 5321b14
Merge branch 'main' into main
SashenkaG e651bf5
Fix review suggestions
SashenkaG 047f4e4
Merge branch 'main' of https://github.com/SashenkaG/integration-samples
SashenkaG 23f757a
Merge remote-tracking branch 'upstream/main'
SashenkaG 4e1c878
Change file locations
SashenkaG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
208 changes: 208 additions & 0 deletions
208
integrator-default-profile/samples/jira-issues-to-googlesheets/.choreo/config-schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| }, | ||
| "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 | ||
| } | ||
|
SashenkaG marked this conversation as resolved.
|
||
10 changes: 10 additions & 0 deletions
10
integrator-default-profile/samples/jira-issues-to-googlesheets/.choreo/diagram.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
SashenkaG marked this conversation as resolved.
|
||
61 changes: 61 additions & 0 deletions
61
...tor-default-profile/samples/jira-issues-to-googlesheets/.choreo/instructions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
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> | ||
|
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> | ||
11 changes: 11 additions & 0 deletions
11
integrator-default-profile/samples/jira-issues-to-googlesheets/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
9 changes: 9 additions & 0 deletions
9
integrator-default-profile/samples/jira-issues-to-googlesheets/Ballerina.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
76 changes: 76 additions & 0 deletions
76
integrator-default-profile/samples/jira-issues-to-googlesheets/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
|
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 | ||
|
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. | ||
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.