j’allais / j’avais l’intention de
I thought I was going to suffocate on the crowded train.
Je pensais que j’allais étouffer dans le train bondé.
I thought that I was going to faint.
Je pensais que j’allais m’évanouir.
I didn't know I was going to have to introduce the main speaker.
Je ne savais pas que j’allais devoir présenter l’orateur principal.
What did you think I was going to do?
Qu’est-ce que tu pensais que j’allais faire ?
I was going to write to you, but I started doing other things and forgot.
J’allais t’écrire, mais je me suis mis à faire autre chose et j’ai oublié.
I thought I was going to faint.
Je pensais que j'allais m'évanouir.
That's what I was going to say.
C'est ce que j'allais dire.