How to control electric BOV/bypass valve?

I’m planning on a PNP ecu swap in my -99 Audi TT 1.8T and wondering if it is possible to control an electronic BOV / recirculation / bypass as its only a solenoid valve?

And for the more technical out there: Is there a way to make event based triggers in control software. As an example throttle plate closing over ~10% in a set period of time.
The factory control over N249 (as my N249 is the E-valve) valve makes for a very smooth ride.

This is the only open question that keeps me from starting with this project.