I was just in this situation this past February. In fact, both of my grandmothers passed away within 10 days of each other so I had to do this twice. When the first one passed it was unexpected and it was the great grandmother my kids were closest to. My kids were a little older - 7 and 4 at the time. We told both kids the same thing, but both processed it differently, probably due to age. My daughter was old enough to know about heaven and dying so when we told them that great grandma went to heaven she wanted to know why and what happened. We told them that it was her time to go be with God. The literal part was tough because my daughter really wanted to know "was she sick" "did she get in a car accident", etc. We tried to explain that when you get older your heart is tired and gets worn out and hers decided to stop. The hardest part was trying not to scare her and telling her the truth. She kept saying, great grandma wasn't old. In truth she was 90 :).
My kids knew my other grandmother was sick, but we had not told them she was terminal (pancreatic cancer). When my first grandmother died, my daughter picked up right away and started asking if my other grandma was going to die too because she was sick. We told her yes, but we didn't know when because the doctor at the time had given her 6 months. No one knew that she would for the worst so quickly and be gone 10 days later.
The one thing I can say is to tell your kids the truth. Nothing comes from hiding that great grandma is gone. Especially if your kids are anything like my daughter. She is very observant and has always picked up on things quickly, so hiding anything from her was just going to make us look like we were lying. And then I'd have a kid pointing out that lying is wrong.
We took our kids to the "funerals" which were masses in a Catholic Church, closed casket. We didn't take them to anything else because both caskets were open and we felt they were too young to handle seeing that. They are however used to masses and church so that wasn't unusual for them. They did acocmpany us to the cemetary and we explained to them what a cemetary was and why we were going there. We also told them that the masses and the cemetary were a way to say goodbye to great grandma. We were very sure to tell them that they would always have their happy memories of great grandma, and that just because we were saying goodbye to her body, we weren't saying goodbye to the good times we remember. I encouraged my daughter to write down some of her memories in her diary and she did. I think that helped.
I don't know how your parents feel, but my mom found my kids to be a comfort when her mom died (the first one), so if you can find a happy medium, then I'd bring them with you to at least one of the events, even if it's just the wake afterwards.
There is no way around them being hurt and crying. Your oldest will likely understand better than your younger. My son (the younger of the two) to this day will ask occasionally if great grandma "still died" because he doesn't full understand the permanence of the situation. My daughter went through a period where she was afraid that me, her dad and other grandparents would leave her (it was about a 6 weeek period). The school counselor actually helped her with this. Keep an eye out for this behavior - suddenly clingy, crying more often, wanted to know where you are at all times, getting jumpy if daddy isn't home at the regular time because he's working late, etc. You also might find that your kids want reassurance that their other great grandparents are still alive (if they are). My daughter kept asking us to take her to see her last remaining great grandmother after both funerals and seeing her alive and doing OK, seemed to help as well.
Another thing that helped is that my mom went out of her way to find something for both kids to keep of my grandmother. She gave them both stuffed animals because grandma had a bunch at her house that she considered special. She also gave my daughter a picture that grandma had out of the two of them and one of my grandma's knick knacks in the form of an angel. We told my daughter that she could look at the knick knack and know great grandma was watching over her as a guardian angel. That seemed to comfort both kids. Unfortunately I'm still waiting to see if my aunts will give my kids anything from my other grandmother since all the contents of her home were left to them. I've asked them and they've said yes, but here we are 5 months later. My daughter does occasionally ask if there will be something she can have to remember great grandma Gerry by, but so far nothing. Hopefully your situation will be like my first grandmother, not the second.
It's not going to be easy telling your kids, but the truth is your best option. I think we handled everything pretty well and our kids got an unwelcome dose of reality, but they certainly understand now that death is a part of life. If you have any other questions, feel free to message me. I've been there.