Skip to main content

Creating Workflows

This guide walks you through building your first workflow — from trigger to execution and monitoring.

Prerequisites

You’ll need a KnoxCall account and a basic understanding of APIs (HTTP requests, JSON).
Workflow executions consume a metered monthly operations quota (each run counts nodes against your tenant limit; AI nodes count ×3). When the limit is reached, an execution is recorded as failed without running. Workflow access and connection/AI limits also depend on your plan.

Step 1: Create a New Workflow

  1. Navigate to Workflows in the sidebar.
  2. Click + Create Workflow.
  3. Enter a name, optional description, and optional environment.
  4. Click Create.
You’ll see the builder with an empty canvas and a trigger node. Prefer a head start? Click Templates and pick a starter — it lands as a disabled draft. See Templates.

Step 2: Configure the Trigger

Click the trigger node to configure it.
Run the workflow on demand from the UI or API.

Webhook Trigger

Publishing the workflow gives you a signed URL of the form https://api.knoxcall.com/hooks/wf/{token} to POST to.

Route Event Trigger

Fires when requests pass through your routes. Valid event types are request.received, request.success, request.error, request.client_error, request.server_error, request.timeout, and request.completed. For schedule, inbound-webhook, and app-based triggers, see Triggers.

Step 3: Add an HTTP Request Node

  1. Click the + on the trigger node’s output.
  2. Select HTTP Request.
  3. Configure it:
This calls a free test API that returns a user record.

Step 4: Add a Code Block Node

The Code Block runs real JavaScript in a secure sandbox.
  1. Click the + on the HTTP Request node and select Code Block.
  2. Name it “Transform Data”.
  3. Enter the code:
A Code Block receives the upstream node’s output directly as the global input (for a single incoming edge). For fan-in (multiple incoming edges), input is an array of { nodeId, output } entries keyed by node id. The sandbox has no network, filesystem, or timer access.

Step 5: Add a Condition Node

  1. Click the + on the Code Block node and select Condition.
  2. Configure:
Condition nodes evaluate a structured list of conditions (each a type, a JSONPath path, and a comparison value) combined with logic (AND/OR). The node activates its True or False outgoing edge; the other branch is recorded as skipped and greyed on the canvas.

Step 6: Add Nodes to Each Branch

True path

Add a Code Block on the Condition’s True output, name it “Success Response”:

False path

Add a Code Block on the Condition’s False output, name it “Error Response”:

Step 7: Save & Publish

  1. Autosave keeps your draft current as you edit — the draft does not affect live runs.
  2. Click Publish to validate the graph, snapshot version 1, and make it live.
Your workflow should look like this:

Step 8: Test Your Workflow

Test a single node

Open a node’s Test tab in the inspector to dry-run just that node with real secrets and see its (redacted) output — without running the whole graph.

Run the whole workflow

  1. Click Run.
  2. Optionally add trigger input:
  1. Watch each node highlight as it executes: green on success, red on error, with per-node timing. Open the Run Log to inspect each step’s input/output.

Step 9: Enable the Workflow

Toggle Enabled to ON. For webhook and app triggers, publishing registers the delivery endpoints described in Triggers.

Using Variables

Reference data anywhere with {{ ... }} expressions across these namespaces:
Unknown names are left literal. For an HTTP Request node the response fields are status, statusText, headers, body, url, method, and success.

Secrets

Inject stored secrets into any templated field — headers, URLs, bodies, or an app connection — with {{secrets.NAME}}:
The value is resolved from your tenant’s secret store (scoped to the active environment) at runtime and never appears in step logs or the run overlay — it shows as [REDACTED]. For provider integrations, prefer a saved Connection over a raw HTTP Request.

More Nodes

Loop over an array

Inside the body, reference the current element with {{loop.item}} and its position with {{loop.index}}. The body is a full subgraph — branches and nested loops are allowed.

Delay

Long delays are durable — the run suspends and resumes on time, even across a worker restart.

Error Handler

Place an Error Handler downstream of a node that might fail and choose a strategy (continue, retry, or fallback); retries are durable with backoff.

AI step

Add an AI node to classify, extract, summarize, or generate with structured output. See AI in Workflows.

Versioning & Rollback

The workflow you edit is a draft; Publish snapshots a new version and makes it live. Open the Versions tab to see every version, and click Restore on any prior version — it loads into your draft so you can review before publishing.

Troubleshooting

A variable renders literally (e.g. {{foo.bar}})

The referenced node hasn’t run yet on this path, or the name/path is wrong. Check the node id and the dot-path against the node’s actual output in a sample run. Unknown names are intentionally left as-is rather than becoming undefined.

”HTTP Request failed” / ECONNREFUSED

The target is unreachable. Verify the URL, confirm auth, and ensure the API is reachable from the internet.

A branch never runs

The upstream Condition/Router isn’t activating that edge. Confirm the condition type matches the value’s type and the JSONPath path resolves as expected; skipped branches are greyed on the canvas.

Best Practices

  1. Name nodes descriptively.
  2. Use connections and {{secrets.*}} instead of hard-coding credentials.
  3. Add error handlers on external calls.
  4. Test per-node before running the whole graph.
  5. Keep workflows focused — one purpose each.

Next Steps

Workflows Overview

Concepts, node catalog, and execution model

Connections

Connect apps like Slack and Stripe

Triggers

Schedule, webhook, and app triggers

Using the API

Manage and run workflows via /v1

Statistics

  • Level: beginner
  • Time: 12 minutes

Tags

workflows, tutorial, getting-started, automation