I have created a painting with too many layers in Photoshop. I'd like to add motion to it and make a simple animation using Photoshop timeline. Is it possible to add a motion one time and extend it to several groups of layers in order to zoom them all in and out simultaneously? It is so hard to add the same motion to all layers separately.
It seems it can't be done easily via Photoshop
Well, although I wouldn't say it is impossible in Photoshop, it doesn't seem to have a native implementation of many features when it comes to animation (since Photoshop is photo editing tool and animation capabilities were only added as a feature). It has many restrictions, but I came across a plugin named Animatior's Toolbar Pro a very long time ago, and it seems it might have the thing you want. So, I think it could be done via Photoshop scripting at a very deep level.
However, rather than making some script at that level, I'd recommend you make animations via some free animation tools like Dragon Bones, or free trials of After Effects or any other kind of animation tools which are specially made for animation. Happy Animating!