> For the complete documentation index, see [llms.txt](https://docs.pullbay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pullbay.com/documentation/integrations/pullbay-x-google-sheets-integration.md).

# Pullbay X Google Sheets Integration

Google Sheets is the perfect home for app store review data. It's free, shareable, and lets you analyze reviews with charts, pivot tables, and filters—no coding skills required. This guide shows you how to automatically sync Pullbay reviews to a Google Sheet using Google Apps Script.

## Why Log Reviews to Google Sheets?

* **Shareable**: Share the sheet with your team, stakeholders, or investors in seconds
* **Searchable**: Filter reviews by rating, date, country, or keywords
* **Visual**: Create charts showing review trends over time
* **Collaborative**: Add comments, assign follow-ups, and tag team members
* **No-code analysis**: Use built-in functions (AVERAGE, COUNTIF, etc.) to calculate metrics
* **Backup**: Keep a permanent record of all reviews with timestamps

## Two Approaches

1. **Google Apps Script** (recommended): Write a simple script that calls the Pullbay API and logs reviews directly
2. **Via automation platforms**: Use Zapier or Make.com as middleware if you prefer not to write code

This guide focuses on the Google Apps Script approach, which is free and requires minimal setup.

## Approach 1: Google Apps Script (Direct API Call)

### Prerequisites

* A Google account and access to Google Sheets
* Your Pullbay API key (from the [dashboard](https://dashboard.pullbay.com/))
* Your app's ID on the App Store

{% stepper %}
{% step %}

### Create a Google Sheet

1. Go to [sheets.google.com](https://sheets.google.com/)
2. Click **Create** and select **Blank spreadsheet**
3. Name it (e.g., "App Store Reviews - 2026")
4. Click **OK**
   {% endstep %}

{% step %}

### Set Up Sheet Columns

In the first row, create these column headers:

* **A**: Date
* **B**: App ID
* **C**: Rating
* **D**: Title
* **E**: Review
* **F**: Author
* **G**: Country
* **H**: Version

Starting in row 2, your script will automatically fill in review data.
{% endstep %}

{% step %}

### Open the Apps Script Editor

1. In your Google Sheet, click **Extensions** (top menu)
2. Click **Apps Script**
3. A new tab opens with the Apps Script editor
4. You'll see a function called `myFunction()` by default—delete it
   {% endstep %}

{% step %}

### Write the Review-Fetching Script

Copy and paste this complete script into the editor:

```javascript
function fetchAndLogReviews() {
  // Configuration
  const apiKey = "YOUR_API_KEY"; // Replace with your Pullbay API key
  const appId = "YOUR_APP_ID";   // Replace with your App Store app ID
  const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
  const sheet = spreadsheet.getActiveSheet();

  // API request
  const url = `https://api.pullbay.com/v1/app-store/reviews/all?app_id=${appId}`;
  const options = {
    method: 'get',
    headers: {
      'Authorization': `Bearer ${apiKey}`
    },
    muteHttpExceptions: true
  };

  try {
    const response = UrlFetchApp.fetch(url, options);
    const responseCode = response.getResponseCode();

    if (responseCode !== 200) {
      Logger.log(`Error: API returned ${responseCode}`);
      Logger.log(response.getContentText());
      return;
    }

    const data = JSON.parse(response.getContentText());

    if (!data.success || !data.data) {
      Logger.log("Error: Invalid response from Pullbay");
      Logger.log(data);
      return;
    }

    const reviews = data.data;
    Logger.log(`Fetched ${reviews.length} reviews`);

    // Clear existing data (optional—comment out if you want to append instead)
    const lastRow = sheet.getLastRow();
    if (lastRow > 1) {
      sheet.deleteRows(2, lastRow - 1);
    }

    // Add reviews to the sheet
    reviews.forEach((review, index) => {
      const row = index + 2; // Start at row 2 (row 1 is headers)
      const date = new Date(review.date).toLocaleDateString();

      sheet.getRange(row, 1).setValue(date);             // Date
      sheet.getRange(row, 2).setValue(review.app_id);    // App ID
      sheet.getRange(row, 3).setValue(review.rating);    // Rating
      sheet.getRange(row, 4).setValue(review.title);     // Title
      sheet.getRange(row, 5).setValue(review.content);   // Review content
      sheet.getRange(row, 6).setValue(review.author);    // Author
      sheet.getRange(row, 7).setValue(review.version);   // Version
    });

    Logger.log(`Successfully logged ${reviews.length} reviews`);

  } catch (error) {
    Logger.log(`Error: ${error.toString()}`);
  }
}
```

{% endstep %}

{% step %}

### Add Your API Key and App ID

In the script, replace:

* `YOUR_API_KEY` with your actual Pullbay API key
* `YOUR_APP_ID` with your actual App Store app ID
  {% endstep %}

{% step %}

### Test the Script

1. In the Apps Script editor, click the **Run** button (play icon)
2. You may see a dialog asking for permissions—click **Review permissions**
3. Select your Google account and click **Allow**
4. The script runs. Check the **Execution log** (bottom of the screen) for messages

Go back to your Google Sheet. If successful, you'll see review data populated in rows 2 onward.
{% endstep %}

{% step %}

### Set Up Automatic Daily Runs

To run the script automatically every day:

1. In the Apps Script editor, click the **Triggers** icon (clock icon) on the left sidebar
2. Click **Create a trigger**
3. In the dialog:
   * **Choose which function to run**: `fetchAndLogReviews`
   * **Choose deployment**: Head
   * **Select event source**: Time-driven
   * **Select type of time-based trigger**: Day
   * **Select time of day**: Choose a time (e.g., 9 AM)
4. Click **Save**

The script now runs automatically at your chosen time every day. You'll see a notification in the bottom right of your Google Sheet when it completes.
{% endstep %}
{% endstepper %}

### Understanding the Script

The script does four things:

1. **Fetches reviews**: Calls the Pullbay API endpoint `/v1/app-store/reviews/all` with your API key and app ID
2. **Handles errors**: Checks the HTTP response code and logs any errors
3. **Clears old data**: Removes previous rows (optional—you can modify this to append instead)
4. **Logs reviews**: Writes each review to a new row with date, rating, title, author, country, etc.

If you want to **append** new reviews instead of clearing old data each run, comment out the "Clear existing data" section:

```javascript
// const lastRow = sheet.getLastRow();
// if (lastRow > 1) {
//   sheet.deleteRows(2, lastRow - 1);
// }
```

## Approach 2: Using Zapier or Make as Middleware

If you prefer not to write scripts, you can use Zapier or Make.com to send reviews to Google Sheets:

1. Follow the Zapier or Make.com integration guides (see related docs)
2. In the final action, select "Add row to Google Sheets"
3. Map the Pullbay fields to your sheet columns
4. The reviews are automatically logged on schedule

This is ideal if you like a visual, no-code experience but still want to use Google Sheets as your review database.

## Tips for Analysis and Organization

### Color-Code Reviews by Rating

To visually highlight reviews by rating:

1. Select the **Rating** column (column C)
2. Click **Format** → **Conditional formatting**
3. Set rules:
   * **5-star**: Green background
   * **4-star**: Light green
   * **1-2 star**: Red background
4. Click **Done**

Now high-priority reviews stand out instantly.

### Create a Pivot Table for Review Trends

Pivot tables let you summarize reviews by rating, country, or date:

1. Select all your data (including headers)
2. Click **Insert** → **Pivot table**
3. Click **Create**
4. In the pivot table editor:
   * **Rows**: Add "Country"
   * **Columns**: Add "Rating"
   * **Values**: Count of reviews
5. Click **Insert**

You'll see a summary like:

| Country | 1-Star | 2-Star | 3-Star | 4-Star | 5-Star |
| ------- | ------ | ------ | ------ | ------ | ------ |
| US      | 3      | 5      | 12     | 24     | 45     |
| UK      | 1      | 2      | 8      | 18     | 32     |

### Calculate Metrics

Add simple formulas to track key metrics:

* **Average Rating**: `=AVERAGE(C2:C)` → Shows the average star rating
* **Total Reviews**: `=COUNTA(F2:F)` → Counts non-empty author cells
* **Low-Rating Count**: `=COUNTIF(C2:C,"<3")` → Counts 1–2 star reviews
* **Latest Review Date**: `=MAX(A2:A)` → Finds the most recent review

Place these formulas in a separate "Metrics" row or sheet.

### Set Up Filters

To explore reviews by rating or country:

1. Click on any cell in your data
2. Click **Data** → **Create a filter**
3. Click the filter icon in the header row
4. Select what you want to see (e.g., only 1–2 star reviews, or only reviews from "US")

Filters are powerful for focused analysis without changing the underlying data.

### Use Multiple Sheets Per App

If you manage multiple apps:

1. Create a separate sheet tab for each app
2. Modify the script to specify which app's reviews go to which sheet
3. This keeps data organized and lets you create app-specific pivot tables and charts

## Modifying the Script for Advanced Use

### Append Instead of Replace

To add new reviews without clearing old ones, modify the script:

```javascript
// Remove or comment out this section:
// const lastRow = sheet.getLastRow();
// if (lastRow > 1) {
//   sheet.deleteRows(2, lastRow - 1);
// }

// And change the forEach line:
reviews.forEach((review, index) => {
  const row = sheet.getLastRow() + 1; // Append to the end
  // ... rest of the code
});
```

This way, each run adds new reviews without deleting old ones.

### Filter by Date

To only log reviews from the last 7 days:

```javascript
const sevenDaysAgo = new Date();
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);

const recentReviews = reviews.filter(review => {
  return new Date(review.date) >= sevenDaysAgo;
});
```

Then use `recentReviews` instead of `reviews` in your forEach loop.

### Send a Notification When Complete

Add this line at the end of the script to email you a summary:

```javascript
GmailApp.sendEmail(
  Session.getEffectiveUser().getEmail(),
  "Reviews Synced",
  `${reviews.length} reviews logged at ${new Date().toLocaleString()}`
);
```

## Troubleshooting

<details>

<summary>Script runs but no data appears in the sheet</summary>

* Check the **Execution log** (View → Execution log) for error messages
* Verify your API key is correct and active
* Ensure your app ID matches the actual App Store app ID
* Check that your app has reviews

</details>

<details>

<summary>"Authorization: Bearer" error</summary>

* Your API key may have expired or been revoked
* Generate a new key in the [Pullbay dashboard](https://dashboard.pullbay.com/)
* Update the script with the new key

</details>

<details>

<summary>Script times out</summary>

* If your app has many thousands of reviews, the fetch may take a long time
* Consider breaking the script into smaller chunks or filtering by date

</details>

<details>

<summary>Need to change API key or app ID later?</summary>

* Click **Extensions** → **Apps Script** again
* Modify the values at the top of the script
* Save and re-run

</details>

## Rate Limits and Pricing

Each time the script runs, it uses one API request against your Pullbay plan:

* **Free**: 10 requests/minute
* **Starter**: 60 requests/minute
* **Growth**: 300 requests/minute
* **Scale**: 1000+ requests/minute

Daily runs consume about 30 requests per month, which fits comfortably in any plan. See the [Pullbay dashboard](https://dashboard.pullbay.com/) for current pricing.

## Next Steps

1. Create your Google Sheet and add column headers
2. Copy the Apps Script code and replace your API key and app ID
3. Test the script with the **Run** button
4. Set up a time-based trigger for automatic daily runs
5. Customize with color-coding, pivot tables, and formulas
6. Share the sheet with your team for collaborative review management

For more information, see the [Pullbay API documentation](https://docs.pullbay.com/) or Google's [Apps Script guide](https://developers.google.com/apps-script).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pullbay.com/documentation/integrations/pullbay-x-google-sheets-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
