Usage
Arguments
| Argument | Description |
|---|---|
<workflowId> | The workflowTemplateId from config.ts |
Options
| Option | Description | Default |
|---|---|---|
--process-instance-id <id> | Explicit process instance ID | Auto-resolved from project.json |
--path <path> | Path to use case folder with project.json | Current directory |
--payload-file <path> | Read payload from a JSON file, or - for stdin | — |
--poll | Wait for execution to complete | Fire-and-forget |
--timeout <seconds> | Max poll time | 120 |
-o, --output <path> | Save result to file (with --poll) | stdout |
--api-url <url> | Override API URL | — |
--api-key <key> | Override API key | — |
--json | JSON output | — |
Process instance ID resolution
--process-instance-idflag (highest priority)devProcessInstanceIdinproject.jsonat--pathdevProcessInstanceIdinproject.jsonin current directory
Behavior
Fire-and-forget (default)
Returns immediately with the execution ID:Poll for results (--poll)
Waits for the execution to complete, polling every 3-5 seconds:
Payload via stdin (recommended)
Use--payload-file - with a heredoc to pass JSON without shell escaping issues:
Payload from file
Save result to file
Examples
Result interpretation
| Status | Meaning | Data field |
|---|---|---|
success | Workflow completed successfully | resultData contains output |
failed | Workflow encountered an error | errorDetails.message describes failure |
pending | Still running (only seen during polling) | — |
Error reference
| HTTP | Error | Cause | Fix |
|---|---|---|---|
| 401 | Invalid API key | Wrong or expired key | codika-helper whoami, then codika-helper login |
| 403 | Missing scope | Key lacks workflows:trigger | Create new key with scope |
| 403 | No access | Process in different org | codika-helper use <profile> |
| 404 | Workflow not found | Wrong workflowId | Check config.ts workflowTemplateId |
| 412 | Instance inactive | Process paused or failed | Re-deploy or check platform |
Important notes
- Only HTTP-triggered workflows can be triggered via this command
- The
workflowIdis theworkflowTemplateIdfrom config.ts, not the n8n workflow ID - The request wraps your payload in
{"payload": {...}} - Execution is asynchronous — the trigger returns immediately unless
--pollis used