Yes, you can use the preterite acabé de + infinitive to report that something happened immediately before another past action. For example:
• Acabé de abrir la ventana cuando sonó el teléfono.
Here it means “I had just opened the window when the phone rang.” But to express a very recent action in the present moment, Spanish speakers normally use acabo de.
Use the present indicative of acabar plus de + infinitive:
• Tú acabas de abrir la ventana
• Él/Ella/Usted acaba de abrir la ventana
• Nosotros/Nosotras acabamos de abrir la ventana
• Vosotros/Vosotras acabáis de abrir la ventana
• Ellos/Ellas/Ustedes acaban de abrir la ventana