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

# Google Sheets

> Connect a Google account and choose the spreadsheets Mercora may use. Today Mercora uses them as hedge sheets: it adds a row for each approved hedge and completes it with the broker's fill.

Many desks keep a shared spreadsheet of their hedges. Connect Google Sheets and Mercora keeps that sheet up to date as part of the [Hedging](https://docs.mercora.io/workflows/hedging.md) workflow, instead of someone retyping each hedge and fill.

> [!NOTE]
>
> Before you start: you need to be a workspace admin, and the hedge sheet is used by the [Hedging](https://docs.mercora.io/workflows/hedging.md) workflow, which needs the **Hedging** module.

## Connect Google Sheets

**1. Open the Google Sheets page**

Go to **Settings → Integrations** and click **Google Sheets**.

**2. Connect a Google account**

Click **Connect** and sign in with a Google account that can open the spreadsheets you want to use. The page then shows the account and **Connected**.

**3. Choose a spreadsheet**

Click **Select Google Sheet** and pick the spreadsheet in Google's picker. Mercora checks that the account can open it before saving it. Repeat for each spreadsheet.

The chosen spreadsheets appear under **Registered spreadsheets**, each with a link to open it in Google Sheets and a button to remove it. The switch at the top of the page turns Google Sheets on or off for the workspace.

Mercora works with the access of the Google account you connected, so that account must keep access to the registered spreadsheets.

## What Mercora reads and writes

Mercora uses a registered spreadsheet only as the **hedge sheet** of a hedge rule. An admin picks the spreadsheet and the tab on each rule, under **Commodity Hedge Rules** in **Settings → Integrations → WhatsApp**. See [Hedging](https://docs.mercora.io/workflows/hedging.md#add-hedge-rules).

| When | Mercora |
| - | - |
| You pick a hedge sheet on a rule | Reads the spreadsheet's tab names, so you can choose one. |
| A hedge is approved, with **Row appended to** ticked | Adds a row for the hedge on that tab, with lots and price left blank. |
| The broker's fill is recorded | Writes the lots and price into that row. Before writing, it reads the row to check it is still the hedge's row and that lots and price are still blank. It never overwrites someone's own entry: if the row changed, the fill waits on the hedge for you. |

A row is added only when an operator approves the hedge in the Inbox. Its fill is written when someone records it, or on its own when the hedge rule has **Attach broker fills automatically** on. Mercora doesn't change other rows or other spreadsheets.

## Disconnect

Click **Disconnect** on the Google Sheets page and confirm. Hedges stop updating the sheet until you connect again: a hedge approved in the meantime with **Row appended to** ticked shows **Sheet row append failed** on its card.

## Next steps

> **[Add hedge rules](https://docs.mercora.io/workflows/hedging.md#add-hedge-rules)**
>
> Pick the spreadsheet and tab each hedge rule logs to.

> **[Route WhatsApp groups](https://docs.mercora.io/integrations/whatsapp.md#route-groups-to-workflows)**
>
> Connect the trader and broker groups hedges come from.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.