BE GOING TO

It espresses the subject's intention to perform a certain future action( We use it when we say what we have already decided to do, what we intend to do in the future.) This intention is always  premeditated . The actions expressed with "be Going to" are very likely to be performed in the near or remote future .

There´s a film on TV tonight. Are you going to watch it?
No, I´m too tired . I
´m going to have an early night

Why have you moved all the furniture out of this room?
I
´m going to clean the carpet

We use was/were going to to say what someone intended to do in the past ( but didn't do):

We were going to go by train but then we decided to go by car.