If you're focused on the goal, excited about achieving it, and recognize that doing some undesirable tasks to achieve the goal is required, you will have the right perspective and will be appropriately motivated.
If you're not excited about the goal that you're working for, stop working for it. Personally, I like visualizing exciting new and beautiful things that I want to make into realities.
The excitement of visualizing these ideas and my desire to build them out is what pulls me through the thorny realities of life to make my dreams happen.