How to pass parameters from nodered to openrpa flow?
-
Hi,
I built a nodered api to be accessed by the http get command with parameters. The nodered flow then calls a openrpa flow. In the function node I see the JSON content in the msg parameter. But I don't know how to recover this content in my openrpa flow. What kind of node I should use in the rpa flow to get the contents of the parameters? -
Hey. You need to add an “ http response” to return a response to the http client.
You receive the values from the http payload by adding a corresponding argument on the rpa workflow -
@allan-zimmermann
Hi Allan,
Thank you for your answer. I receive from the 'http in' node "get/getusager" the value {"usr_name" : "Toto"} in msg.payload. If I add an argument 'payload' to the rpa workflow, do I have to declare it as an object type or an other type? -
Hey. Sorry I was not clear.
msg.payload is normaly an object, and the RPA node will parse each property on the msg.payload object as an argument for the workflow.
So lets say you have this in a function node
msg.payload = {"argument1": "Helle world"}
or call http://noderedurl/getusager?argument1=Hello world
Then in your workflow you can get that info from an argument with the name argument1. If you set an argument as out or in/out nodered will also get the value you set to this argument inside the workflow.
-
Hi Allan,
Thank you very much for your explanation. It works perfectly now. -