Continue if POST request gets a 200 success respon...
# 🤝help
f
Hi! I want to add a flow logic expression to continue if the response to a previous post request is a success - I've tried these two expressions: event.kb.results[0].status === "success" event.kb.results[0].status === 200 But they don't run ever. can you help me understand what should i write to get the previous code run response? Thanks https://cdn.discordapp.com/attachments/1234470872627286026/1234470872798990336/image.png?ex=6630da17&is=662f8897&hm=bb2b600e831a08c3e7cedf2d35d0f759c751054bcd1e821f55eccfdd82284b91&
autoresponded -> in the code keep the response as a workflow variable and check against the variable like:
workflow.response.status === 200
e
Hey @freezing-country-74807 a better solution is saving the status variable only because
response
will contain a lot of data that you might not want and will just fill up your bot memory
Copy code
js
try { 
  const makeRequest = await axios.post(...)

  console.log("Response to the request was::", makeRequest.data)

  workflow.status_code = makeRequest.status
} catch (error) {
  console.log("There was an error making the request::", error)

  workflow.status_code = 400
}
Then in your expression check whether the code is 200
workflow.status_code === 200
The console.logs are just for you to see what's happening behind the scenes via the Logs panel