AWS Step Functions icon

AWS Step Functions

Consume the AWS Step Functions API

Overview

This node integrates with AWS Step Functions, allowing users to interact programmatically with state machines and their executions. Specifically, the "Start Execution" operation initiates a new execution of a specified state machine with optional input data and an optional unique name for the execution.

Common scenarios where this node is beneficial include:

  • Automating workflows by triggering AWS Step Functions state machines from n8n.
  • Starting complex orchestrations or business processes defined in AWS Step Functions directly from an automation workflow.
  • Passing dynamic JSON input to state machines to customize each execution run.

For example, you might use this node to start a state machine that processes orders whenever a new order is received, passing the order details as JSON input.

Properties

Name Meaning
State Machine ARN The Amazon Resource Name (ARN) of the AWS Step Functions state machine to start an execution on.
Name Optional unique name for the execution. Must be unique within your AWS account, region, and state machine for 90 days.
Input JSON string containing the input data passed to the state machine execution. Defaults to an empty JSON object {}.

Output

The output JSON contains the response from AWS Step Functions after starting the execution. Typical fields include:

  • executionArn: The ARN of the newly started execution.
  • startDate: Timestamp when the execution was started.

This output confirms that the execution has been successfully initiated and provides identifiers for tracking it.

The node does not output binary data.

Dependencies

  • Requires valid AWS credentials with permissions to start executions on AWS Step Functions.
  • AWS SDK for JavaScript (aws-sdk) is used internally.
  • The node expects AWS credentials configured in n8n (an API key credential with accessKeyId, secretAccessKey, and region).

Troubleshooting

  • Invalid ARN: If the provided state machine ARN is incorrect or does not exist, the node will throw an error. Verify the ARN format and existence in AWS.
  • Name conflicts: If the execution name is not unique within the required scope (account, region, state machine) for 90 days, AWS will reject the request. Use unique names or omit the name to let AWS generate one.
  • Malformed JSON input: The input must be valid JSON. Invalid JSON strings will cause errors.
  • Insufficient permissions: Ensure the AWS credentials have permission to call StartExecution on the specified state machine.
  • Network or AWS service issues: Temporary connectivity or AWS service problems can cause failures; retrying may help.

Error messages typically come from AWS SDK and include details about the failure reason.

Links and References

Discussion