Quickstart: start a workflow
Before you start
Section titled “Before you start”- A published workflow whose trigger is API / webhook. See Starting runs.
- A secret key (
vcx_sk_…). See API keys. Keep it on your server.
1. Build a small workflow
Section titled “1. Build a small workflow”In the console, open Workflows → New workflow and add:
- API / webhook trigger with one input field,
appointmentId(text, required). - Wait for one minute, so you can watch the run while it waits.
- End with the outcome
confirmed.
Publish it. The workflow’s Deploy drawer shows its id (flw_…) and a ready-made request body.
2. Start a run
Section titled “2. Start a run”curl -X POST "https://api.nuacem.dev/workflow-api/public/v1/workflows/flw_xxxxxxxx/runs" \ -H "X-VoiceCX-Key: $NUACEMONE_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{"input": {"appointmentId": "A-1042"}, "correlation": {"patientRef": "P-77"}}'The answer carries the run’s id. The same call with the Node SDK:
const NuacemOne = require('./nuacemone.js');const client = NuacemOne.client({ key: process.env.NUACEMONE_SECRET_KEY, gateway: 'https://api.nuacem.dev/voice-gw', workflows: 'https://api.nuacem.dev/workflow-api',});const run = await client.workflows.start('flw_xxxxxxxx', { input: { appointmentId: 'A-1042' } });3. Check its status
Section titled “3. Check its status”curl "https://api.nuacem.dev/workflow-api/public/v1/runs/RUN_ID" \ -H "X-VoiceCX-Key: $NUACEMONE_SECRET_KEY"4. Get told when it finishes
Section titled “4. Get told when it finishes”Rather than polling, add an endpoint in Settings → Developers → Workflow webhooks. NuacemOne posts run.completed,
run.failed and other events to it, signed so you can check they came from us. See
Workflow events.