They often talk about the "two wings" of compassion and wisdom (or insight). So both matter in the Buddhist teachings. Trying to fly with only one of them is like a bird trying to fly with only one wing.
So, I think it's a little unclear what we mean by "motivation" but I think one part of the idea of working on motivation, at least is the idea of trying to develop compassion as the basis of your actions. If that is how you understand it, then that's like trying to fly with just one wing, if you don't let wisdom develop as well.
But both lead to the other as in Buddhist teaching, true wisdom is a wisdom that sees through the illusion of a separate self that's cut off from everyone else in its own little island of concerns, and also sees everything as changing and impermanent. So as you have a clearer understanding of yourself and how you are connected with everyone else, and also see that it's not possible to set up a little "home" in the world all to yourself that will last for all future time - you become more open to others. And that then leads naturally to compassion.
And compassion in the other direction by helping you to open out to others and the world around you helps you to intuitively connect to the way everything changes and to see how everything is interconnected. Which is what Buddhists see as the essential central point of wisdom. By wisdom they don't mean book learning, though for some on particular paths, then scholarly learning may help them. But the true wisdom is something you see directly.
And - you will still make mistakes. Buddha himself made what most would call mistakes in the ordinary sense. But when motivated by compassion, together with wisdom, when even your mistakes are done with this compassion and with understanding of impermanence and non self, they become part of the path.
One example from the Buddha's teaching is the time he met someone who wanted to become a monk and follow the Buddha's path as a monk. He said, fine, you need to go and get hold of a set of robes first, so I can ordain you as a Buddhist monk. So off he went to get his robes, but he never came back. Later Buddha heard that he had been gored by a cow - a very unusual thing to happen in India (that’s Pukkusāti in the Dhātuvibhanga Sutta).
So - you could say that's a mistake, - if Buddha had kept him just a few minutes longer before sending him off to get a set of robes, he wouldn't have been killed by the cow .
But then - if the cow had followed a different path also, then he wouldn't have been killed by it. You can keep going into ifs and ands and buts like that, but in short what happens just can't be predicted, it depends on what everyone else does, not just yourself.+ And there is no way you can see all the consequence of anything you do. Even a Buddha can't.
And sometimes you feel you want to roll back the clock, if only you had a time machine to go back, even half an hour, and undo something you said, or do something different. Like - you might imagine Buddha thinking "if only I had kept that monk for a few minutes longer, he wouldn't have been killed by the bull".
But you can't know what the consequences would have been if you'd did that as it didn't happen that way. For all you know it could have been much worse. And if you think as most Buddhists do that there is some continuation after this life, who knows what the effects were in that continuation? It could be a very positive thing to meet the Buddha and to decide to become a monk and follow the path of insight and compassion just before you die.
At any rate we can't do things like that. We just have to continue forward with whatever situation we are in, and act through compassion and wisdom. And whatever the consequences are of your wisdom and compassion, to go through with that also.
That's what they mean by skillful action, and this is also the Buddhist idea of "omniscience" when it is brought to its completion and you are completely motivated by wisdom and compassion in everything you do. Then everything you do is appropriate to the situation you are in. Nobody else could do anything better. Someone else might do something different from you, also motivated by compassion and insight, but you can't say what the consequences of that would be long term either or say that either of your choices is better or worse than the other.
It can be hard to relate to this if you feel one of your choices lead to someone being hurt in an accident or killed, for instance, you turned left, and an out of control car came careering across the road and killed your friend, say. But even then, there was no intention there, it was just an accident. What you need to do is to relate to what happens next. With your compassion and insight, you can help their friends and relatives, and yourself and continue into the future.