Skip to main content

Workflows

A Workflow is a visual, node-based processing pipeline. Workflows run in two ways:

  • On a proxy: the workflow runs for every request to that proxy. Instead of simple pass-through routing, it can transform requests, call multiple services, apply logic, query databases and send notifications, without changing your backend code.
  • Standalone: the workflow has its own trigger and runs on a schedule, from a Kafka topic, from an email inbox, on demand with Run now, or when another workflow or an AI guardrail calls it. See Standalone Workflows.

Every workflow, standalone or run by proxies, is listed in Automation › Workflows, has a draft and published versions, and its runs appear in Automation › Executions (Executions). A workflow can be reused: several things (proxies, other workflows, guardrails) can run the same workflow, and Used by shows which.

What can you do with workflows?​

  • Transform request/response: modify headers, body, or path before forwarding
  • Call multiple backends: fan out to multiple services and merge the results
  • Query a database: enrich a response with data from MongoDB, PostgreSQL, or other databases
  • Conditional routing: branch based on request content, user identity, or backend response
  • Mock an API: return a custom response without any backend (great for building APIs without infrastructure)
  • Send notifications: trigger emails (SMTP/SendGrid) or Kafka messages as a side effect of an API call
  • Generate or validate JWTs: add token exchange or validation as a gateway step
  • Run custom code: execute JavaScript for complex transformations

How workflows work​

A workflow is a directed acyclic graph (DAG) of connected nodes:

  1. http_trigger receives the incoming request context.
  2. Branch A calls http_request_node to fetch user data, then normalizes fields in set_node.
  3. Branch B calls another http_request_node to fetch account balance.
  4. merge_node combines both branch outputs.
  5. response_node returns the final payload to the client.

Gateway traffic uses an http_trigger (the incoming request). Standalone workflows start from a cron_trigger (schedule), kafka_consumer, imap_trigger (email) or manual_trigger (run on demand; see Manual Trigger). Request-driven flows typically end with a response_node (the response returned to the client).

Data flow between nodes​

Each node outputs data that is available to all downstream nodes via the expression syntax:

$json['node_id'].field.subfield

For example, if a node with ID get_user returns { "name": "Alice" }, you can reference it downstream as:

{{ $json['get_user'].name }}

→ See Expressions for the full expression syntax.

Enabling a workflow on a proxy​

  1. Open the proxy's collection
  2. On the proxy's row, click Workflow
  3. Choose your build mode:
    • start from a prebuilt template pattern (recommended for common flows), or
    • build a custom workflow: click Add the first step, pick Incoming request, then add steps with the + on each output (see Building Workflows)
  4. Configure steps and connections for your use case
  5. Turn on the Active switch in the editor header to activate it

When enabled, every request to that proxy executes the workflow instead of simple forwarding.

Creating a standalone workflow​

  1. Open Automation › Workflows and click New workflow (blank, from a template, or a copy of a proxy's workflow)
  2. Pick a trigger (for example Schedule) and add steps
  3. Click Save & publish
  4. Turn on Active so its trigger starts running

→ See Standalone Workflows for drafts, versions, Run now and Used by.

Prebuilt templates vs custom workflows​

Use prebuilt templates when you want speed and consistency:

  • Orchestration template (multi-backend aggregation)
  • Transform template (request/response mapping)
  • Resiliency template (retry/fallback)

Use custom workflows when your logic is domain-specific:

  • Unique branching rules per tenant/partner
  • Complex enrich/merge behavior
  • Custom response shaping and fallback strategy

Tip: start with a template, then customize nodes/conditions for your business flow.

Performance​

Workflows that run on a proxy run in the gateway path — they are not external services or queues. This means:

  • Low added latency (typically < 5ms overhead per node)
  • Full access to request/response context
  • Support for real-time and streaming responses
  • Parallel execution of independent node branches

Use cases by industry​

Use caseWorkflow pattern
Add authentication headershttp_trigger → set_node (add auth header) → proxy_node
Enrich response with DB datahttp_trigger → proxy_node → mongodb_node → merge_node → response_node
Mock an API stubhttp_trigger → response_node (static body)
Fan out to microserviceshttp_trigger → [http_request × 3 in parallel] → merge_node → response_node
Token exchangehttp_trigger → jwt_node (generate) → proxy_node (forward with new token) → response_node
Webhook with notificationhttp_trigger → proxy_node → sendgrid_node → response_node
Reusable stepshttp_trigger → execute_workflow_node (shared customer lookup) → response_node
Support agent with live datahttp_trigger → agent_node (tools: order and ticket APIs, chat memory) → response_node
AI triagehttp_trigger → llm_node (classify, JSON) → switch_node → proxy_node per team → response_node
Verify webhook signatureshttp_trigger → crypto_node (hmac_verify) → valid: proxy_node → response_node / invalid: response_node (401)

Next steps​