There's a couple of different types of "take for granted". There's the kind that's more about someone else's "overall attitude" and treatment of you. Then there's the kind that's more about things like one person asking someone else for a small favor here or there. There's also the kind of situation along the lines of, say, having an elderly parent who needs a ride to the his/her doctor's appointments (just as an example, and assume the number of appointments are reasonable/doable enough for the ride-giver.)
Being "generally taken for granted" in a relationship can mean being reliable and being counted on, so as long as respect for the person who is reliable/counted on is in the mix; it shouldn't be a big deal to work out any the smaller stuff with them.
With stuff/situations other than that (above), I think the first thing people should always do before living their life with a "big shield" (aka, "attitude") up and ready to "not to be taken for granted"; is ask whether they, them-self, are someone who would happily and comfortably take someone else for granted in some way. Chances are more likely than not that the person who asks himself if he would intentionally ever want to take someone else for granted would answer that question with something like, "no - at least not if I were aware that's what I was doing, or seemed to be doing".
If you give other people credit for (most likely) being a decent human being with a certain amount of understanding, and being someone who would never want to take advantage of someone else; it usually becomes much easier to just be upfront about what you can/can't do (how often and/or how long) for someone else). If you realize that most people are (or at least try to be) "grown-ups" (some kids can be pretty grown up) you're more likely to be comfortable about drawing lines when that's appropriate.
If it seems someone else is in a long-term situation ask if you've done anything to empower them, or if you gain something from "drawing lines" on them (or not, depending on you) or not.
In other words, don't be a big drama queen(king who makes a big deal out of things are aren't a big deal for most other people. Just tell people what you can or can't/will or won't do, and give them credit for understanding.
If you're someone who WOULD take advantage of others realize that everyone is not like you.
Either way, give other people some credit Less drama, less dilemma, when you do (usually, anyway..).