Flow variables and POST body options

Hi,

I am trying to use a loop for a series of different REST calls.

I have set up a table to variable loop

image

I want to pass a string with the POST body to the POST Request:
image

However I am not sure which flow variable should be assigned to pass the contents of my column “POSTBody” to the POST Body? See highlighted options below?

The Body Column Name is what I’d try first.

Alternatively, if this doesn’t have to be a loop, you can pipe the String Manipulation node directly into the POST Request node. I’ve taken this approach with GET Requests (1 request per row, ~200 rows in the table) and it worked out just fine. In your case, I’d just make sure the POST Request node knows which is your body column.

If it needs to be a loop, then another option is to use a Window or Chunk Loop Start node instead of the Table Row to Variable Loop Start.

2 Likes

Hello @henryhcraig,

to be sure what setting from flow variables tab corresponds to what node’s configuration and what is expected format you can use white (blank) rectangle and populate it with desired name. Upon node execution it will create flow variable with string you specified and configured value.

See this part of documentation if not entirely clear:
https://docs.knime.com/2020-07/analytics_platform_flow_control_guide/index.html#flow-variables

Br,
Ivan

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.