IoneShop Developers

n8n Integration

n8n is a first-class automation target for IoneShop.

Options

MethodWhen
Webhooks (HTTP Request node / Webhook node)Immediate events — preferred
HTTP Request with API keyPull/reconcile, CRUD
IoneShop node (community / official — roadmap)First-class ops in palette

IoneShop node — planned operations

OperationMaps to
Create ProductPOST /v1/products
Update ProductPATCH /v1/products/{id}
Get OrdersGET /v1/orders
Get OrderGET /v1/orders/{id}
Create CustomerPOST /v1/customers
Sync InventoryPUT /v1/inventory/levels
Manage WebhooksPOST/GET/DELETE /v1/webhooks
Trigger WorkflowPartner-side; emit custom event

Until the node is published, use HTTP Request + credentials. Starter workflow: examples/n8n-ioneshop-products-sync.json.

Credential (n8n)

  • Name: IoneShop API
  • Header Auth: Authorization = Bearer isk_…
  • Base URL: sandbox or production /v1

Reference workflow: New order → ERP → Invoice → Shipping

┌─────────────────┐
│ IoneShop        │  order.paid webhook
│ Webhook Trigger │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Verify HMAC     │  Function / Code node (mandatory)
└────────┬────────┘
         ▼
┌─────────────────┐
│ Upsert ERP      │  HTTP → ERP (Idempotency-Key = order.id)
│ Sales Order     │
└────────┬────────┘
         ▼
┌─────────────────┐
│ Create Invoice  │  ERP / accounting API
└────────┬────────┘
         ▼
┌─────────────────┐
│ Create Shipment │  Carrier / WMS
└────────┬────────┘
         ▼
┌─────────────────┐
│ Fulfill in      │  POST /v1/orders/{id}/fulfillments
│ IoneShop        │
└─────────────────┘

Webhook trigger setup

  1. n8n Webhook node → Production URL
  2. Register that URL in IoneShop (events: order.paid)
  3. Code node verifies signature before any ERP call
  4. Respond 200 quickly; move ERP work to async branch if needed

Sample HMAC function node

const crypto = require("crypto");
const secret = $credentials.ioneshopWebhookSecret;
const sig = $item(0).$node["Webhook"].json.headers["x-ioneshop-signature"];
const raw = $item(0).$node["Webhook"].json.rawBody; // ensure raw body preserved
const expected = crypto.createHmac("sha256", secret).update(raw).digest("hex");
if (expected !== sig) throw new Error("Invalid IoneShop signature");
return items;

(Adjust to your n8n version’s raw-body handling.)

Error handling in n8n

  • On 429, use Wait + retry
  • On 409, fetch current order and continue
  • Dead-letter failed executions to a queue / Slack with request_id