We use going to (do) when we say what we have already decided to do, or what was intended to do in the future. We prefer to use the present continues ( I am doing) when we say what someone has arranged to do- for example , arranged to meet someone, arranged to travel somewhere. We use was/were going to say what someone intended to do in the past (but didn’t do).
Going to has another meaning. We use going to when we say what we think will happen. Usually there is something in the present situation (the man walking toward the hole) that makes the speaker sure about what will happen.
1) There is a movie on TV tonight. Are you going to watch it?
2) What time are you meeting Kim?
3) We were going to take the train but, then we decided to go by car.
4) Look at those black clouds! It is going to rain.