Can this be done?

Hi folks,
Hope everyone is well. I am curious if the following can be automated. I do not mind having to purchase software (Hazel, Keyboard maestro etc) IF they are going to solve this problem. Some of these steps I already have working but I am listing them also in case it affects the advice knowing the entire picture.

I want a situation that every time an email confirmation from an airline comes:

  1. Forwards the email to a specific Flighty email folder (Sanebox does this for me)
  2. From the Flighty email folder, it forwards the flight into to my trackers (TripIt & Flighty) (Sanebox does this for me)

This is where it gets tricky

  1. Prints the email to pdf
  2. Renames the pdf file to the date of purchase and if possible pricing and name of passenger.
  3. Moves the PDF into a specific file folder (not an email folder)

Can this be done ?. I am currently having to do it manually hundreds of times per week, so it would be helpful.

Many thanks in advance

Best,

Jeremy

Getting the email as the PDF is the tricky part. 4 and 5 can be done easily with Hazel. Your problem is likely going to be that the email never appears in your inbox - so macOS Mail Rules will never see it. If you don’t mind using a web service, you could set up Zapier: https://zapier.com/apps/email/integrations/email/24660/convert-email-message-to-pdf-with-convertapi

Then add the email address of your Zap to the forwarding emails, and have the file saved to Dropbox. Then Hazel can monitor that Dropbox folder, and do the rename and move.

Many thanks for the reply Rosemary. I shall try this and see How it goes. I appreciate you taking the time.

Best,
Jeremy