# Write Google Sheet

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

## Overview

Write Google Sheet is a **Step (action)** in **Cloud › Google**. Appends or updates rows in a Google Sheet.

When the flow reaches this step, JOrchestrator executes **Write 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

Write 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 **Write Google Sheet** to a flow:

- Automate "Write 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 → **Write Google Sheet** → **Send Email** or CMS update
2. **Scheduled trigger** → **Write Google Sheet** → **Debug** (while testing) → production action

## How to set it up

Values must be a JSON 2D array. Leave Spreadsheet ID empty to create a new workbook, or paste an existing id from the Google Sheets URL. Share existing sheets with the service account email.

## Good to know

With no Spreadsheet ID, a new workbook is created (optional title field; defaults to the node label). Use Sheet2!A1 ranges for specific tabs. Turn on Create worksheet if missing when writing to an existing workbook.

## 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 (optional) | `payload-text` | No | — | Leave empty to create a new spreadsheet |
| `spreadsheetTitle` | New spreadsheet title | `payload-text` | No | `googleSheetsWriteNoSpreadsheetId` | Defaults to the node label when empty |
| `range` | Range (A1 notation) | `payload-text` | No | — | Sheet1!A1 or Sheet2!A1:C3 (defaults to Sheet1!A1 for new workbooks) |
| `values` | Values (JSON 2D array) | `textarea` | **Yes** | — | [["col1","col2"],["a","b"]] |
| `writeMode` | Write mode | `select` (`append` \| `update`; default: `append`) | No | — | — |
| `valueInputOption` | Value input option | `select` (`USER_ENTERED` \| `RAW`; default: `USER_ENTERED`) | No | — | — |
| `createSheetIfMissing` | Create worksheet if missing | `toggle` (default: `false`) | No | — | — |

### 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
`{{write_google_sheet.success}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `success` | boolean | Whether the operation completed successfully. |
| `spreadsheetId` | string | Google Sheets spreadsheet ID. |
| `spreadsheetTitle` | string | Text value from this node's output. |
| `spreadsheetUrl` | string | Text value from this node's output. |
| `spreadsheetCreated` | boolean | Boolean flag from this node's output. |
| `range` | string | A1 notation range read or written. |
| `updatedRows` | number | Number of spreadsheet rows updated. |
| `updatedCells` | number | Number of spreadsheet cells updated. |
| `writeMode` | string | How values were written (append, overwrite, etc.). |
| `sheetCreated` | boolean | Boolean flag from this node's output. |
| `createdSheetTitle` | string | Text value from this node's output. |
| `message` | string | Human-readable status, error, or result summary. |

## Validation rules

- **Values (JSON 2D array)** (`values`) 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
- **Read Google Sheet** (`google-sheets-read`) — Cloud › Google
- **Retrieve from GCS** (`google-retrieve-gcs`) — Cloud › Google
- **Transcoder** (`google-transcoder`) — Cloud › Google
- **Upload to GCS** (`google-upload-gcs`) — Cloud › Google
