4

Yes, it can be done! But you need assistance. Use the spell Glyph of Warding:
Glyph of Warding
You can store a prepared spell of 3rd level or lower in the glyph by casting it as part of creating the glyph. The spell must target a single creature or area.
...
When the glyph is triggered,...