If you were unable to attend an important event, here is a simple template you can use to write an apology letter for not attending an event.
I am really sorry for not being able to show up in your event. Unfortunately, something came up at the last minute so I was not able to make it. I know I caused inconvenience and you probably may not forgive me anytime soon. As a result, I took this time to apologize.
I would love to attend your future events. Please note that when I confirm, I will definitely come.