Thanks for the vote of confidence, Dave, but I wouldn't consider myself the expert. I'm more of "somewhat of an expert," at best.
I'm guessing that you want it to notify you when it first detects motion, and then ignore everything else until there is no more motion for 5 minutes, right?
In that case, I'd remove the delay and the flag clearing entirely. If your motion sensor sends a "B1 On" when there is motion, and a "B1 Off" when there has been no motion for 5 minutes (as I suspect it can be set to do), then it should work.
Your "B1 On" macro would be:
If flag 11 is OFF ("B1 On" is the trigger, and should not be listed in the macro as a condition), then:
Set Flags [11] Flag Command
Send Email Notification -9xxxx@vtext.com -gun safe open, alarm NOT on -Alarm is off but gun safe is open
Your "B1 Off" macro would be:
Clear Flags [11] Flag Command
So, repeated "B1 On" triggers from the motion sensor would check the flag, and then exit if it is already set. Nothing would get queued up, so it shouldn't send you extra notifications.
Of course, if whatever is sending the "B1 On" is not capable of being set this way, then we would need to find another way to do it (probably with more flags and nested macros).