Apple Mail: Deactivate BTT when Spotlight Search is active

I think I came up with a good solution that is independent of how you close Spotlight:

spotlight.bttpreset (7.7 KB)

How it works:
• It triggers on cmd+space and forwards that to the system to show spotlight
• It sets customVariable1 to "SpotlightActive"
• It uses the "Wait for Conditions To Become True" action to wait until the Spotlight window has disappaeared again
• It sets customVariable1 to "SpotlightNotActive"

Now you can define a conditional activation group that checks the customVariable1 and assign your Mail Shortcuts to that group (or add the variable check to any existing group)