# Upload to GCS

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

## Overview

Uploads a file to a Google Cloud Storage bucket — useful for backups, CDN origins, or feeding other Google services.

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

Upload to GCS 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 **Upload to GCS** to a flow:

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

## How to set it up

On the Design tab, enter the bucket name, the path inside the bucket, and the file content (text or base64). Connect your Google service account under Joomla → Node Configuration → Google.

## Good to know

The Google account must be allowed to create files in that bucket.

## 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 |
|--------------|-------|------|----------|--------------|-------|
| `bucket` | GCS bucket | `payload-text` | **Yes** | — | my-bucket |
| `objectKey` | Object key | `payload-text` | **Yes** | — | path/to/file.json |
| `body` | Body | `textarea` | **Yes** | — | File content or {{node_id.field}} |
| `contentEncoding` | Body encoding | `select` (`text` \| `base64`; default: `text`) | No | — | — |
| `contentType` | Content-Type | `payload-text` (default: `application/octet-stream`) | No | — | application/octet-stream |

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

| Field key | Type | Description |
|-----------|------|-------------|
| `success` | boolean | Whether the operation completed successfully. |
| `bucket` | string | Cloud storage bucket name. |
| `objectKey` | string | Object key/path within the bucket. |
| `url` | string | Public HTTP URL to a resource on the site. |
| `generation` | string | GCS object generation number. |
| `bytesWritten` | number | Number of bytes written to storage. |
| `message` | string | Human-readable status, error, or result summary. |

## Validation rules

- **GCS bucket** (`bucket`) must be filled before the flow can be saved.
- **Object key** (`objectKey`) must be filled before the flow can be saved.
- **Body** (`body`) 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
- **Write Google Sheet** (`google-sheets-write`) — Cloud › Google
