- Release notes
- Getting started
- For administrators
- RPA workflow projects
- Creating an RPA workflow from an idea
- Creating a project
- How to start an RPA workflow
- Managing project files and folders
- Connecting RPA workflows to your accounts
- Configuring activities
- Managing the activities in a project
- Passing values between activities
- Iterating through items
- Managing the data in a project
- Configuring a project to use your data
- Using file and folder resources
- App projects
- Agentic processes
- Agents
- Solutions - Preview
- API workflows - Preview

Studio Web User Guide
The Response activity terminates an API workflow and sends a structured response to the requester. The response typically includes a status and additional data.
Use the Response activity to:
- Always return the correct status and response details.
- End workflows with a clear and structured result.
- Handle errors gracefully, especially when combined with the Try-Catch activity.
The Response activity should be the final step in a workflow, to ensure the process provides the intended information.
The following example retrieves a worker from Workday and aggregates details about their manager and direct reports.
The following image displays the example workflow:
The Failure response
The workflow returns a Failure status with an error message if any retrieval step fails.
To achieve this:
- Wrap the retrieval steps inside a Try-Catch block.
- If an error occurs, the Error Response step in the Catch flow returns a structured failure response.
- Type—Failure
- Details—Open the Expression editor and write the following:
({ "error_message": $context.outputs.Try_Catch_3.error.title, "status": $context.outputs.Try_Catch_3.error.status })
({ "error_message": $context.outputs.Try_Catch_3.error.title, "status": $context.outputs.Try_Catch_3.error.status })Here,$context.outputs.Try_Catch_3.error
provides a structured error output from the Try-Catch activity. When the Try flow encounters an error during execution, the workflow returns the following output:
The Success response
The workflow returns a Success status with the aggregated worker information. The Search Workers by Name or ID activity returns an array, even when ther is only one match. There, we use a For Each activity to process each result, and then consolidate the data using a Script activity.
- Type—Success
- Details—Open the Expression editor and write the following:
({ "workers": $context.outputs.For_Each_2.results })
({ "workers": $context.outputs.For_Each_2.results })Here,workers
contains the aggregated output from the Script step of the For Each loop. The workflow returns the following output: