Activate on copying 7 number string from Mail?

Hey all,

This seems like it should be simple, but I'm just not seeing the solution...

I want to open a specific URL in chrome. When I copy the ticket number from an email, 7 digits (ex: 5854932), I want to load url.com?ticket=5854932

Something like: if copied from mail & clipboard matches pattern '7 numbers' run macro...

I have the latter part working and trigger it now with Alfred 3, but it would be nice if it just ran when I copy the number in Mail.app.

Thoughts?
Thanks!

You can use the Clipboard Changed trigger for a macro in a Macro Group only activated with your email app (Apple Mail?) is active.

Then a simple IF/THEN Action with a Clipboard matches \d{7}
then Open URL with url.com?ticket=%SystemClipboard%

Questions?

Oohhh.
I was looking for the if/else in the trigger, not the reaction... egg on my face.
I'll get the hang of this yet :wink:
Thanks so much!

1 Like