As you noted, triggeredById returns a string value, which isn't possible to key into:
Since we need the variable name, rather than a string value, we typically recommend creating a "library" of possible values for triggeredById so that it can still be used somewhat dynamically. Wish I had a better option for you, but hope this helps!