Yes, this would work.
Can you move a glyph of warding in a bag of holding?
The glyph of warding can be triggered without a spoken command, e.g. by opening the book. Also note that the glyph cannot be moved: ” If the surface or object is moved more than 10 feet from where you cast this spell, the glyph is broken, and the spell ends without being triggered.”
What counts as a surface for Glyph of Warding?
“you inscribe a glyph upon either a surface (such as a table or a section of floor or wall), or within an object that can be closed (such as a book, a scroll, or a treasure chest) to conceal the glyph. If you choose a surface, the glyph can cover an area of the surface no larger than 10 feet in diameter.
Can you cast spells into a bag of holding?
As AaronOfBarbaria mentioned, the bag doesn’t interfere with spellcasting so any spell that allows planar travel would allow them to escape. a bag of holding has 10 minutes of air…
What happens when a glyph of Warding is cast?
The spell being stored has no immediate effect when cast in this way. When the glyph is triggered, the stored spell is cast. If the spell has a target, it targets the creature that triggered the glyph. If the spell affects an area, the area is centered on that creature.
How big can a glyph of warding cover?
If you choose a surface, the glyph can cover an area of the surface no larger than 10 feet in diameter. If you choose an object, that object must remain in its place, if the object is moved more than 10 feet from where you cast this spell, the glyph is broken and the spell ends without being triggered.
What happens when a spell is stored in a glyph?
The spell being stored has no immediate effect when cast in this way. When the glyph is triggered, the stored spell is cast. If the spell has a target, it targets the creature that triggered the glyph.
Where do you put the glyph of warding spell?
Acid (…) When you cast this spell, you inscribe a glyph that later unleashes a magical effect. You inscribe it either on a surface (such as a table or a section of floor or wall) or within an object that can be closed (such as a book, a scroll, or a treasure chest) to conceal the glyph.