つもりだったが

was going to … but

→ 積もり
phrase Rare #22,662
was going to … but Follows a verb or other phrase expressing an intention or assumption; が introduces a contrast.
JA: 早く寝るつもりだったが、友達から電話が来た。
EN: I was going to go to bed early, but a friend called.

彼は自分では私達の手伝いをしているつもりだったが、邪魔なだけだった。

He thought he was helping us, but he was only getting in the way.

私はあなたを訪問するつもりだったができなかった。

I was going to visit you, but I couldn't.

急いだつもりだったが間に合わなかったか

I thought I’d hurried, but I guess I didn’t make it in time.

— The Garden of Sinners: Paradox Spiral (2008)

この仕事を終えるつもりだったが、できなかった。

I intended to finish this job, but I couldn't.

私はその映画を今までに見るつもりだったが、出来なかった。

I had been meaning to watch that movie, but I never got around to it.

アドバイスをしたつもりだったが、結果的に彼を怒らせてしまった。

I meant to give him some advice, but I ended up making him angry.