Hi, I'm completely new to Keyboard Maestro.
I'd like to create a macro that opens my gmail as a 'Yesterbox', showing all the emails in my inbox that came in before today. Today, on April 1st, the URL would be:
You can extend @kraftyDevil's suggestion by building a variable that includes the entire search string as you would see it on the Gmail page, e.g.,
in:inbox before:2022/4/1
Then use the Filter action to percent-encode that string and prepend the
https://mail.google.com/mail/u/1/#search/
bit to it. The only difference between your example and the result will be a %20 instead of a + between inbox and before. But that's a valid encoding of the space character and the URL will work fine.
Here's a sample macro that creates the URL and displays it in a window. If you download and install it, it will be in a Keyboard Maestro folder called Temporary.