tl;dr: Collecting data to show that my time expended at work badly mismatched my personal priorities forced me to start saying "no" in certain clearly defined circumstances.
I was utterly inable to say "no" but forced myself to learn when I realised that taking on too many things from others was getting in the way of projects I wanted to focus on, and impeding my career progression. I am less empathetic and compassionate than average, for sure, and probably inability to say "no" has been a reaction to that.
What made me decide to start saying "no": Taking complete stock of the various things I was working on, approximate time spent on each (one month of diary studies, every time I switched task I noted the previous task and its duration). At the same time I wrote up a list of my main tasks, ranked in terms of their priority to me. At the end of the diary period I matched up the durations to my main priorities, and discovered huge, huge mismatches. Mainly, letting my big priorities slip and spending far too much time on things that were way less important to me.
Most of my biggest time sinks were in doing things for other students or researchers in our extended group, on topics where I am indisputably the expert. But stepping back and looking at the data made me realise that I was taking on lots of work because I wasn't willing to accept the short-term costs associated with delegation and training. The long term costs: not only was I burning a lot of my time on mundane programming, analysis, etc., I was starting to get a reputation as someone who couldn't delegate, didn't write papers, didn't develop independent projects.
I introduced "No" without warning, letting everyone know I was going to switch my strategy to a more training-based one. Instead of "hand me your data and I give you the results later", I shifted to "Try it out and come to me when you get stuck". So it's not 100% "no" as I am still around as a safety net, and in solving specific problems it's very easy to explain why. The real advantage is that now some of the people who developed intermediate skills can provide support for the beginners, which also helps with group cohesion. I probably still don't say "no" often enough, but my most recent diary study (3mo ago) suggests better correspondence with my personal priorities.
Some people seem to be a bit too generous for their own good. I know a precious few people who are especially good at saying "no" when asked to take on new responsibilities that would put them over their limits. I love working with people like that because I can always trust them to tell me when it would be better for me to find someone else to do the thing. I expect this to be an extremely valuable skill it would probably be good for many of us to understand, learn, and be able to teach to people who really need it.