Can i automate the flow, why selection custom(my own) condition?

Use case. :
I want to automate the flow, while automating the flow i want to choose my custom condition like some dropdown which will be coming from some api.

  1. Is it possible ?
  2. can i write flow directly on prefect ?

Regarding API-based event-driven workflows, check this post:

If you are just getting started with Prefect, check this topic:
https://discourse.prefect.io/t/should-i-start-with-prefect-2-0-orion-skipping-prefect-1-0/544

You would need to install Prefect via pip, write Python code to create your flow, then register to schedule it.

I highly encourage you to try this Prefect 2.0 getting started guide:
https://orion-docs.prefect.io/getting-started/overview/