Converting road hydraulic disc brakes to flat bar : Possible?
The official answer from Shimano as of now is no, as per their road hydraulic systems compatibility chart.



Someday there may be flatbar road hydraulic levers that make their way onto a new version of that chart, but for now bikes like that just come with conventional MTB/hybrid systems.

There may be combinations that work acceptably, but they will be hacks in an area not a lot of exploration has generally been done in at present.

Matching fluid displacement is not simply a matter of the new lever moving at least as much total fluid as the old one. To perform correctly, the lever has to move fluid at an appropriate rate per distance of lever travel. Hydraulic brakes have a similar version of leverage (aka mechanical advantage) considerations as cable actuated brakes, or at least they would if in practice they weren't mostly black boxes in terms of observing and comparing displacement numbers.

In other words, if you hooked the caliper up to a lever that moved a bunch more fluid, the brake would feel firm and positive at the lever, same as hooking a v-brake lever up to a sidepull, but it wouldn't be generating correct leverage, and stopping power would suffer.

If you go the other direction, less displacement, you get a brake that generates a ton of leverage but the pad movement will be less than what it should be, so it will be prone to issues with the lever bottoming on the bar prematurely, and will feel mushy.