Can't get automator to move the email message

If you’re using DEVONthink Pro Office, then you could enable the option Preferences > Import > Destination > Select Group and use the commands Message/Mail > Add to DEVONthink Pro Office of Apple Mail.

Another option might be to modify the script ~/Library/Scripts/Applications/Mail/Add message(s) to DEVONthink.scpt, see Importing into specific database

However, Automator is probably not useful as there’s no action to save messages (which could be imported afterwards), only to save attachments.