# Send orders to Google Sheets

> Connect your Google account and add every successful payment as a new row in a Google Sheet, with an automation.
>
> Source: https://docs.bcl.my/google-sheets/

When Google Sheets is connected, BCL can add a row to your spreadsheet for every successful payment. Your orders are then in a sheet that you can sort, share and total. You set this up with an automation, not in the form's settings.

You need a Google account and a spreadsheet with your column headings in row 1. Example headings are **Date**, **Order Number**, **Name**, **Email**, **Phone**, **Amount**, **Payment Method** and **Form**.

## Connect your Google account

You connect Google once for your whole team.

1. Go to **Platform Setup** → **Integrations**. On the **Google Sheets** card, click **Connect**.

   *(Screenshot: The Google Sheets card on the Integrations page with its button highlighted)*

2. In the panel that opens, click **Connect Google account** and sign in to Google.
3. Google asks what BCL can access. Tick **See, edit, create, and delete only the specific Google Drive files you use with this app**, then click **Continue**. BCL can then open only the spreadsheets that you choose, not the rest of your Drive.

   *(Screenshot: Google's consent screen with the Drive files permission highlighted)*

4. Back in BCL, the card shows **Connected** and its button changes to **Manage**. Click **Manage** to see the **Connected account** and **Connected since** date. Later, **Test connection** checks the connection again. **Disconnect** removes the connection.

   *(Screenshot: The Google Sheets panel showing that Google Sheets is connected, with the connected account)*

## Add each payment to your sheet

Start from the **Google Sheets Transaction Log** template:

1. Go to **Automations** and click **Templates**. Click the **Google Sheets Transaction Log** template (**Use template**).

   *(Screenshot: The Google Sheets Transaction Log template highlighted)*

2. BCL creates the automation with a **Payment Success** trigger and an **Append to Sheet** node, and opens it. Click the pencil icon next to its name to give it your own name.
3. To use the automation for some forms only, open the **Payment Success** trigger. Choose a **Payment Source Type** and the forms under **Specific Form**. Then click **Save Trigger**.
4. Double-click the **Append to Sheet** node to open its settings.
5. Under **Spreadsheet**, click the folder button and choose your spreadsheet in the Google window. Then choose the **Sheet** (the tab in your spreadsheet). If your columns do not show, click the refresh button next to **Sheet**.

   *(Screenshot: The Google Sheets Action Settings with the Spreadsheet and Sheet fields highlighted)*

6. Under **Column Values**, BCL lists each heading from row 1. Type what goes in each column, such as `{payment_date}`, `{order_number}`, `{name}`, `{email}`, `{phone}`, `{amount}`, `{payment_method}` and `{form_title}`. Click **Variables** to choose them from a list.

   *(Screenshot: The Column Values section with a variable for each column)*

7. Click **Test append row** to add a row with sample data, and check the layout. Then click **Save Google Sheets**.
8. Click **Update Automation**, then turn on the **Active** switch next to it.

From now on, every successful payment on the chosen forms adds a row to the sheet:

*(Screenshot: The spreadsheet with a new row for a Kopi Kampung Coffee Beans order)*

## Update a row instead

To keep one row per order and change it when the order changes, set **Action Type** to **Update Row**. Under **Lookup Settings**, choose the **Lookup Column** that holds the order number and type `{order_number}` as the **Lookup Value**. Turn on **Create row if not found** to add orders that are not in the sheet yet. Under **Update Values**, click **Add Column** for each column to change and type its new value, such as `{payment_status}`. The **Google Sheets Update Status** template sets this up with the **Transaction Status Changed** trigger.

## Tips

A tidy sheet saves work later:

- **Do not move or insert columns later.** BCL saves each value against a column letter. If you move a column, BCL sends the data to the wrong place. After any change to row 1, click the refresh button and check **Column Values**.
- **Use one tab per purpose.** For example, use one sheet tab for coffee bean orders and another for class deposits. Each tab has its own automation and form filter.
- **Share the sheet, not your BCL login.** Staff who only need the order list can work from the sheet.
- **Check the history if new rows do not show.** Open the automation and click **Overview**. A disconnected Google account shows up there as a failed action. See [Check an automation's history](/automation-history/).

## Common issues

### How do I connect my payment form or event form to Google Sheets?

Google Sheets is not a form setting. Connect your Google account from the Google Sheets card under Platform Setup → Integrations, then create an automation with a Google Sheets action. The automation adds each payment as a new row.

### Why does BCL see only some of my Google Drive files?

BCL asks for access only to the files that you choose. Choose your spreadsheet with the folder button in the Spreadsheet field. BCL cannot see the rest of your Drive.

### My columns do not appear in the Google Sheets action. What is wrong?

BCL reads the column names from the first row of the sheet. Type your headings in row 1, then click the refresh button next to Sheet.
