Order an SMM service from n8n: import a workflow on a mock node

Order an SMM service from n8n

A ready workflow for n8n 1.x: HTTP Request nodes walk the REST /v0 API of a local node — catalog, quote, order, replay and poll. Everything runs on the mock catalog (synthetic: true); orders stay REQUIRES_PAYMENT.

1. Start the node

Node.js ≥ 22.18 is required. No key, account or money: the node serves a mock catalog.

bash
git clone https://github.com/opensmm-protocol/mcp-server.git
cd mcp-server
npm ci
npm run gateway

If the port is taken or startup fails, see node startup failures.

2. Import the workflow

In n8n: Workflows → Import from File → examples/n8n/workflow.json, open the workflow and press Execute Workflow. The file is pinned to n8n 1.x and the HTTP Request node typeVersion: 4.2.

To point it at another node, edit only baseUrl in the Config node.

3. What the workflow nodes do

  • Config — baseUrl, quantity: 100, link, fresh clientReference (n8n-demo-…)
  • GET catalog — GET /v0/services → the mock catalog
  • Guard: mock only — refuses to continue unless the first service is synthetic: true
  • Create quote — POST /v0/quotes → osmm_quote_...
  • Create order — POST /v0/orders → osmm_order_..., REQUIRES_PAYMENT
  • Replay order — POST /v0/orders → the same orderId
  • Verify idempotency — fails if the two order IDs differ
  • Poll order — GET /v0/orders/:id → the stored order

4. What to expect

  • Create order and Replay order return HTTP 402 while the order is unpaid; the “Never Error” option passes the order body on. That is expected, not a failure.
  • The replay returns the same order: one clientReference, one orderId. Nothing is paid and nothing is executed.
  • The Guard node stops the workflow if the catalog holds a non-mock service, so the demo cannot place an order with a real supplier.

Honest limits

  1. This page summarises docs/AGENT_QUICKSTART.md; exact versions and configs live there.
  2. The catalog is a mock (synthetic: true): there are no real services, prices or orders here, and rates in examples are test values.
  3. This is a demo workflow on a mock node; payment and a real supplier are not involved (x402 runs on a testnet, see paying over x402).

Next: run your own node

The example runs on a local node. To be counted in the census, start a node and report its address.

Run your own node

Step-by-step instructions, the verify:node check and the node report are on the “Run a node” page.