# Read Google Sheet

<!-- meta: type=google-sheets-read; location=Cloud › Google; category=Step (action); platforms=Joomla and WordPress (where applicable) -->

## Overview

Read Google Sheet is a **Step (action)** in **Cloud › Google**. Reads cell values from a Google Sheet via the Sheets API.

When the flow reaches this step, JOrchestrator executes **Read Google Sheet** against your linked site or an external integration, using the field values you set on **General** and **Design**. Downstream steps can read the output payload fields defined for this node.

## Why use this node

Read Google Sheet is a **action step** in the **Cloud › Google** group. Action steps run in the middle or end of a flow. They perform work on your CMS, call external services, or transform data for the next step.

Typical reasons teams add **Read Google Sheet** to a flow:

- Automate "Read Google Sheet" as part of a larger Joomla or WordPress workflow
- Replace manual google work with a repeatable, logged flow step
- Chain with triggers, logic, and messaging nodes on the same canvas

## Example workflows

Common patterns on the canvas:

1. **Trigger or Webhook** → upstream steps → **Read Google Sheet** → **Send Email** or CMS update
2. **Scheduled trigger** → **Read Google Sheet** → **Debug** (while testing) → production action

## How to set it up

Spreadsheet id and range; share the sheet with the service account email from Node Configuration.

## Good to know

valuesJson uses column names from row 1 of the sheet (auto-fetched when the range starts at row 2+), from row 1 inside the range, or from the optional Column headers field — not the first data value.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **General** | Canvas label and read-only node ID |
| **AI** | Optional assistant to help draft settings from plain language |
| **Design** | Node-specific configuration fields |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_payloadFields` | Available Fields | `payload-panel` | No | — | — |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `spreadsheetId` | Spreadsheet ID | `payload-text` | **Yes** | — | Spreadsheet id from the Google Sheets URL |
| `range` | Range (A1 notation) | `payload-text` (default: `Sheet1!A1:Z1000`) | No | — | Sheet1!A1:Z1000 Include row 1 when it holds column titles, or start at row 2 (e.g. Sheet1!A2:C100) — row 1 is fetched automatically for valuesJson / records. |
| `columnHeaders` | Column headers (optional) | `payload-text` | No | — | First Name, Last Name, Phone  — or  ["First Name","Last Name","Phone"] Override header names when the sheet has no header row, or when row 1 cannot be read. Every data row in the range is mapped to these keys. |
| `firstRowIsHeader` | First row is column headers | `toggle` (default: `true`) | No | — | When on and Column headers is empty: row 1 of the range (or row 1 of the sheet when the range starts at A2+) supplies JSON keys. Turn off, or leave row 1 blank, to infer column_a, column_b, … for every data row. |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{read_google_sheet.success}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `success` | boolean | Whether the operation completed successfully. |
| `spreadsheetId` | string | Google Sheets spreadsheet ID. |
| `range` | string | A1 notation range read or written. |
| `columnHeaders` | array | Column names used when building records / valuesJson (from row 1 or the Column headers setting). |
| `values` | array | Raw 2D array returned for the configured range. |
| `records` | array | Array of row objects — each data row mapped to column names (from row 1, Column headers setting, or column_a, column_b, … when none exist). |
| `valuesJson` | string | JSON string of records — e.g. [{"First Name":"Mark",…}] — use via {{node_id.valuesJson}} downstream. |
| `rowCount` | number | Number of rows in values (includes a header row when it is part of the range). |
| `message` | string | Human-readable status, error, or result summary. |

## Validation rules

- **Spreadsheet ID** (`spreadsheetId`) must be filled before the flow can be saved.

## Related nodes

Other steps in the same area of the palette:

- **List GCS files** (`google-list-gcs`) — Cloud › Google
- **Retrieve from GCS** (`google-retrieve-gcs`) — Cloud › Google
- **Transcoder** (`google-transcoder`) — Cloud › Google
- **Upload to GCS** (`google-upload-gcs`) — Cloud › Google
- **Write Google Sheet** (`google-sheets-write`) — Cloud › Google
