Rule reminder
Modal verbs (volere, potere, dovere) in trapassato prossimo: avevo + past participle of the modal (voluto/potuto/dovuto) OR essere + participle when the infinitive would take essere.
Non … (potere) venire alla festa perché lavoravo.