Postman Flows: How to create Durables based on xml body response

Hello, I am trying to pass a variable between a POST and a GET request by interposing the “create Durable” block.

In this block, a variable “businesscaseId” should be set based on the response body of the POST request, which in turn will be used in the GET URL ({{url}}/businesscases/{{businesscaseId}}) of the following request.

Currently I get the entire response body (XML) instead of the specific “ID”:

How can I set the value of the “ID” in the “Create Durables” block so that only a part (the ID) of the response body is used instead of the whole response body?

I’ve already tried:
The ID is logged out via a test script:

var responseJson = xml2Json(responseBody);
console.log(“businesscaseId”, responseJson[“ns1:BusinesscaseId”][“ns1:Id”]);

Previously I worked with environment variables and the collection runner. Since the request via flows treat the environment variables as read only, I am now looking for a way to set them in flows.

1 Like