If.. Then.. Way of Setting a token/variable for use in file

This could be done with two rules, but would be neater if I could just use one.
I am using hazel to rename and file share pdf contract notes. They contain the text 'Buy' or 'Sell' in a box on their own.
Date matching, account number matching on the PDF works fine.
What I would like to do is get the words 'Buy' or 'Sell' into the file name so format is something like this:
yy-mm-dd - Contract Note - Buy.pdf
or
yy-mm-dd - Contract Note - Sell.pdf
In reality the filename is a bit more complicated than that (in case there is more than one transaction a day).
It could be done with two rules but is there a way to do it with one?
Thanks
Phil
I am using hazel to rename and file share pdf contract notes. They contain the text 'Buy' or 'Sell' in a box on their own.
Date matching, account number matching on the PDF works fine.
What I would like to do is get the words 'Buy' or 'Sell' into the file name so format is something like this:
yy-mm-dd - Contract Note - Buy.pdf
or
yy-mm-dd - Contract Note - Sell.pdf
In reality the filename is a bit more complicated than that (in case there is more than one transaction a day).
It could be done with two rules but is there a way to do it with one?
Thanks
Phil