  The close neighbourhood of a supermassive black hole contains not only the
accreting gas and dust but also stellar-sized objects, such as late-type and
early-type stars and compact remnants that belong to the nuclear star cluster.
When passing through the accretion flow, these objects perturb it by their
winds, magnetic and gravitational fields. By performing General-Relativistic
Magnetohydrodynamic (GRMHD) simulations, we investigate how the passages of a
star can influence the black hole gaseous environment. We focus on the changes
in the accretion rate and the emergence of blobs of plasma in the funnel of an
accretion torus. We compare results from 2D and 3D numerical computations that
have been initiated with comparable initial conditions. We show how a
quasi-stationary inflow can be temporarily inhibited by a transiting star, and
how the plasmoids can be ejected along the magnetic field lines near the
rotation axis. Additionally, we observe the characteristic frequency of the
perturbing motion in the power spectrum of the accretion variability, which
provides an avenue for a multi-messenger detection of the event. Finally, we
discuss the connection of our results to multi-wavelength observations of
galactic nuclei, with emphasis on several promising sources such as Sgr~A*, OJ
287, RE J1034+396, 1ES 1927+65, and ESO 253--G003.
