# Custom Table

<!-- meta: type=create-table; location=Database; category=Step (action); platforms=Joomla and WordPress (where applicable) -->

## Overview

Custom Table is a **Step (action)** in **Database**. Creates a custom MySQL table with the columns you define in the designer.

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

Custom Table is a **action step** in the **Database** 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 **Custom Table** to a flow:

- Custom Table on your linked Joomla site when the flow reaches this step
- Create table based on webhook, schedule, or CMS event data
- Integrate Database operations with messaging, AI, or database steps in one canvas

## When it runs

Only if the table does not already exist — safe to re-run without dropping data.

## Example workflows

Common patterns on the canvas:

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

## How to set it up

Table name uses the #__ prefix; column types and keys are set on the Design tab.

## 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 | — | — |
| `columns` | Columns | `table-columns` | 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 |
|--------------|-------|------|----------|--------------|-------|
| `tableName` | Table Name | `text` | **Yes** | — | my_custom_table (will be prefixed with #__) |

### 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
`{{custom_table.table}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `table` | string | Table name alias (same as tableName for custom tables). |
| `tableName` | string | Database table name used by the node. |
| `table` | string | Table name alias (same as tableName for custom tables). |
| `sql` | string | SQL query that was executed. |

## Validation rules

- **Table Name** (`tableName`) must be filled before the flow can be saved.

## Related nodes

Other steps in the same area of the palette:

- **Delete Row** (`delete-row`) — Database
- **Insert Row** (`insert-row`) — Database
- **Select Row** (`select-row`) — Database
- **Update Row** (`update-row`) — Database
