  Flavor observables are usually computed with the help of the electroweak
Hamiltonian which separates the short-distance from the long-distance regime.
The Wilson coefficients are calculated perturbatively, while matrix elements of
the operators require non-perturbative treatment for many processes, e.g.
through lattice simulations. The resulting necessity to compute the
transformation between the different renormalization schemes in the two
calculations constitutes an important source of uncertainties. An elegant
solution to this problem is provided by the gradient-flow formalism, already
widely used in lattice simulations, because its composite operators do not
require renormalization. In this contribution we report on the construction of
the electroweak Hamiltonian in the gradient-flow formalism through NNLO in QCD.
