If you want to become invaluable in the workplace—or anywhere in general—just do the useful things no one else is willing to do. Keyword here being “useful”.
It’s quite easy to fall into the trap of thinking you’re doing something of value, but when looked at more closely, it’s actually the opposite. Try avoiding this at all costs. Evaluate yourself often.