I do not 100% understand the pattern, if it exists.. I hope the native speakers of English could kindly elaborate on how to use this structure... The examples are:

1. It was me (or I?) who opened...