> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redbark.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Sheets

> Sync transactions to a Google Sheets spreadsheet

Google Sheets is the most popular Redbark destination. Transactions are written to a sheet (tab) within a spreadsheet you choose.

## Setup

<Steps>
  <Step title="Connect your Google account">
    Click **Add Destination**, select **Google Sheets**, and sign in with Google. Redbark uses the `drive.file` OAuth scope, which only grants access to files Redbark itself creates — it cannot see your existing spreadsheets.
  </Step>

  <Step title="Create a new spreadsheet">
    Enter a name and click the create button. Redbark creates a new spreadsheet in your Google Drive. The first sheet (tab) is selected automatically as the write target.
  </Step>

  <Step title="Acknowledge the disclosure and save">
    Tick the CDR disclosure checkbox confirming you understand data sent to Google Sheets leaves Redbark's control and is governed by Google's own terms. Then save the destination.
  </Step>
</Steps>

## Multi-account syncing

When you create a sync with multiple bank accounts, an extra step lets you choose how accounts are laid out in the spreadsheet:

* **Account per tab**: each bank account gets its own tab in the spreadsheet. Tabs are created automatically and named after the bank account. This is the default whenever two or more accounts are selected.
* **All in one tab**: all accounts sync to the same sheet tab. Transactions from every account appear together.

With a single account, transactions go to the spreadsheet's first tab.

## How it works

On each sync, Redbark Sync:

1. **Checks for headers**: if the first row is empty, column headers are created automatically
2. **Reads existing Transaction IDs**: column A is scanned to identify transactions that have already been synced
3. **Appends new rows**: new posted transactions are appended to the bottom of the sheet. Pending transactions are excluded by default to avoid duplicates when they later post with updated details. You can enable pending transactions per sync as an [experimental setting](/syncs#include-pending-transactions-experimental).
4. **Updates changed rows**: if a previously-synced transaction changes at the bank (for example it moves from pending to posted, or its description or category is enriched), the existing row is rewritten in place rather than appended again.

## Transaction columns

| Column             | Type   | Description                                                                                                                                      |
| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| A - Transaction ID | Text   | Unique identifier used for deduplication                                                                                                         |
| B - Date           | Date   | Transaction date                                                                                                                                 |
| C - Description    | Text   | Transaction description                                                                                                                          |
| D - Amount         | Number | Transaction amount                                                                                                                               |
| E - Currency       | Text   | ISO 4217 currency code                                                                                                                           |
| F - Direction      | Text   | `credit` or `debit`                                                                                                                              |
| G - Category       | Text   | Transaction category (if available)                                                                                                              |
| H - Merchant       | Text   | Merchant name (if available)                                                                                                                     |
| I - Account        | Text   | Bank account name                                                                                                                                |
| J - Status         | Text   | `posted` (or `pending` when the experimental [include-pending-transactions](/syncs#include-pending-transactions-experimental) toggle is enabled) |
| K - Class          | Text   | `payment`, `transfer`, `fee`, `interest`, or `other`                                                                                             |
| L - Post Date      | Date   | Date the transaction was posted                                                                                                                  |

If you've set up custom categories, two extra trailing columns are added:

| Column              | Type | Description                                                                           |
| ------------------- | ---- | ------------------------------------------------------------------------------------- |
| M - Subcategory     | Text | Your resolved subcategory (if available)                                              |
| N - Custom Category | Text | Your resolved custom category name (falls back to the raw Category column if not set) |

<Tip>
  You can add your own columns to the right of the last data column (L, or N on sheets with custom categories enabled). They are not affected by syncs.
</Tip>

<Note>
  Deduplication reads the first 100,000 rows of column A. Since new transactions are appended to the bottom, once a sheet grows past that many rows it's the newest rows that fall outside the dedup check, so duplicates become possible. Split the sheet or move older rows to an archive tab if you expect to exceed this.
</Note>

<Note>
  If you change an account mapping to a different destination account, Redbark resets the sync's `lastDataAt` and backfills the new resource so it doesn't sit empty.
</Note>

## Balances, holdings, and trades

You can optionally enable a **Balances** tab on a sync, which is kept up to date with one row per account: Account, Current Balance, Available Balance, Currency, and Last Updated.

Brokerage accounts also get two dedicated tabs: **Holdings** (a full snapshot of your current positions, overwritten each sync) and **Trades** (appended with the same dedup behaviour as transactions).

## Authentication

Google Sheets uses OAuth 2.0 with refresh tokens. The access token is refreshed on demand when it is within 5 minutes of expiry. If the refresh fails (e.g. you revoked Redbark's access in your Google account), the sync is classified as `destination_auth_expired` and you'll be prompted to re-authenticate from the [destinations](/destinations) page.

## Troubleshooting

**Permission denied / spreadsheet not accessible**
If Redbark's access to the spreadsheet is revoked (e.g. the spreadsheet was deleted, moved out of the connected account's Drive, or the OAuth grant was removed), the sync is classified as `destination_auth_expired` and triggers a re-auth email. Reconnect from the [destinations](/destinations) page.

**Hitting Google's read quota**
Google caps each Google account at roughly 60 Sheets API reads per minute, and that quota is shared across every destination connected with that account. If you've connected many spreadsheets under one Google account, a large batch of syncs running close together can exhaust it and cause transient failures. Spreading your destinations across a few different Google accounts avoids this.

## Tips

* **Multiple accounts**: you can sync several bank accounts in one sync. Use "Account per tab" mode to keep them separated, or "All in one tab" to combine them.
* **Formulas are safe to the right**: syncs append new rows and update a previously-synced row in place if it changes at the bank (for example pending to posted, or a corrected description or category). Columns you add to the right of the last data column are never touched, so put your own formulas, notes, or formatting there.
* **Shared spreadsheets**: you can share the spreadsheet with others. Only the Google account used to connect needs to grant access to Redbark Sync.
