Continue if POST request gets a 200 success respon...
# 🤝help
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
autoresponded -> in the code keep the response as a workflow variable and check against the variable like:
workflow.response.status === 200
Hey @freezing-country-74807 a better solution is saving the status variable only because
will contain a lot of data that you might not want and will just fill up your bot memory
Copy code
try { 
  const makeRequest = await

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

  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