Enbbox Docs

Trigger Workflow

Connect workflows to your application and start sending notifications

Triggering via SDK

The most common way to trigger a workflow:

import { Enbbox } from "@enbbox/js";

const enbbox = new Enbbox({ apiKey: process.env.ENBBOX_API_KEY });

await enbbox.trigger("order-shipped", {
  to: { subscriberId: "user-123" },
  payload: {
    orderNumber: "ORD-456",
    trackingUrl: "https://tracking.example.com/ORD-456",
  },
});

Triggering via REST API

curl -X POST https://api.enbbox.com/v1/events/trigger \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order-shipped",
    "to": { "subscriberId": "user-123" },
    "payload": {
      "orderNumber": "ORD-456",
      "trackingUrl": "https://tracking.example.com/ORD-456"
    }
  }'

Bulk Triggering

Send the same workflow to multiple subscribers:

await enbbox.trigger("product-update", {
  to: [
    { subscriberId: "user-1" },
    { subscriberId: "user-2" },
    { subscriberId: "user-3" },
  ],
  payload: { feature: "New Dashboard" },
});

Trigger with Topic

await enbbox.trigger("weekly-update", {
  to: [{ type: "Topic", topicKey: "all-users" }],
  payload: { content: "This week in updates..." },
});

Testing Triggers

Use the Test Trigger button in the Workflow Builder to send test notifications:

  1. Open the workflow in the dashboard
  2. Click Test Trigger
  3. Enter a subscriber ID and test payload
  4. Send the test notification
  5. Verify delivery in the Activity Feed

Monitoring

After triggering, monitor delivery in the Activity Feed:

  • View execution status for each workflow step
  • Inspect rendered notification content
  • Debug failed deliveries
  • See delivery timestamps and metadata

On this page