That's a clever idea, and at first I was going to say no, but actually the answer is pretty close to yes.
First, the partial solution is that the %TriggerValue% actually gives you the text that was searched for (eg "timer 30" in this case).
Now the problem is that "timer 30" wont find your macro, but you can add a comment action with possible values.
And after that "timer 30" will match your macro. And then it is just a simple matter of using the Search action to extract the number.