Basically you can sort things in GNUS based on some rules. You can also perform any arbitrary lisp based on some rules. So you simply add some regex, check the body of the message, and then perform whatever actions you want by either depositing the messages in a queue, or just directly doing those operations.
Sorry if that was vague, there isn't much to really say about it. I'm afraid I have no helpful pointers/tips to give.