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: s2g
3description: 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.
4metadata:
5 source: https://skillmd.com/skills/modbender/s2g
6---
7
8# S2G Integration
9
10OpenClaw is the **orchestrator**. S2G is the **toolbox**. Connect to an S2G workflow via WebSocket, auto-discover all nodes, and execute them as tools.
11
12```
13OpenClaw ──WS──▶ S2G (wss://s2g.run/api/openclaw/ws/{nodeId})
14 ├── PasswordGenerator
15 ├── HashGenerator
16 ├── DateMath
17 ├── SqlServer
18 ├── Knowledge Base
19 └── ... 200+ node types
20```
21
22## The OpenClaw Node in S2G
23
24The **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:
25
261. **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.
27
282. **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":{...}}`.
29
30### Setting Up the OpenClaw Node
31
321. **Open the S2G designer** at [s2g.run](https://s2g.run)
332. **Create or open a workflow**
343. **Add an OpenClaw node** from the AI category in the node palette
354. **Add tool nodes** — any nodes you want the agent to access (e.g., PasswordGenerator, HashGenerator, DateMath, SqlServer, Knowledge Base)
365. **Connect** the OpenClaw node to the tool nodes (the connection wiring tells S2G which nodes to expose)
376. **Configure the OpenClaw node** (click to open properties):
38 - **Auth Secret** (optional) — If set, the bridge must send `{"type":"auth","secret":"..."}` as its first message
39 - **Per-Request Timeout** — Maximum time per individual node execution request
40 - **Input Forwarding** — Map upstream node outputs to push data to connected agents
41 - **Manual Payload** — Send ad-hoc JSON payloads to connected agents for testing
427. **Start the workflow** (▶ button or API: `POST https://s2g.run/api/v1/workflows/{id}/start`)
438. **Copy the Node ID** (UUID) from the node properties — this is needed for the bridge connection URL
44
45### Live View
46
47The OpenClaw node properties panel includes a **Live View** that shows:
48- Connected clients count
49- Real-time execute/result message flow
50- Data push events
51- Connection/disconnection events
52
53## Prerequisites
54
551. **S2G account** at [s2g.run](https://s2g.run) (or self-hosted instance)
562. **A workflow** with an OpenClaw node and tool nodes connected to it
573. **Workflow running** — the WebSocket endpoint only accepts connections while the workflow is active
584. **Node.js** with `ws` module: `npm install ws`
59
60## Quick Start
61
62### 1. Install the bridge
63
64```bash
65# Copy bridge script to workspace
66cp scripts/s2g-bridge.js ~/.openclaw/workspace/s2g-bridge.js
67npm install ws
68```
69
70### 2. Get the OpenClaw node ID
71
72In the S2G designer at [s2g.run](https://s2g.run), click the OpenClaw node → copy the Node ID (UUID) from properties.
73
74### 3. Start the bridge
75
76```bash
77# Connect to public S2G
78node s2g-bridge.js --s2g wss://s2g.run --node-id YOUR_NODE_UUID [--port 18792] [--secret SECRET]
79
80# Or with environment variables:
81S2G_WS_HOST=wss://s2g.run S2G_NODE_ID=abc-123 node s2g-bridge.js
82
83# Self-hosted S2G instance (development)
84node s2g-bridge.js --s2g ws://YOUR_HOST:5184 --node-id YOUR_NODE_UUID
85```
86
87### 4. Verify
88
89```bash
90curl http://localhost:18792/health
91# {"healthy":true,"uptime":42.5}
92
93curl http://localhost:18792/nodes
94# Lists all discovered nodes with names, types, and IDs
95```
96
97## Bridge HTTP API
98
99The bridge exposes a local HTTP API on port 18792 (configurable via `--port`):
100
101| Method | Endpoint | Description |
102|--------|----------|-------------|
103| `GET` | `/health` | 200 if connected to S2G, 503 if not |
104| `GET` | `/status` | Full status: connection state, host, node list, stats, errors |
105| `GET` | `/nodes` | List all available S2G nodes (name, type, ID) |
106| `POST` | `/execute` | Execute by nodeId: `{ nodeId, params }` |
107| `POST` | `/execute/:name` | Execute by name (fuzzy match): `{ params }` |
108| `POST` | `/refresh` | Request fresh node list from S2G |
109| `POST` | `/reconnect` | Force disconnect and reconnect to S2G |
110
111## Executing Nodes
112
113### By name (recommended)
114
115```bash
116curl -X POST http://localhost:18792/execute/PasswordGenerator \
117 -H "Content-Type: application/json" \
118 -d '{"params": {"length": "20", "mode": "strong"}}'
119```
120
121### By node ID
122
123```bash
124curl -X POST http://localhost:18792/execute \
125 -H "Content-Type: application/json" \
126 -d '{"nodeId": "uuid-here", "params": {"length": "20"}}'
127```
128
129### Response
130
131```json
132{
133 "success": true,
134 "output": {
135 "Password": "xK9!mN...",
136 "Strength": "Very Strong",
137 "_TriggeredTags": "[\"success\"]"
138 }
139}
140```
141
142## Node Schema Discovery
143
144Before using an unfamiliar node, check its exact parameter names via the S2G Catalog API:
145
146```bash
147# Get schema for any node type
148curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/nodes/Custom_Base64/schema"
149
150# List all available node categories
151curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/categories"
152
153# List all nodes in a category
154curl -H "X-API-Key: $KEY" "https://s2g.run/api/v1/catalog/categories/AI/nodes"
155```
156
157The `fieldName` in `inputFields` is the exact key to use in `params`. Case-sensitive.
158
159## Common Node Types
160
161### Data Generation
162- **PasswordGenerator** — `length`, `mode` (strong/pronounceable/passphrase/PIN), `count`
163- **UuidGenerator** — `count`, `format`
164- **HashGenerator** — `text`, `algorithm` (md5/sha1/sha256)
165- **LoremIpsum** — `count`, `unit` (paragraphs/sentences/words)
166
167### Data Operations
168- **DateMath** — `operation` (add/subtract/difference), `date1`, `date2`, `days`, `hours`...
169- **ExpressionEvaluator** — `expression`, `variables`, `precision`
170- **CronParser** — `expression`, `count`, `fromDate`
171- **TimezoneConverter** — `datetime`, `fromTimezone`, `toTimezone`
172- **JsonPathQuery** — `json`, `path`, `returnFirst`
173
174### Text & Encoding
175- **Base64** — `inputText`, `mode` (encode/decode)
176- **UrlEncode** — `inputText`, `mode` (encode/decode)
177- **CaseConverter** — `text`, `targetCase` (camelCase/PascalCase/snake_case/kebab-case)
178- **MarkdownToHtml** — `markdown`, `addWrapper`
179- **TextDiff** — `oldText`, `newText`
180
181### Format Conversion
182- **XmlToJson** — `xmlInput`
183- **JsonToXml** — `jsonInput`, `rootElement`
184- **CsvJson** — `inputText`, `mode` (toJson/toCsv), `delimiter`
185- **JwtDecoder** — `token`
186
187### AI Nodes
188- **OpenAI** — GPT models for text generation
189- **Anthropic** — Claude models
190- **Gemini** — Google AI models
191- **DeepSeek** / **DeepSeek Agent** — DeepSeek models with agent capabilities
192- **Orchestrator** — Multi-agent orchestration across AI providers
193
194### Knowledge Base
195- **Knowledge** — Graph-based knowledge store with 11 operations: Search, GetEntity, AddEntity, UpdateEntity, DeleteEntity, AddRelation, RemoveRelation, GetRelations, GetGraph, ListEntities, ListTypes
196
197### Vector Storage
198- **VectorDb** — Vector store for RAG: ingest documents, semantic search
199- **VectorClient** — Query vector stores from workflows
200
201### Database
202- **SqlServer** — Execute SQL queries against SQL Server
203- **Postgresql** — Execute PostgreSQL queries
204- **MongoDB** — MongoDB document operations
205
206## Data Push (S2G → OpenClaw)
207
208S2G can push data to connected OpenClaw agents in two ways:
209
2101. **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":{...}}`.
211
2122. **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.
213
214## Deployment & Operations
215
216For 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).
217
218Key points:
219- Bridge **auto-reconnects** on disconnect (5s delay)
220- Bridge is **stateless** — just needs the WebSocket URL and node ID
221- Sends **keepalive pings** every 30s to detect dead connections
222- **409 = workflow not running** — enable Auto-Start (🚀) in S2G or start via API: `POST https://s2g.run/api/v1/workflows/{id}/start`
223- Logs to `logs/s2g-bridge.log` with 5MB rotation
224
225## S2G REST API
226
227Full 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).
228
229Key capabilities:
230- **Workflows** — Create, start/stop, add/remove nodes and connections: `https://s2g.run/api/v1/workflows`
231- **Catalog** — Discover all 200+ node types and their schemas: `https://s2g.run/api/v1/catalog/nodes`
232- **Knowledge Base** — Graph-based knowledge store with search, entities, and relations
233- **AI Assistant** — Generate workflows from natural language: `POST https://s2g.run/api/v1/ai/generate`
234- **Connections** — Manage OAuth/API key connections: `https://s2g.run/api/v1/connections`
235- **Usage & Logs** — Monitor quotas and execution logs: `https://s2g.run/api/v1/usage`
236
237## WebSocket Protocol
238
239For raw protocol details (message types, auth handshake, data push framing): see [references/protocol.md](references/protocol.md).
240
241**Connection URL:** `wss://s2g.run/api/openclaw/ws/{nodeId}`
242**Health check:** `GET https://s2g.run/api/openclaw/health`
243
244## Tips
245
246- **No manual wiring needed.** All sibling nodes connected to the OpenClaw node are auto-discovered on connect.
247- **Param names are case-sensitive.** Always verify with the catalog schema API.
248- **`_TriggeredTags`** in output indicates which connection tag fired (success/error).
249- **409 on connect** means workflow isn't running. Start it at [s2g.run](https://s2g.run) or via API.
250- **Bridge auto-reconnects** on disconnect with 5s delay — no manual intervention needed.