If/else module to control the flow when using Webhooks

Hi,

I’ve started integrating the webhook on my Flow and I have a new question.

I’m using Parsehub to do some scraping and trigger the webhook once the scraping is done.
Parsehub will trigger the webhook three times. Once the scraping is initialised, once it’s running and after it’s completed.

The response looks like this:

{
   "run_token":"xxxxxxxxxx",
   "status":"running",
   "owner_email":"[email](mailto:email)",
   "custom_proxies":"",
   “data_ready”:”0”,
…

}

I’m trying to add a if/else statement to test the value of “status” In case “status” equals “completed" it should proceed to an API Enrichment module which will use the value of the “run_token” to get the results.

The problem is, your if/else module is not meant to control the flow, but add a column to the result of the webhook.

How would you go about this?

Test the value of a webhook result to stop or continue the flow?

Hey Gustavo! Good thinking to try out the If/Else step. Instead of If/Else, try the Row Filter step. You can set up the Row Filter to only pass rows where status=completed.