Recent years have seen an increased interest in the question of whether the gravitational action of planets could have an influence on the solar dynamo. Without discussing the observational validity of the claimed correlations, we ask for a possible physical mechanism that might link the weak planetary forces with solar dynamo action. We focus on the helicity oscillations that were recently found in simulations of the current-driven, kink-type Tayler instability, which is characterized by an m=1 azimuthal dependence. We show how these helicity oscillations can be resonantly excited by some m=2 perturbation that reflects a tidal oscillation. Specifically, we speculate that the 11.07 years tidal oscillation induced by the Venus--Earth--Jupiter system may lead to a 1:1 resonant excitation of the oscillation of the alpha-effect. Finally, in the framework of a reduced, zero-dimensional alpha--Omega dynamo model we recover a 22.14-year cycle of the solar dynamo.