Skip to main content
The Execute Workflow node invokes another CogniAgent application within your workflow. This enables modular design where complex logic can be encapsulated in one application and reused across many others.
Execute Workflow node configuration form

Execute Workflow configuration — pick the target application and map values into its input arguments.

When to Use

  • Reusable logic - Encapsulate common workflows (email parsing, data validation) and call them from multiple places
  • Complex sub-processes - Break large workflows into manageable pieces
  • Team collaboration - Different team members can own different workflows
  • Versioning - Update a shared workflow without modifying every workflow that uses it
  • Separation of concerns - Keep workflows focused on one responsibility
Think of Execute Workflow like calling a function in programming. The called workflow is the function, and your inputs are the parameters.

Example: Lead Qualification Pipeline

A main workflow that uses specialized workflows for each step:
1

Receive the lead

Use a Webhook node to receive new lead data from your website form.
2

Enrich the lead

Execute Workflow: Lead Enrichment Workflow
This workflow looks up company info, social profiles, and tech stack.
3

Score the lead

Execute Workflow: Lead Scoring Workflow
This workflow applies your scoring model and returns a score.
4

Route based on score

Use a Condition node to route high-score leads to sales, others to nurture campaigns.
Workflow structure:

Example: Document Processing Hub

A central workflow that routes documents to specialized processors:
Each specialized workflow handles its document type with custom logic.

Example: Approval Workflow

Use workflows to encapsulate approval processes: Main workflow:
Expense Approval Workflow:

Passing Data

Input Arguments

The target workflow declares its input arguments on its Start node. In the Execute Workflow node you map a value to each argument — values can use {{...}} expressions resolved from the current execution: The called workflow receives these as its starting input.

Receiving Results

The called workflow’s output becomes available as {{execute_workflow_1.result}}:

Design Patterns

Microservices Pattern

Break your automation into small, focused workflows: Main workflows compose these workflows as needed.

Facade Pattern

Create a simplified workflow that orchestrates complex operations: Customer Onboarding Workflow (called by main workflow):
Callers don’t need to know these details.

Chain of Responsibility

Pass data through a series of processing workflows:

Execution Behaviour

Execute Workflow always waits for the called workflow and returns its output — it is not a fire-and-forget trigger. How the target runs depends on the target application’s execution mode: a single-instance application reuses its live execution (deploy it first), while a multi-instance application starts a fresh run.
Recursion is allowed — a workflow may call itself or another entry point of the same application — but you own loop termination. Gate recursive calls behind a Condition.

Error Handling

When a called workflow fails, the Execute Workflow node captures the error:
Check {{execute_workflow_1.status}} to handle failures gracefully.

Tips

Name workflows descriptively - “Invoice Processor v2” is better than “Workflow 1”. This makes the Execute Workflow node’s purpose clear in the workflow.
Version your workflows by creating copies before major changes. This prevents breaking dependent workflows.
Avoid circular dependencies where Workflow A calls Workflow B which calls Workflow A. This will cause infinite loops and eventual timeout.

Settings

string
default:"Execute Workflow"
Display name shown on the canvas.
string
default:"execute_workflow_1"
Unique identifier for referencing outputs.
string
required
The application to run. Select from a dropdown of applications in your workspace.
string
required
The entry node in the target application — a Start node that declares the input arguments callers must pass.
array
One row per declared argument: the argument name and the value to pass. Values can use {{...}} expressions from the current execution.
number
Override how long to wait for the called workflow to finish.

Outputs

object
The called workflow’s final outputs, keyed by node key — its return value.
boolean
Whether the called workflow completed successfully.
string
Execution status of the called run.
string
Unique identifier for the run of the called workflow.
number
How long the called workflow took to run (in milliseconds).
string
Error details when the call fails.

LLM

For simple AI tasks, an LLM node may be sufficient without a full workflow.

Execute Code

For data processing, code might be simpler than an workflow.