if I say it politely, I would say 急な用事で行けなくなってしまいました。
I can understand your translation but it is too literal.
急用 or 急な用事 would be a simple and normal way to say when you don't want to tell the detail.
It can be translated as 'something unexpected' or 'something urgent'.
Be careful when you use it. They might get an impression that you just want to make an excuse that you couldn't come, because it is vague about what happened to you.
hopefully, it is helpful for you.