S2G Integration
OpenClaw is the orchestrator. S2G is the toolbox. Connect to an S2G workflow via WebSocket, auto-discover all nodes, and execute them as tools.
OpenClaw ──WS──▶ S2G (wss://s2g.run/api/openclaw/ws/{nodeId})
├── PasswordGenerator
├── HashGenerator
├── DateMath
├── SqlServer
├── Knowledge Base
└── ... 200+ node types
The OpenClaw Node in S2G
The OpenClaw node is a built-in S2G node type (category: AI) that acts as a bidirectional bridge between OpenClaw agents and S2G workflows. It appears in the S2G node catalog as "OpenClaw Agent" and serves two roles:
Bridge Endpoint — Provides a WebSocket endpoint (wss://s2g.run/api/openclaw/ws/{nodeId}) that OpenClaw agents connect to. Once connected, the agent can execute any sibling node in the workflow.
Data Forwarder — Pushes upstream workflow data to connected OpenClaw agents via Input Forwarding. When the workflow triggers (e.g., from an HTTP webhook, scheduler, or another node), mapped fields are sent to all connected agents as {"type":"data","data":{...}}.
Setting Up the OpenClaw Node
- Open the S2G designer at s2g.run
- Create or open a workflow
- Add an OpenClaw node from the AI category in the node palette
- Add tool nodes — any nodes you want the agent to access (e.g., PasswordGenerator, HashGenerator, DateMath, SqlServer, Knowledge Base)
- Connect the OpenClaw node to the tool nodes (the connection wiring tells S2G which nodes to expose)
- Configure the OpenClaw node (click to open properties):
- Auth Secret (optional) — If set, the bridge must send
{"type":"auth","secret":"..."} as its first message
- Per-Request Timeout — Maximum time per individual node execution request
- Input Forwarding — Map upstream node outputs to push data to connected agents
- Manual Payload — Send ad-hoc JSON payloads to connected agents for testing
- Start the workflow (▶ button or API:
POST https://s2g.run/api/v1/workflows/{id}/start)
- Copy the Node ID (UUID) from the node properties — this is needed for the bridge connection URL
Live View
The OpenClaw node properties panel includes a Live View that shows:
- Connected clients count
- Real-time execute/result message flow
- Data push events
- Connection/disconnection events
Prerequisites
- S2G account at s2g.run (or self-hosted instance)
- A workflow with an OpenClaw node and tool nodes connected to it
- Workflow running — the WebSocket endpoint only accepts connections while the workflow is active
- Node.js with
ws module: npm install ws
Quick Start
1. Install the bridge
# Copy bridge script to workspace
cp scripts/s2g-bridge.js ~/.openclaw/workspace/s2g-bridge.js
npm install ws
2. Get the OpenClaw node ID
In the S2G designer at s2g.run, click the OpenClaw node → copy the Node ID (UUID) from properties.
3. Start the bridge
# Connect to public S2G
node s2g-bridge.js --s2g wss://s2g.run --node-id YOUR_NODE_UUID [--port 18792] [--secret SECRET]
# Or with environment variables:
S2G_WS_HOST=wss://s2g.run S2G_NODE_ID=abc-123 node s2g-bridge.js
# Self-hosted S2G instance (development)
node s2g-bridge.js --s2g ws://YOUR_HOST:5184 --node-id YOUR_NODE_UUID
4. Verify
curl http://localhost:18792/health
# {"healthy":true,"uptime":42.5}
curl http://localhost:18792/nodes
# Lists all discovered nodes with names, types, and IDs
Bridge HTTP API
The bridge exposes a local HTTP API on port 18792 (configurable via --port):
| Method |
Endpoint |
Description |
GET |
/health |
200 if connected to S2G, 503 if not |
GET |
/status |
Full status: connection state, host, node list, stats, errors |
GET |
/nodes |
List all available S2G nodes (name, type, ID) |
POST |
/execute |
Execute by nodeId: { nodeId, params } |
POST |
/execute/:name |
Execute by name (fuzzy match): { params } |
POST |
/refresh |
Request fresh node list from S2G |
POST |
/reconnect |
Force disconnect and reconnect to S2G |
Executing Nodes
By name (recommended)
curl -X POST http://localhost:18792/execute/PasswordGenerator \
-H "Content-Type: application/json" \
-d '{"params": {"length": "20", "mode": "strong"}}'
By node ID
curl -X POST http://localhost:18792/execute \
-H "Content-Type: application/json" \
-d '{"nodeId": "uuid-here", "params": {"length": "20"}}'
Response
{
"success": true,
"output": {
"Password": "xK9!mN...",
"Strength": "Very Strong",
"_TriggeredTags": "[\"success\"]"
}
}
Node Schema Discovery
Before using an unfamiliar node, check its exact parameter names via the S2G Catalog API:
# Get schema for any node type
curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/nodes/Custom_Base64/schema"
# List all available node categories
curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/categories"
# List all nodes in a category
curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/categories/AI/nodes"
The fieldName in inputFields is the exact key to use in params. Case-sensitive.
Common Node Types
Data Generation
- PasswordGenerator —
length, mode (strong/pronounceable/passphrase/PIN), count
- UuidGenerator —
count, format
- HashGenerator —
text, algorithm (md5/sha1/sha256)
- LoremIpsum —
count, unit (paragraphs/sentences/words)
Data Operations
- DateMath —
operation (add/subtract/difference), date1, date2, days, hours...
- ExpressionEvaluator —
expression, variables, precision
- CronParser —
expression, count, fromDate
- TimezoneConverter —
datetime, fromTimezone, toTimezone
- JsonPathQuery —
json, path, returnFirst
Text & Encoding
- Base64 —
inputText, mode (encode/decode)
- UrlEncode —
inputText, mode (encode/decode)
- CaseConverter —
text, targetCase (camelCase/PascalCase/snake_case/kebab-case)
- MarkdownToHtml —
markdown, addWrapper
- TextDiff —
oldText, newText
Format Conversion
- XmlToJson —
xmlInput
- JsonToXml —
jsonInput, rootElement
- CsvJson —
inputText, mode (toJson/toCsv), delimiter
- JwtDecoder —
token
AI Nodes
- OpenAI — GPT models for text generation
- Anthropic — Claude models
- Gemini — Google AI models
- DeepSeek / DeepSeek Agent — DeepSeek models with agent capabilities
- Orchestrator — Multi-agent orchestration across AI providers
Knowledge Base
- Knowledge — Graph-based knowledge store with 11 operations: Search, GetEntity, AddEntity, UpdateEntity, DeleteEntity, AddRelation, RemoveRelation, GetRelations, GetGraph, ListEntities, ListTypes
Vector Storage
- VectorDb — Vector store for RAG: ingest documents, semantic search
- VectorClient — Query vector stores from workflows
Database
- SqlServer — Execute SQL queries against SQL Server
- Postgresql — Execute PostgreSQL queries
- MongoDB — MongoDB document operations
Data Push (S2G → OpenClaw)
S2G can push data to connected OpenClaw agents in two ways:
Input Forwarding — Configure in the OpenClaw node properties. Map upstream node output fields to keys that get forwarded to all connected agents. When the workflow triggers (e.g., webhook receives data → processes it → OpenClaw node forwards results), agents receive {"type":"data","data":{...}}.
Manual Payload — In the OpenClaw node properties, use the Manual Payload editor to send ad-hoc JSON to all connected agents. Useful for testing and debugging.
Deployment & Operations
For running as a service (systemd/pm2), connection lifecycle, auto-reconnect behavior, monitoring, handling S2G/OpenClaw restarts, security, and multi-bridge setups: see references/operations.md.
Key points:
- Bridge auto-reconnects on disconnect (5s delay)
- Bridge is stateless — just needs the WebSocket URL and node ID
- Sends keepalive pings every 30s to detect dead connections
- 409 = workflow not running — enable Auto-Start (🚀) in S2G or start via API:
POST https://s2g.run/api/v1/workflows/{id}/start
- Logs to
logs/s2g-bridge.log with 5MB rotation
S2G REST API
Full platform API at https://s2g.run/api/v1/ covering workflows, catalog, knowledge base, AI assistant, connections, usage, and logs: see references/api.md.
Key capabilities:
- Workflows — Create, start/stop, add/remove nodes and connections:
https://s2g.run/api/v1/workflows
- Catalog — Discover all 200+ node types and their schemas:
https://s2g.run/api/v1/catalog/nodes
- Knowledge Base — Graph-based knowledge store with search, entities, and relations
- AI Assistant — Generate workflows from natural language:
POST https://s2g.run/api/v1/ai/generate
- Connections — Manage OAuth/API key connections:
https://s2g.run/api/v1/connections
- Usage & Logs — Monitor quotas and execution logs:
https://s2g.run/api/v1/usage
WebSocket Protocol
For raw protocol details (message types, auth handshake, data push framing): see references/protocol.md.
Connection URL: wss://s2g.run/api/openclaw/ws/{nodeId}
Health check: GET https://s2g.run/api/openclaw/health
Tips
- No manual wiring needed. All sibling nodes connected to the OpenClaw node are auto-discovered on connect.
- Param names are case-sensitive. Always verify with the catalog schema API.
_TriggeredTags in output indicates which connection tag fired (success/error).
- 409 on connect means workflow isn't running. Start it at s2g.run or via API.
- Bridge auto-reconnects on disconnect with 5s delay — no manual intervention needed.
1---2name: s2g3description: Connect to S2G (s2g.run) visual workflow automation platform over WebSocket. Execute workflow nodes as tools — password generators, hash functions, date math, format converters, database queries, knowledge base, and any custom node. Use when asked to run S2G workflows, execute S2G nodes, connect to S2G, manage S2G workflows, or interact with the S2G platform API.4---56# S2G Integration78OpenClaw is the **orchestrator**. S2G is the **toolbox**. Connect to an S2G workflow via WebSocket, auto-discover all nodes, and execute them as tools.910```11OpenClaw ──WS──▶ S2G (wss://s2g.run/api/openclaw/ws/{nodeId})12 ├── PasswordGenerator13 ├── HashGenerator14 ├── DateMath15 ├── SqlServer16 ├── Knowledge Base17 └── ... 200+ node types18```1920## The OpenClaw Node in S2G2122The **OpenClaw node** is a built-in S2G node type (category: AI) that acts as a **bidirectional bridge** between OpenClaw agents and S2G workflows. It appears in the S2G node catalog as "OpenClaw Agent" and serves two roles:23241. **Bridge Endpoint** — Provides a WebSocket endpoint (`wss://s2g.run/api/openclaw/ws/{nodeId}`) that OpenClaw agents connect to. Once connected, the agent can execute any sibling node in the workflow.25262. **Data Forwarder** — Pushes upstream workflow data to connected OpenClaw agents via Input Forwarding. When the workflow triggers (e.g., from an HTTP webhook, scheduler, or another node), mapped fields are sent to all connected agents as `{"type":"data","data":{...}}`.2728### Setting Up the OpenClaw Node29301. **Open the S2G designer** at [s2g.run](https://s2g.run)312. **Create or open a workflow**323. **Add an OpenClaw node** from the AI category in the node palette334. **Add tool nodes** — any nodes you want the agent to access (e.g., PasswordGenerator, HashGenerator, DateMath, SqlServer, Knowledge Base)345. **Connect** the OpenClaw node to the tool nodes (the connection wiring tells S2G which nodes to expose)356. **Configure the OpenClaw node** (click to open properties):36 - **Auth Secret** (optional) — If set, the bridge must send `{"type":"auth","secret":"..."}` as its first message37 - **Per-Request Timeout** — Maximum time per individual node execution request38 - **Input Forwarding** — Map upstream node outputs to push data to connected agents39 - **Manual Payload** — Send ad-hoc JSON payloads to connected agents for testing407. **Start the workflow** (▶ button or API: `POST https://s2g.run/api/v1/workflows/{id}/start`)418. **Copy the Node ID** (UUID) from the node properties — this is needed for the bridge connection URL4243### Live View4445The OpenClaw node properties panel includes a **Live View** that shows:46- Connected clients count47- Real-time execute/result message flow48- Data push events49- Connection/disconnection events5051## Prerequisites52531. **S2G account** at [s2g.run](https://s2g.run) (or self-hosted instance)542. **A workflow** with an OpenClaw node and tool nodes connected to it553. **Workflow running** — the WebSocket endpoint only accepts connections while the workflow is active564. **Node.js** with `ws` module: `npm install ws`5758## Quick Start5960### 1. Install the bridge6162```bash63# Copy bridge script to workspace64cp scripts/s2g-bridge.js ~/.openclaw/workspace/s2g-bridge.js65npm install ws66```6768### 2. Get the OpenClaw node ID6970In the S2G designer at [s2g.run](https://s2g.run), click the OpenClaw node → copy the Node ID (UUID) from properties.7172### 3. Start the bridge7374```bash75# Connect to public S2G76node s2g-bridge.js --s2g wss://s2g.run --node-id YOUR_NODE_UUID [--port 18792] [--secret SECRET]7778# Or with environment variables:79S2G_WS_HOST=wss://s2g.run S2G_NODE_ID=abc-123 node s2g-bridge.js8081# Self-hosted S2G instance (development)82node s2g-bridge.js --s2g ws://YOUR_HOST:5184 --node-id YOUR_NODE_UUID83```8485### 4. Verify8687```bash88curl http://localhost:18792/health89# {"healthy":true,"uptime":42.5}9091curl http://localhost:18792/nodes92# Lists all discovered nodes with names, types, and IDs93```9495## Bridge HTTP API9697The bridge exposes a local HTTP API on port 18792 (configurable via `--port`):9899| Method | Endpoint | Description |100|--------|----------|-------------|101| `GET` | `/health` | 200 if connected to S2G, 503 if not |102| `GET` | `/status` | Full status: connection state, host, node list, stats, errors |103| `GET` | `/nodes` | List all available S2G nodes (name, type, ID) |104| `POST` | `/execute` | Execute by nodeId: `{ nodeId, params }` |105| `POST` | `/execute/:name` | Execute by name (fuzzy match): `{ params }` |106| `POST` | `/refresh` | Request fresh node list from S2G |107| `POST` | `/reconnect` | Force disconnect and reconnect to S2G |108109## Executing Nodes110111### By name (recommended)112113```bash114curl -X POST http://localhost:18792/execute/PasswordGenerator \115 -H "Content-Type: application/json" \116 -d '{"params": {"length": "20", "mode": "strong"}}'117```118119### By node ID120121```bash122curl -X POST http://localhost:18792/execute \123 -H "Content-Type: application/json" \124 -d '{"nodeId": "uuid-here", "params": {"length": "20"}}'125```126127### Response128129```json130{131 "success": true,132 "output": {133 "Password": "xK9!mN...",134 "Strength": "Very Strong",135 "_TriggeredTags": "[\"success\"]"136 }137}138```139140## Node Schema Discovery141142Before using an unfamiliar node, check its exact parameter names via the S2G Catalog API:143144```bash145# Get schema for any node type146curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/nodes/Custom_Base64/schema"147148# List all available node categories149curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/categories"150151# List all nodes in a category152curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/categories/AI/nodes"153```154155The `fieldName` in `inputFields` is the exact key to use in `params`. Case-sensitive.156157## Common Node Types158159### Data Generation160- **PasswordGenerator** — `length`, `mode` (strong/pronounceable/passphrase/PIN), `count`161- **UuidGenerator** — `count`, `format`162- **HashGenerator** — `text`, `algorithm` (md5/sha1/sha256)163- **LoremIpsum** — `count`, `unit` (paragraphs/sentences/words)164165### Data Operations166- **DateMath** — `operation` (add/subtract/difference), `date1`, `date2`, `days`, `hours`...167- **ExpressionEvaluator** — `expression`, `variables`, `precision`168- **CronParser** — `expression`, `count`, `fromDate`169- **TimezoneConverter** — `datetime`, `fromTimezone`, `toTimezone`170- **JsonPathQuery** — `json`, `path`, `returnFirst`171172### Text & Encoding173- **Base64** — `inputText`, `mode` (encode/decode)174- **UrlEncode** — `inputText`, `mode` (encode/decode)175- **CaseConverter** — `text`, `targetCase` (camelCase/PascalCase/snake_case/kebab-case)176- **MarkdownToHtml** — `markdown`, `addWrapper`177- **TextDiff** — `oldText`, `newText`178179### Format Conversion180- **XmlToJson** — `xmlInput`181- **JsonToXml** — `jsonInput`, `rootElement`182- **CsvJson** — `inputText`, `mode` (toJson/toCsv), `delimiter`183- **JwtDecoder** — `token`184185### AI Nodes186- **OpenAI** — GPT models for text generation187- **Anthropic** — Claude models188- **Gemini** — Google AI models189- **DeepSeek** / **DeepSeek Agent** — DeepSeek models with agent capabilities190- **Orchestrator** — Multi-agent orchestration across AI providers191192### Knowledge Base193- **Knowledge** — Graph-based knowledge store with 11 operations: Search, GetEntity, AddEntity, UpdateEntity, DeleteEntity, AddRelation, RemoveRelation, GetRelations, GetGraph, ListEntities, ListTypes194195### Vector Storage196- **VectorDb** — Vector store for RAG: ingest documents, semantic search197- **VectorClient** — Query vector stores from workflows198199### Database200- **SqlServer** — Execute SQL queries against SQL Server201- **Postgresql** — Execute PostgreSQL queries202- **MongoDB** — MongoDB document operations203204## Data Push (S2G → OpenClaw)205206S2G can push data to connected OpenClaw agents in two ways:2072081. **Input Forwarding** — Configure in the OpenClaw node properties. Map upstream node output fields to keys that get forwarded to all connected agents. When the workflow triggers (e.g., webhook receives data → processes it → OpenClaw node forwards results), agents receive `{"type":"data","data":{...}}`.2092102. **Manual Payload** — In the OpenClaw node properties, use the Manual Payload editor to send ad-hoc JSON to all connected agents. Useful for testing and debugging.211212## Deployment & Operations213214For running as a service (systemd/pm2), connection lifecycle, auto-reconnect behavior, monitoring, handling S2G/OpenClaw restarts, security, and multi-bridge setups: see [references/operations.md](references/operations.md).215216Key points:217- Bridge **auto-reconnects** on disconnect (5s delay)218- Bridge is **stateless** — just needs the WebSocket URL and node ID219- Sends **keepalive pings** every 30s to detect dead connections220- **409 = workflow not running** — enable Auto-Start (🚀) in S2G or start via API: `POST https://s2g.run/api/v1/workflows/{id}/start`221- Logs to `logs/s2g-bridge.log` with 5MB rotation222223## S2G REST API224225Full platform API at `https://s2g.run/api/v1/` covering workflows, catalog, knowledge base, AI assistant, connections, usage, and logs: see [references/api.md](references/api.md).226227Key capabilities:228- **Workflows** — Create, start/stop, add/remove nodes and connections: `https://s2g.run/api/v1/workflows`229- **Catalog** — Discover all 200+ node types and their schemas: `https://s2g.run/api/v1/catalog/nodes`230- **Knowledge Base** — Graph-based knowledge store with search, entities, and relations231- **AI Assistant** — Generate workflows from natural language: `POST https://s2g.run/api/v1/ai/generate`232- **Connections** — Manage OAuth/API key connections: `https://s2g.run/api/v1/connections`233- **Usage & Logs** — Monitor quotas and execution logs: `https://s2g.run/api/v1/usage`234235## WebSocket Protocol236237For raw protocol details (message types, auth handshake, data push framing): see [references/protocol.md](references/protocol.md).238239**Connection URL:** `wss://s2g.run/api/openclaw/ws/{nodeId}`240**Health check:** `GET https://s2g.run/api/openclaw/health`241242## Tips243244- **No manual wiring needed.** All sibling nodes connected to the OpenClaw node are auto-discovered on connect.245- **Param names are case-sensitive.** Always verify with the catalog schema API.246- **`_TriggeredTags`** in output indicates which connection tag fired (success/error).247- **409 on connect** means workflow isn't running. Start it at [s2g.run](https://s2g.run) or via API.248- **Bridge auto-reconnects** on disconnect with 5s delay — no manual intervention needed.