Can automator run when Macbook lid is closed?
No, the Automator workflow will not run when your MacBook's lid is closed.

This is because your Mac is asleep and not actively running user applications and processes. You can prevent your Mac from sleeping when the lid is closed. Be aware that this is not recommended by Apple.