🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

S2G - General Purpose Workflow Engine

by @helmutsreinis

Connect to S2G (s2g.run) visual workflow automation platform over WebSocket. Execute workflow nodes as tools — password generators, hash functions, date math...

Versionv1.0.0
💡 Examples

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

⚙️ Configuration

1. S2G account at s2g.run (or self-hosted instance) 2. A workflow with an OpenClaw node and tool nodes connected to it 3. Workflow running — the WebSocket endpoint only accepts connections while the workflow is active 4. Node.js with ws module: npm install ws

📋 Tips & Best Practices

  • 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.
  • View on ClawHub
    TERMINAL
    clawhub install s2g-workflow-engine

    🧪 Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    🔍 Can't find the right skill?

    Search 60,000+ AI agent skills — free, no login needed.

    Search Skills →