Temporal Workflow Call

Execute Temporal workflows

Overview

This node allows you to interact with Temporal workflows by either starting a new workflow execution or retrieving the status of an existing workflow. Temporal is a platform for orchestrating and managing complex workflows in a reliable and scalable way.

Common scenarios where this node is useful include:

  • Triggering background jobs or business processes asynchronously by starting Temporal workflows.
  • Monitoring the progress or final status of workflows that have been started previously.
  • Integrating Temporal workflow executions into larger automation pipelines within n8n.

For example, you can start a payment processing workflow with specific input parameters, then later check if the workflow completed successfully or failed.

Properties

Name Meaning
Operation Choose between "Start Workflow" (to initiate a new workflow) or "Get Workflow Status".
Workflow ID The unique identifier for the workflow execution.
Workflow Type The type/name of the workflow to execute (required when starting a workflow).
Task Queue The task queue name to use for the workflow execution (default is "default").
Input JSON object representing the input data to pass to the workflow (only for starting).

Output

The node outputs an array of items corresponding to each input item processed.

  • For Start Workflow operation, each output item contains:

    {
      "workflowId": "string",
      "runId": "string"
    }
    
    • workflowId: The ID of the started workflow.
    • runId: The first execution run ID of the workflow.
  • For Get Workflow Status operation, each output item contains:

    {
      "workflowId": "string",
      "runId": "string",
      "status": "string",
      "startTime": "string",
      "closeTime": "string | null"
    }
    
    • workflowId: The ID of the workflow.
    • runId: The current run ID.
    • status: The current status name of the workflow execution.
    • startTime: Timestamp when the workflow started.
    • closeTime: Timestamp when the workflow closed, or null if still running.

The node does not output binary data.

Dependencies

  • Requires access to a Temporal server endpoint.
  • Needs credentials including:
    • Server address.
    • Namespace.
    • Optional TLS certificate and key file paths for secure connection.
  • The node uses the official Temporal client library to connect and interact with the Temporal server.

Troubleshooting

  • Invalid Workflow ID or Type: Ensure the workflow ID is unique and the workflow type matches a registered workflow on the Temporal server.
  • Connection Issues: Verify the Temporal server address and namespace are correct. If using TLS, ensure certificate and key files exist and are valid.
  • JSON Input Parsing Errors: The input property must be valid JSON. Invalid JSON will cause parsing errors.
  • Workflow Not Found (when getting status): Confirm the workflow ID exists and is active or has completed.
  • Permission or Authentication Failures: Check that the API credentials provided have sufficient permissions to start workflows or query their status.

If the node encounters an error during execution and "Continue On Fail" is enabled, it will return the error message in the output JSON instead of stopping the workflow.

Links and References

Discussion