Node-RED + OpenRPA REST Integration: “Cannot Set Headers After They Are Sent” Error

Hi Team,

I am currently trying to perform REST API-based bot execution using Node-RED, similar to the implementation shown in this video:

https://www.youtube.com/watch?v=4gpHqWsZgb0

My flow is:

HTTP IN → RPA Workflow → HTTP RESPONSE

The robot workflow is getting triggered successfully from Node-RED, and execution works till the RPA Workflow node. However, I am not receiving the robot response back in Postman.

Instead, Node-RED debug shows the following error:

“Error: Cannot set headers after they are sent to the client”

I suspect there may be an issue with the HTTP Response handling or message object (msg.req / msg.res) after the workflow node.

Could someone please help me understand:

  1. How to correctly return robot output back to Postman?

  2. Whether additional Function/Change nodes are required before HTTP Response?

You most likely connected multiple of the out connectors on the RPA node to the HTTP response node. That is not allowed or possible. You can only send one response per request, and the middle “out” will send multiple messages. Only connect to the top and bottom.

image