Time in Status

Export Jira Data to Google Sheets Using Apps Script

Best for: PMs, Scrum Masters, Team Leads, Analysts, and other non-technical users.

What You'll Need

  • A Jira account

  • Access to the Jira project

  • A Jira API token

  • A Google account

Step 1. Create a Jira API Token

  1. Log in to your Atlassian account.

  2. Open Account Settings → Security → API Tokens.

  3. Click Create API Token.

  4. Enter a name (e.g., "Google Sheets Export").

  5. Copy and save the generated token.

You'll need:

  • Atlassian email

  • API token

image-20260603-064750.png

Step 2. Find Your Jira URL

Example:

https://your-company.atlassian.net

Step 3. Create a Google Spreadsheet

  1. Open Google Sheets.

  2. Create a new spreadsheet.

  3. Name it:

Jira Export

Step 4. Open Apps Script

  1. In the spreadsheet, click:

Extensions → Apps Script
  1. Remove any existing code.

image-20260603-064954.png

Step 5. Paste the Script

function exportJiraIssues() {

  const jiraDomain = "https://your-company.atlassian.net";
  const email = "your-email@company.com";
  const apiToken = "YOUR_API_TOKEN";

  const jql = "project = TEST ORDER BY created DESC";

  const url =
    jiraDomain +
    "/rest/api/3/search?jql=" +
    encodeURIComponent(jql) +
    "&maxResults=100";

  const credentials =
    Utilities.base64Encode(email + ":" + apiToken);

  const options = {
    method: "get",
    headers: {
      Authorization: "Basic " + credentials,
      Accept: "application/json"
    }
  };

  const response = UrlFetchApp.fetch(url, options);
  const data = JSON.parse(response.getContentText());

  const sheet = SpreadsheetApp.getActiveSpreadsheet()
    .getActiveSheet();

  sheet.clear();

  sheet.appendRow([
    "Issue Key",
    "Summary",
    "Status",
    "Assignee",
    "Priority",
    "Created",
    "Updated"
  ]);

  data.issues.forEach(issue => {
    sheet.appendRow([
      issue.key,
      issue.fields.summary,
      issue.fields.status?.name || "",
      issue.fields.assignee?.displayName || "",
      issue.fields.priority?.name || "",
      issue.fields.created,
      issue.fields.updated
    ]);
  });
}

Step 6. Update the Configuration

Replace:

const jiraDomain = "https://your-company.atlassian.net";

with your Jira URL.

Replace:

const email = "your-email@company.com";

with your Atlassian email.

Replace:

const apiToken = "YOUR_API_TOKEN";

with your API token.

Replace:

project = TEST

with your project key.

Example:

project = MARKETING

Step 7. Run the Script

  1. Click Save.

  2. Click Run.

  3. Authorize Google permissions when prompted.

The spreadsheet will be populated with Jira issues.

Step 8. Schedule Automatic Updates (Optional)

  1. Open Apps Script.

  2. Click Triggers (clock icon).

  3. Click Add Trigger.

  4. Select:

    • Function: exportJiraIssues

    • Event Source: Time-driven

    • Frequency: Daily or Hourly

The spreadsheet will refresh automatically.

Once the export is complete, you'll get a list of Jira issues with all the fields you specified. Custom fields from the Time in Status app are also supported, and their values will be exported within seconds.

image-20260603-064658.png

If you need help or want to ask questions, please contact SaaSJet Support or email us at support@saasjet.atlassian.net

Haven't used this add-on yet? Try it now!